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

Nextcloud App refuse to load after upgrade of PHP version to 8.2 #1238

Closed
baumkirchner opened this issue Sep 3, 2023 · 6 comments
Closed
Labels
needs feedback Further information is requested

Comments

@baumkirchner
Copy link

Describe the bug
After upgrading PHP version to 8.2 Snappymail refuses to load, showing this message:

An error occurred.
Please refresh the page and try again.TypeError: Decoding failed.

Refreshing the page does not change anything.
Neather the Nextcloud log nor the log of PHP 8.2 are containing any entries about this issue.

To Reproduce

  1. Upgrade PHP version to 8.2 resp. switch Nextcloud's domain to use PHP 8.2
  2. Log into Nextcloud
  3. Try to launch Snappymail or the Snappymail admin panel
  4. See error
  5. Switch Nextcloud's domain back to PHP 8.0
  6. See Snappymail app loading as usual

Expected behavior
The Snappymail app resp. its admin panel should load as usual

Please complete the following information:

  • Browser: Firefox 114, Chromium 112
  • IMAP daemon: external IMAP server
  • PHP version: 8.2.10
  • Mode: nextcloud
  • SnappyMail Version: 2.28.4
  • Nextcloud Version: 27.0.2
  • Webserver: nginx

Debug/logging information
Unfortunately neather the Nextcloud log nor the log of PHP 8.2 are containing any entries about this issue.
Unfortunately in the Nextcloud app of Snappymail logging can not be enabled as described here

@MI-KY
Copy link

MI-KY commented Sep 8, 2023

Unfortunately in the Nextcloud app of Snappymail logging can not be enabled as described here

Debugging the Nextcloud Integration of SnappyMail should work as described here: https://github.com/the-djmaze/snappymail/tree/master/integrations/nextcloud/snappymail#how-to-activate-snappymail-logging-and-then-find-logs . Or did you tried this and it does not work anymore like described?

@baumkirchner
Copy link
Author

Thank you @MI-KY for the hint resp. debugging of the nextcloud app.
Switching debugging on and the log level to 7 outputs the following:

[2023-09-08 19:13:17.043][0c044175] [INFO]: [SM:2.28.4][IP:149.34.244.131][PID:85466][nginx/1.24.0][fpm-fcgi][Streams:tcp,udp,unix,udg,ssl,tls,tlsv1.0,tlsv1.1,tlsv1.2,tlsv1.3][GET https://xxxxxx.yyyyyyy.zz/apps/snappymail/]

[2023-09-08 19:13:18.625][0c044175] [INFO]: Memory peak usage: 12MB

[2023-09-08 19:13:18.625][0c044175] [INFO]: Time delta: 2.9731919765472]

[2023-09-08 19:13:19.260][d0ba6ba1] [INFO]: [SM:2.28.4][IP:149.34.244.131][PID:85940][nginx/1.24.0][fpm-fcgi][Streams:tcp,udp,unix,udg,ssl,tls,tlsv1.0,tlsv1.1,tlsv1.2,tlsv1.3][GET https://xxxxxx.yyyyyyy.zz/apps/snappymail/?/AppData/0/2948471016930554/]

[2023-09-08 19:13:19.373][d0ba6ba1] PLUGIN[INFO]: Hook: filter.app-data

[2023-09-08 19:13:19.374][d0ba6ba1] APPDATA[INFO]: {"Auth":false,"title":"Snappymail","loadingDescription":"Snappymail","Plugins":[],"System":{"version":"2.28.4","token":"aighe8ji4reeR7ooshot1iev4aeloo1yie6Ro9ei","languages":["ar-SA","bg-BG","cs-CZ","da-DK","de-DE","el-GR","en","en-GB","eo","es-ES","et-EE","eu","fa-IR","fi-FI","fr-FR","hu-HU","id-ID","is-IS","it-IT","ja-JP","ko-KR","lt-LT","lv-LV","nb-NO","nl-NL","pl-PL","pt","pt-BR","pt-PT","ro-RO","ru-RU","sk-SK","sl-SI","sv-SE","tr-TR","uk-UA","vi-VN","zh-CN","zh-TW"],"webPath":"\/apps\/snappymail\/app\/","webVersionPath":"\/apps\/snappymail\/app\/snappymail\/v\/2.28.4\/"},"allowLanguagesOnLogin":true,"DevEmail":"xxxx@yyyyyyy.zz","DevPassword":"","signMe":"DefaultOff","Theme":"Nextcloud@custom","language":"de-DE","userLanguage":"de-DE","PluginsLink":"Plugins\/0\/User\/993dc0f52cd32f10162cda34aed726f3\/","StaticLibsJs":"\/apps\/snappymail\/app\/snappymail\/v\/2.28.4\/static\/js\/min\/libs.min.js","Nextcloud":{"UID":"xxxx@yyyyyyy.zz","WebDAV":"https:\/\/xxxxxx.yyyyyyy.zz\/remote.php\/dav","CalDAV":false}}

[2023-09-08 19:13:19.867][d0ba6ba1] [INFO]: Memory peak usage: 12MB

[2023-09-08 19:13:19.867][d0ba6ba1] [INFO]: Time delta: 0.81934404373169

As far as i understand this output nothing gives a hint to the described PHP8.2 issue.

@cm-schl
Copy link

cm-schl commented Sep 25, 2023

Hi,
had some similar issue where nothing was inside the logs...
Have you looked inside the browser console?

@baumkirchner
Copy link
Author

Hi, had some similar issue where nothing was inside the logs... Have you looked inside the browser console?

This issue is about PHP version, especially PHP8.2, not about logging.
Please find information about logging here

@cm-schl
Copy link

cm-schl commented Sep 26, 2023

I understand - but as you can't see anything in the logs my suggestion was to have a look into the browser console where maybe something is reported.

Anyway, to give you some more feedback I've set up a new Nextcloud instance with v27.0.2 with PHP v8.2.10 and installed a fresh SnappyMail (v2.28.4) - I have no problems accessing and reading my mails. So maybe the problem arises from something else...

@the-djmaze
Copy link
Owner

the-djmaze commented Nov 22, 2023

So maybe the problem arises from something else...

Correct. Mostly it is double encoded (snappymail gzip + php/apache/nginx forced gzip, resulting in 2 times gzipped data).

Other times the servers has misconfiguration to output additional data before/after the content which results in partial encoded data so that decoding fails.

The browser console reveals this "PHP" issue.

@the-djmaze the-djmaze added the needs feedback Further information is requested label Nov 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs feedback Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants