Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on OpenBSD 7.3 - php 8.2 #5

Closed
draga79 opened this issue May 6, 2023 · 7 comments · Fixed by #7
Closed

Error on OpenBSD 7.3 - php 8.2 #5

draga79 opened this issue May 6, 2023 · 7 comments · Fixed by #7

Comments

@draga79
Copy link

draga79 commented May 6, 2023

Describe the bug
When using the Zimbra Backend and syncing contacts with the iPhones, the contact sync stops and restarts at around 60. The error log prints an error.

Expected behavior
Correct syncing

Logs
"PHP message: PHP Fatal error: Uncaught Error: Attempt to assign property "flags" on bool in /z-push/lib/default/diffbackend/exportchangesdiff.p
hp:163"

Server (please complete the following information):

  • OS: OpenBSD 7.3
  • PHP Version: 8.2

Smartphone (please complete the following information):

  • Device: iPhone 13 Pro Max
  • OS: iOS 16.4.1
  • Mail App Apple Mail

Additional context

As a workaround, I've modified that part this way:

if (is_object($message)) {
$message->flags = (isset($change["flags"])) ? $change["flags"] : 0;
}

But I'm not sure it's ok. It seems to be working and contact sync finishes.

@matidau
Copy link
Collaborator

matidau commented May 14, 2023

Thanks for raising this.

Which version of Zimbra are you running and do you know if it isthe Synacor or the Zextra build?

@matidau matidau linked a pull request May 17, 2023 that will close this issue
@matidau
Copy link
Collaborator

matidau commented May 17, 2023

Hi @draga79,

Can you test out the changes to see if these work for you as well?

d76a9ab

@draga79
Copy link
Author

draga79 commented May 17, 2023

Hello, it's on Zimbra 8.8.15, Zimbra backend. I'll be testing it and report back ASAP. Thank you!

@draga79
Copy link
Author

draga79 commented May 18, 2023

Hi @matidau,

I want to confirm that your patch has resolved the issue I described. Thank you!

I have noticed another problem, but I believe it is more related to the Zimbra Backend. On my iPhone, everything appears to be functioning correctly. However, on Android (using the Nine mail client), I am unable to download or open attachments. Instead, I receive the following error message:

"Fatal error: /z-push/backend/zimbra/zimbraHttpStreamWrapper.php:111 - Uncaught TypeError: fread(): Argument #1 ($stream) must be of type resource, bool given in /z-push/backend/zimbra/zimbraHttpStreamWrapper.php:111"

Should I report this issue to the Zimbra Backend developers?

Thank you,
Stefano

@liverpoolfc-fan
Copy link
Contributor

@draga79

Are you using the latest codebase for z-push from here, or using the fix posted on the Z-Push Zimbra Backend sourceforge ticket?

If code from here then I believe you shouldn't experience that problem.

If you used my old fix from the Sourceforge site - please see a correction I just made to it. https://sourceforge.net/p/zimbrabackend/support-requests/185/#934b

Only the STREAMER_TYPE_STREAM_ASPLAIN type should use the resource converter. Using it on STREAMER_TYPE_STREAM_BASE64 broke downloads of attachments. Uncomment the original line for that and delete the three lines that were added.
-OR-
As Z-Push now has a new maintainer, you could choose to throw away these two unofficial mods and download the latest Z-Push code from https://github.com/Z-Hub/Z-Push

@draga79
Copy link
Author

draga79 commented May 18, 2023

@liverpoolfc-fan

Yes, it is happening with the codebase pulled from here today via "git clone".

@matidau
Copy link
Collaborator

matidau commented May 18, 2023

I've created a separate issue for this. #8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants