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!