question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Mutiple edits to draft isn't syncronised to IMAP (gmail)

See original GitHub issue

Expected behavior

Performing multiple editing sessions on a draft message in K9 should synchronise all changes to IMAP, allowing to start a message in K9 while on mobile to continue and finish it using an IMAP desktop client.

Actual behavior

The first draft saved from K9 is synchronised to IMAP, subsequent changes done using and present in K9 draft folder are not synchronised, the draft on IMAP remains the first saved.

Nothing I have attempted can trigger a message synchronisation, I have had IMAP drafts sitting stale for weeks; forcing K9 synchronisation, restarting K9, rebooting phone, resynchronising IMAP client. The remedy I resort to is either sending the mail to myself, or creating a new draft with copy-pasted contents.

This used to work but I have experienced this consistently since a recent K9 update (I remember upgrading from a release dated Nov 2019).

Steps to reproduce

  1. First edit; Write new mail with some contents (body=“Body”, subject=“Subject”), see screenshot 1
  2. Save as draft (back->Save as draft or menu->Save as draft), see screenshot 2
  3. Second edit; Reopen draft message, write some more text (“Additional body”), see screenshot 3
  4. Save as draft (back->Save as draft or menu->Save as draft), see screenshot 4
  5. Observe that only the first edit of the message is present in IMAP folder (fx. Thunderbird IMAP client or gmail.com web interface), see screenshots 5 & 6

Environment

  • K-9 Mail version: 5.717, see screenshot 7
  • Android version: 7.0, see screenshot 8
  • Account type (IMAP, POP3, WebDAV/Exchange): IMAP (gmail)
  • Phone model: Samsung Galaxy S8, SM-G950F

Screenshots

Done using Danish (dansk) locale. Quick parlour;

  • skrive = write
  • fra = from
  • til = to
  • kladder = drafts

1 - first edit

Screenshot_20200708-200114

1 - saved first edit

Screenshot_20200708-200128

3 - second edit

Screenshot_20200708-200231

4 - saved second edit

Screenshot_20200708-200239

5 - IMAP Thunderbird

Screenshot from 2020-07-08 20-04-57

6 - IMAP gmail web interface

Screenshot from 2020-07-08 20-03-39

7 - K9 version

Screenshot_20200708-184339

8 - Android version

Screenshot_20200708-191629

Log

Please take some time to retrieve logs and attach them here: k9-log_redacted.txt

This was redacted from the plain log using: sed -e s/example.com/"<redcated domain>"/g -e s/user/"<redacted user name>"/g k9-log.txt >k9-log_redacted.txt

First edit start: 2020-07-08T19:59:55+02:00 Second edit end: ~2020-07-08T20:02:00+02:00 Activity thereafter shows another unrelated draft being composed (for screenshots transfer).

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
cketticommented, Oct 13, 2020

I removed some code that I believed was unused. Turns out it was a very quirky mechanism that made replacing drafts on the server work. I’m not going to restore that code. Instead we’ll do it “the right way”. This is part of a larger effort and will take some time to complete.

0reactions
manne01commented, Nov 3, 2020

Just to confirm, it works since 5.724 - great work, thank you so much!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Mutiple edits to draft isn't syncronised to IMAP (gmail) #4871
Performing multiple editing sessions on a draft message in K9 should synchronise all changes to IMAP, allowing to start a message in K9 ......
Read more >
IMAP Sent & Draft Folders not sync with Stock Email App ...
The problem I have is with SENT emails & Draft Folder. Firstly, the phone email app doesn't sync sent items of the web...
Read more >
Gmail Drafts IMAP issue - Apple Community
When creating a draft in the Lion Mail app, it is saved to the "Drafts" folder on the Mail app, but winds up...
Read more >
Outlook 2013 + Gmail leads to many messages in drafts even ...
Now the Gmail Drafts folder will not be included in the IMAP synch. Auto-save in Outlook will still save your draft email in...
Read more >
The compose window saves multiple drafts per message in ...
When I'm typing an email, on each interval that a draft message should be written to the drafts folder, Thunderbird creates a new...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found