Empty email when opening K9-Mail (occasionally)
Expected behaviour
When I open K9-Mail, it should display the last message or some folder.
Actual behaviour
Sometimes I am prompted with an empty email, like this:

The date shown is clearly the zero of timestamp in UTC+1. The subject line is (No subject) and the text says no body text.
Steps to reproduce
I am not really sure, I think it happens when I open K9-Mail after a long time. Perhaps the garbage collector has moved some stuff out of the way?
Environment
K-9 Mail version: 5.008 Android version: 5.0.2 Account type (IMAP, POP3, WebDAV/Exchange): IMAP
I haven't k9 configured to show the last mail on start-up but I know how to reproduce: When you synchronize you messages and a mail's subject but not its content's preview is shown open the mail. Now you got an empty "(No subject)" mail you can't get rid of on this client.
I think I actually knew a way to get rid of the empty mail but I've forgotten how to do it :(
BTW: I've seen this behavior for quite some time (a year?) now.
That one sounds like a message synchronization bug @0xf10e , separate to @martin-ueding 's bug relating to GC or something.
I would make an uninformed guess and say my message synchronization bug is the underlying cause of his bug ;) If you want I can open a new issue.
Hmm maybe. I guess we can always try and reproduce his issue once we've fixed the outstanding issues with sync. Once #1174 lands I will probably do another round of improvements in that area.
I have an idea: perhaps it occurs when I leave displaying an email and delete that email using another client. Then the app still wants to show that email, but it has vanished on the server. I can try to reproduce that when I am home.
http://martin-ueding.de/#pk_campaign=Email
Sent from my mobile, please excuse my brevity.
Have the same issue, occurs when I open an email while its folder is still syncing. Sometimes returning to the list fixes it sometimes not and the email content can't be displayed anymore. Header only shows: Message-ID: [ID]@email.android.com Is there a workaround to resync this mail or folder?
I am using k9-mail since many years with no problems at all, and I like it vm. Since last updates I cannot see the content of the messages, even if I regularly receive the emails
I tried to Uninstaller and start all over again. Not solved the problem. I have Huawei mate 19 pro.
Steps to reproduce:
- Enable "Don't keep activities" in Android's developer settings
- Open a message in K-9 Mail
- Delete the message from the server
- Wait for K-9 Mail to sync that change (either through periodic polling or push)
- Switch to another app
- Switch back to K-9 Mail ⇒ empty message view screen is displayed
We currently don't update the message view screen when the state of the displayed message was changed on the server, e.g. when the read state was changed by another app. We should listen to changes to the message and update the view accordingly. When the message was deleted, we should return to the message list.
The app now automatically closes the message view when the message has been removed.