• Bug
  • Fatal error: class.meetingrequest.php:1982 - Problem with Mobile Device Sync

Hello,

i am checking a migration from our Exchange to Grommunio.

PST-Export on Exchange 2019 and import to grommunio worked fine.

gromox-pff2mt -s XXX.pst | gromox-mt2exm -u XXX@XXX

I uses parameter -s to import Mails etc. in the original folders.

Connection to Outlook and Web-Access also fine.

But problems with mobile devices (iOS and Android).

During sync i got the following errors

`/var/log/grommunio-sync/grommunio-sync-error.log

27/02/2025 07:07:33 [27211] [ERROR] [XXX@XXX] LoopDetection->ProcessLoopDetectionPreviousConnectionFailed(): Command 'Sync' at 27/02/2025 07:07:23 with pid '23525' terminated unexpectedly or is still running.
27/02/2025 07:07:33 [27211] [ERROR] [XXX@XXX] Please check your logs for this PID and errors like PHP-Fatals or Apache segmentation faults and report your results to the grommunio dev team.

27/02/2025 07:07:36 [26849] [FATAL] [XXX@XXX] Fatal error: /usr/share/php-mapi/class.meetingrequest.php:1982 - Uncaught TypeError: mapi_getprops(): Argument #1 ($any) must be of type resource, bool given in /usr/share/php-mapi/class.meetingrequest.php:1982
Stack trace:
#0 /usr/share/php-mapi/class.meetingrequest.php(1982): mapi_getprops()
#1 /usr/share/php-mapi/class.meetingrequest.php(3865): Meetingrequest->openCustomUserStore()
#2 /usr/share/php-mapi/class.meetingrequest.php(3606): Meetingrequest->getDelegatorStore()
#3 /usr/share/php-mapi/class.meetingrequest.php(1690): Meetingrequest->getCorrespondentCalendarItem()
#4 /usr/share/php-mapi/class.meetingrequest.php(305): Meetingrequest->isLocalOrganiser()
#5 /usr/share/grommunio-sync/lib/grommunio/mapiprovider.php(817): Meetingrequest->processMeetingRequestResponse()
#6 /usr/share/grommunio-sync/lib/grommunio/mapiprovider.php(67): MAPIProvider->getEmail()
#7 /usr/share/grommunio-sync/lib/grommunio/mapiphpwrapper.php(104): MAPIProvider->GetMessage()
#8 [internal function]: PHPWrapper->ImportMessageChange()
#9 /usr/share/grommunio-sync/lib/grommunio/exporter.php(307): mapi_exportchanges_synchronize()
#10 /usr/share/grommunio-sync/lib/request/sync.php(1253): ExportChangesICS->Synchronize()
#11 /usr/share/grommunio-sync/lib/request/sync.php(998): Sync->syncFolder()
#12 /usr/share/grommunio-sync/lib/request/requestprocessor.php(94): Sync->Handle()
#13 /usr/share/grommunio-sync/index.php(114): RequestProcessor::HandleRequest()
#14 {main}
thrown (1)

in /var/log

grep -r 23525 * | grep ERROR | more
grommunio-sync/grommunio-sync-error.log:26/02/2025 12:58:52 [26849] [ERROR] [XXX@XXX] LoopDetection->ProcessLoopDetectionPreviousConnectionFailed():
Command 'Sync' at 26/02/2025 12:57:58 with pid '23525' terminated unexpectedly or is still running.
grommunio-sync/grommunio-sync-error.log:27/02/2025 07:07:33 [27211] [ERROR] [XXX@XXX] LoopDetection->ProcessLoopDetectionPreviousConnectionFailed():
Command 'Sync' at 27/02/2025 07:07:23 with pid '23525' terminated unexpectedly or is still running.
grommunio-sync/grommunio-sync.log:26/02/2025 12:58:52 [26849] [ERROR] [XXX@XXX] LoopDetection->ProcessLoopDetectionPreviousConnectionFailed(): Comma
nd 'Sync' at 26/02/2025 12:57:58 with pid '23525' terminated unexpectedly or is still running.
grommunio-sync/grommunio-sync.log:27/02/2025 07:07:33 [27211] [ERROR] [XXX@XXX] LoopDetection->ProcessLoopDetectionPreviousConnectionFailed(): Comma
nd 'Sync' at 27/02/2025 07:07:23 with pid '23525' terminated unexpectedly or is still running.

grep -r 23525 * | grep Fatal | more
grommunio-sync/grommunio-sync-error.log:26/02/2025 12:57:58 [23525] [FATAL] [XXX@XXX] Fatal error: /usr/share/php-mapi/class.meetingrequest.php:1982

  • Uncaught TypeError: mapi_getprops(): Argument #1 ($any) must be of type resource, bool given in /usr/share/php-mapi/class.meetingrequest.php:1982
    grommunio-sync/grommunio-sync-error.log:27/02/2025 07:07:24 [23525] [FATAL] [XXX@XXX] Fatal error: /usr/share/php-mapi/class.meetingrequest.php:1982
  • Uncaught TypeError: mapi_getprops(): Argument #1 ($any) must be of type resource, bool given in /usr/share/php-mapi/class.meetingrequest.php:1982
    grommunio-sync/grommunio-sync.log:26/02/2025 12:57:58 [23525] [FATAL] [XXX@XXX] Fatal error: /usr/share/php-mapi/class.meetingrequest.php:1982 - Unc
    aught TypeError: mapi_getprops(): Argument #1 ($any) must be of type resource, bool given in /usr/share/php-mapi/class.meetingrequest.php:1982
    grommunio-sync/grommunio-sync.log:27/02/2025 07:07:24 [23525] [FATAL] [XXX@XXX] Fatal error: /usr/share/php-mapi/class.meetingrequest.php:1982 - Unc
    aught TypeError: mapi_getprops(): Argument #1 ($any) must be of type resource, bool given in /usr/share/php-mapi/class.meetingrequest.php:1982
    php-fpm.log:[26-Feb-2025 13:57:58] WARNING: [pool grommunio-sync-pool] child 23525 said into stderr: "NOTICE: PHP message: PHP Fatal error: Uncaught TypeError: mapi
    _getprops(): Argument #1 ($any) must be of type resource, bool given in /usr/share/php-mapi/class.meetingrequest.php:1982"
    php-fpm.log:[27-Feb-2025 08:07:24] WARNING: [pool grommunio-sync-pool] child 23525 said into stderr: "NOTICE: PHP message: PHP Fatal error: Uncaught TypeError: mapi
    _getprops(): Argument #1 ($any) must be of type resource, bool given in /usr/share/php-mapi/class.meetingrequest.php:1982"`

