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

Many mails flash to white after opening #950

Closed
wout opened this issue Sep 5, 2023 · 20 comments · Fixed by #982
Closed

Many mails flash to white after opening #950

wout opened this issue Sep 5, 2023 · 20 comments · Fixed by #982

Comments

@wout
Copy link

wout commented Sep 5, 2023

What Happened?

It happens very often that after opening a mail it shows for a split-second, but then turns completely white. It also happens with emails from senders where it didn't happen on previous mails (e.g. Collosal).

image

Closing and re-opening mail does not help, nor does it change which email turns white and which one doesn't. That's always consistent.

2023-09-05-18:02:38.391749663.mkv.tar.gz

Printing the email does work.

Steps to Reproduce

  1. Click on mail
  2. It loads and shows
  3. It flashes completely to white

Expected Behavior

Mail content should not flash to white.

OS Version

7.x (Horus)

Software Version

Latest release (I have run all updates)

Log Output

This is from the syslog, but it also and happens with mails that do load so I'm not sure if it's useful:

Sep  5 20:07:51 Framey io.elementary.m[786301]: MessageListItem.vala:509: Not Found
Sep  5 20:07:51 Framey xdg-desktop-por[2656]: Realtime error: Could not map pid: Could not determine pid namespace: Could not find instance-id in process's /.flatpak-info

Hardware Info

         eeeeeeeeeeeeeeeee            wout@Framey 
      eeeeeeeeeeeeeeeeeeeeeee         ----------- 
    eeeee  eeeeeeeeeeee   eeeee       OS: elementary OS 7 Horus x86_64 
  eeee   eeeee       eee     eeee     Host: Laptop (12th Gen Intel Core) A8 
 eeee   eeee          eee     eeee    Kernel: 6.2.0-31-generic 
eee    eee            eee       eee   Uptime: 1 day, 7 hours, 27 mins 
eee   eee            eee        eee   Packages: 1922 (dpkg), 69 (flatpak) 
ee    eee           eeee       eeee   Shell: bash 5.1.16 
ee    eee         eeeee      eeeeee   Resolution: 3000x2000 
ee    eee       eeeee      eeeee ee   DE: Pantheon 
eee   eeee   eeeeee      eeeee  eee   WM: Mutter(Gala) 
eee    eeeeeeeeee     eeeeee    eee   Theme: io.elementary.stylesheet.mint [GTK3] 
 eeeeeeeeeeeeeeeeeeeeeeee    eeeee    Icons: elementary [GTK3] 
  eeeeeeee eeeeeeeeeeee      eeee     Terminal: io.elementary.t 
    eeeee                 eeeee       CPU: 12th Gen Intel i7-1280P (20) @ 4.700GHz 
      eeeeeee         eeeeeee         GPU: Intel Alder Lake-P 
         eeeeeeeeeeeeeeeee            Memory: 14822MiB / 64003MiB 
@wout
Copy link
Author

wout commented Sep 8, 2023

It seems to be related to images. I've turned off Always Show Remote Images, and can now read the emails. But as soon as I hit the Show Images button in the yellow banner at the top of the message viewer, the email flashes to white.

@leolost2605
Copy link
Member

Hmm that seems strange. If you've got a non sensitive message it would be great if you could forward it to leolost@gmx.net or upload the source here (using evolution or geary you can download the source of the mail).
Apart from that if you scroll all the way down does something show up there? Or is there by any chance a way to scroll within the message?

@wout
Copy link
Author

wout commented Sep 10, 2023

I've forwarded two of the affected emails.

Yes, I can scroll all the way down. So it's as if the whole email is there, but the content is completely white. This is all the way scrolled down (four pulls on the trackpad):

image

@wout
Copy link
Author

wout commented Sep 12, 2023

I've now evaluated it a bit longer, and it's happening consistently with the same newsletters:

@wout
Copy link
Author

wout commented Sep 18, 2023

Another newsletter with this issue: https://www.designboom.com/

@jeremypw
Copy link

I am experiencing something similar except I can see parts of the message. It has started happening in the last couple of weeks. Turning of show images does not help. Also if I press "Reply" to bring the message up in a separate window, I can read the whole message.

@wout
Copy link
Author

wout commented Oct 19, 2023

Also if I press "Reply" to bring the message up in a separate window, I can read the whole message.

Same here. Hitting reply is the only way right now to read the messages.

@jeremypw
Copy link

jeremypw commented Oct 19, 2023

I do not normally develop on Mail but I have had a look at the code and suspect this is a WebKit/WebView issue (or maybe the way we are configuring/using it) resulting in it not being able to properly display the mails produced by the latest email clients (which are stuffed with a lot of complex html). When replying WebView provide a stripped down version of the mail for quoting which can be displayed without problem.

@tintou Are you able to shed any light on this?

@jeremypw
Copy link

Evolution had a similar problem here https://discourse.gnome.org/t/evolution-email-bodies-not-shown-anymore/15219
apparently due to a WebKit update causing a regression.

@jeremypw
Copy link

Looks like we do not have a new enough version of libedataserver to allow use of later versions of webkit. We have version 3.44 which means version 4.0 of webkit is used, not 4.1 or 6.0.

@wout
Copy link
Author

wout commented Oct 25, 2023

Just now, I came across an email where only part of the content is shown:

image

@Ewertonios
Copy link

It's been happening to me too.

mail.webm

image

@leolost2605
Copy link
Member

leolost2605 commented Nov 5, 2023

So I did some investigation and I think the issue is caused by how the scrolled window and the webview interact. It is AFAIK the only major difference between the composer webview and the one in the messagelistitem apart from some minor html stuff. Also for me this issue didn't happen when I made the window big enough so that no scrolling was needed for the whole message to be displayed. Maybe you could try that as well for a short message?
I've got no idea how/if we can fix this though :(

@Ewertonios
Copy link

If the message is short, the problem doesn't occur.

image

For me, this only happens with messages that I need to scroll through.

@jeremypw
Copy link

A little more investigating indicates that the problem is deeper than the scrolled window - the web-view used in the message list does not interact properly with a simple container when it is resized with a Paned. I also notice that in the message list the webview does not honor the system dark setting whereas in the Composer widget it does. I'll try to look into this further when I have time.

@leolost2605
Copy link
Member

I also notice that in the message list the webview does not honor the system dark setting whereas in the Composer widget it does

Just a little note here this is because in the composer we use our own html and do it there, AFAIK the webview can't do anything about the theme

@enBonnet
Copy link

Same problem here, this is actually happening in the browser too.

@leolost2605
Copy link
Member

A workaround currently is to run mail with
WEBKIT_DISABLE_COMPOSITING_MODE=1 io.elementary.mail
which fixes the issue but disables hardware accelerated rendering AFAIK.
For the content of most mails this should be fine though

@leolost2605
Copy link
Member

If you want to permanently do this navigate to system settings -> applications -> startup apps
There disable (important disable and don't delete!) the entry for mail and then add a new entry with the custom command:
WEBKIT_DISABLE_COMPOSITING_MODE=1 io.elementary.mail --background via the + button in the bottom toolbar

@janxkoci
Copy link

It does work, thanks @leolost2605! I tested with values 1 and 0 and with value 1 the emails render properly. I tried multiple longer emails, even with graphics etc (company emails, newsletters, etc).

I'm using Geary at the moment, which works without issues, but it's good to know about other options. Hope the issue will get fixed soon and we won't need workarounds.

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.

6 participants