I uploaded all my sync logs to grok and it came back with this. I'm not sure I'm comfy doing this code change but it might help someone.
The sync issues you're experiencing with the user ******** (and potentially related users like ********* based on the logs) are caused by a known bug in Grommunio's PHP-MAPI library, specifically in the class.meetingrequest.php file at line 1982. This manifests as a TypeError where mapi_getprops() receives a boolean false (instead of a valid MAPI resource), leading to fatal crashes during ActiveSync processing of calendar items or meeting requests.
This is a widespread issue reported in the Grommunio community (e.g., after migrations from Exchange), affecting sync reliability on mobile devices.
Immediate Workaround: Apply the Code Patch
Edit /usr/share/php-mapi/class.meetingrequest.php to add a null check in the openCustomUserStore() method (around lines 1975–1985). This prevents passing false to mapi_getprops() and allows sync to continue without crashing:
phppublic function openCustomUserStore($ownerentryid) {
$ab = mapi_openaddressbook($this->session);
try {
$mailuser = mapi_ab_openentry($ab, $ownerentryid);
if (!$mailuser) { // Add this check
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);
}
How to Apply: Backup the file first (cp /usr/share/php-mapi/class.meetingrequest.php /usr/share/php-mapi/class.meetingrequest.php.bak), apply the change, then restart Apache/PHP-FPM (systemctl restart apache2 or equivalent) and clear any active sync sessions on the iOS device (remove/re-add the account).
Caveat: One user reported a follow-up "Undefined constant 'mailuser'" error after patching—double-check indentation and variable names if it occurs.
This restores full sync without data loss and has resolved the issue for multiple users.