iOS is terrible slow. I think that iOS is resuming after that error.
Android sync stops working after syncing some items.

I deleted all Calendar Items ==> no changes.
I tried to disable Calendar Sync ==> no changes.
only Sync Mails ==> no changes

I changed the sync time from 1 month to 2 weeks on iOS and Error is away.
Fast Sync.

So the problem must be in items, date between 2 and 4 weeks back.

I did not find any post to such an error.

System is newly installed (OpenSuse appliance) and all updates installed.

Can anyone help here please?

Thanks a lot and BR

Martin

Which gromox version? rpm -qa gromox and which grommunio-syn version: rpm -qa grommunio-sync ?

Thanks for you answer.

rpm -qa gromox
gromox-2.42.15.gdaa8a45-lp156.11.1.x86_64
rpm -qa grommunio-sync
grommunio-sync-2.1.4.eccc143-lp156.191.1.noarch

BR
Martin

I use: gromox-2.41.12.9a6a0a6-lp156.6.1.x86_64 and grommunio-sync-2.1.0.325cf53-lp156.52.1.noarch, but do not see this problems. This is the current supported version.

Thanks. I will try to install your versions (normally i am working with other linux-distributions) and keep you up to date.

OK. I am not able to find your versions for downloading and installing manually. Maybe for Subscribers only?!
(which is of course absolutely understandable)
A few days ago I got in contact with my nearest Grommunio-Partner listed on the website for subscription/support. But no feedback yet....
We will see.....

    Admartinator Maybe for Subscribers only?!

    Yes, this is the current supported version.

    I have the exact same problem, using a clean appliance install.
    rpm -qa gromox
    gromox-2.42.30.gf1b6a49-lp156.18.1.x86_64
    rpm -qa grommunio-sync
    grommunio-sync-2.1.4.eccc143-lp156.191.1.noarch

    It seems (for now, but it's early days) that if I don't import the Sent Items from Exchange things work fine.

    • Edited

    It seems that the way the (From) address is imported isn't appreciated by grommunio. The PST contains the internal Exchange X.500-style addresses as opposed to the email address. This probably works fine when you're connected to a common LDAP solution but in our case we're not.
    I wonder if that can be edited in any way that doesn't break things, either in the PST or during the gromox-pff2mt/gromox-mt2exm run?

    23 days later

    I encountered exactly the same issue. The root cause is that mapi_ab_openentry() fails and returns false, which is then passed to mapi_getprops(). Since that function expects a valid resource, it throws a fatal error and breaks the sync process (especially for mobile devices like iPhone/iPad).

    I patched the function openCustomUserStore() in class.meetingrequest.php to avoid calling mapi_getprops() on a false value. After this change, ActiveSync works reliably again.

    I’ve also created a GitHub issue with more details and logs:
    🔗 https://github.com/grommunio/gromox/issues/141

    Here’s the fixed code:
    public function openCustomUserStore($ownerentryid) {
    $ab = mapi_openaddressbook($this->session);

    try {
        $mailuser = mapi_ab_openentry($ab, $ownerentryid);
        if (!$mailuser) {
            return;
        }
    }
    catch (MAPIException $e) {
        return;
    }
    
    $mailuserprops = mapi_getprops($mailuser, [PR_EMAIL_ADDRESS]);
    $storeid = mapi_msgstore_createentryid($this->store, $mailuserprops[PR_EMAIL_ADDRESS]);
    
    return mapi_openmsgstore($this->session, $storeid);

    }

    Let me know if that helps!

    Appreciate that very much. I got ‘around’ the issue by running some queries to replace the X500 addresses with smtp addresses. Totally doesn’t scale of course.
    Thanks for digging in and making a permanent fix.

    I’ve only applied the fix locally for now, just enough to get syncing working again on my end. Hopefully someone from the grommunio team picks it up and pushes a proper fix soon 🤞
    The GitHub issue is open here for reference:
    🔗 https://github.com/grommunio/gromox/issues/141

    Let’s see what happens!

    • FvA likes this.

    © 2020-2024 grommunio GmbH. All rights reserved. | https://grommunio.com | Data Protection | Legal notice