the-djmaze / snappymail

Simple, modern & fast web-based email client
https://snappymail.eu
GNU Affero General Public License v3.0
966 stars 114 forks source link

Can't display some messages #1209

Closed yasuhirokimura closed 7 months ago

yasuhirokimura commented 1 year ago

Recently I've been facing the issue that SnappyMail can't display some messages. Following is an example of such ones.

https://lists.freebsd.org/archives/dev-commits-ports-all/2023-July/072697.txt

If I crick such message, then it is displayed in message area in a instant but "Unknown error" is displayed as following.

SnappyMail mail unknow-error

I have following two instances of SnappyMail.

  1. FreeBSD 13.2-RELEASE amd64, PHP 8.2.8, Apache 2.4.57, SnappyMail 2.28.4
  2. Debian 11.7 amd64, PHP 7.4.33, Apache 2.4.56, SnappyMail 2.28.4

And if I try to dispaly the message in question on the same IMAP server. The issue happens with instance 1 but not with instance 2. So it may be related to PHP version.

yasuhirokimura commented 1 year ago

I use Avatars plugin and the issue disappears if I disable it. As I wrote above I have instance with PHP 7.4. And the issued doesn't happen even if I enable Avatars plugin on it. So the source may be combination of PHP 8.2 and Avatars plugin.

yasuhirokimura commented 1 year ago

I made another instance of SnappyMail with following conditions.

And the issue doesn't happen even if I enabled Avaters plugin. So there may be no relation between the issue and PHP version.

bziman commented 12 months ago

I'm having the same issue after updating my server to Ubuntu 22.04.3 LTS - which updated PHP from 7.x to 8.1.2. (All SnappyMail extensions are disabled.)

bziman commented 12 months ago

After enabling logging, I found the culprit:

Error: Class "DOMDocument" not found in .../snappymail/v/2.11.0/app/libraries/MailSo/Base/HtmlUtils.php:97

Turns out, the system update ate the xml-dom package. I was able to resolve the issue by (re?)installing that:

apt-get install php-dom

the-djmaze commented 12 months ago

And on Centos / Fedora / Red Hat:

yum install php-xml

yasuhirokimura commented 11 months ago
  1. The system in question is FreeBSD.
  2. Both php82-dom and php82-xml are installed in it.
  3. As I previsouly wrote, the issue happens only if Avatars plugin is installed and enabled.
  4. I enabled logging but no error message is written when the problem happens.

So I think my case is different from yours.

the-djmaze commented 11 months ago

With PHP 8.2.1 i have no issues. Could it be related to enabled BIMI or Gravatar setting?

yasuhirokimura commented 11 months ago

Before facing the issue I used Avaters plugin with following setttings.

  1. Identicon: Name characters else silhouette
  2. Enable "Preload valid domain icons"
  3. Enable "Delay lookup"
  4. Enable "BIMI"
  5. Enable "Gravatar"

So I disabled 4 and 5. Then the problem disappears.

yasuhirokimura commented 11 months ago

Though I'm not sure if it is releated, I found odd behavior of Avaters plugin while investigating the issue.

As I wrote above, currently I use Avaters plugin with following setttings.

  1. Identicon: Name characters else silhouette
  2. Enable "Preload valid domain icons"
  3. Enable "Delay lookup"
  4. Disable "BIMI"
  5. Disable "Gravatar"

And with this settings avater is displayed if I open messages that come from amazon.com, github.com, google.com, etc.

It doesn't happen if I disable "Delay lookup".

Is it expected behavior?

the-djmaze commented 8 months ago

So the source may be combination of PHP 8.2 and Avatars plugin.

I think i fixed it for next release. There was a problem with the json.after-* hooks. The $aResponse array wasn't recursive as the result wasn't converted to json yet.

the-djmaze commented 8 months ago

Any luck with v2.31.0?