After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 727686 - Drafts : saved multiple times
Drafts : saved multiple times
Status: RESOLVED FIXED
Product: geary
Classification: Other
Component: composer
0.6.x
Other Linux
: Normal normal
: ---
Assigned To: Geary Maintainers
Geary Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-04-05 22:21 UTC by jon richter
Modified: 2017-10-26 01:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Log file with writing a email where drafts are saved and left after sending. (613.94 KB, text/x-log)
2014-04-29 16:36 UTC, Sébastien Pierre
Details
My tentative to log the multiple drafts problem, but geary worked right... attaching anyway (403.55 KB, text/x-log)
2014-09-28 13:21 UTC, Davi
Details

Description jon richter 2014-04-05 22:21:17 UTC
If I draft an e-mail, the IMAP-Drafts folder would fill up with many, if not all, incremental states of the text.

They stay after sending.

If such a draft remains and belongs to a conversation, it's impossible to delete only this message.

This is very unconvenient for daily use.

I can reproduce this behaviour on Fedora 20 / GNOME 3.12.
Comment 1 Jim Nelson 2014-04-09 23:46:51 UTC
What email service are you using?
Comment 2 jon richter 2014-04-10 11:59:23 UTC
IT's a self-maintained Plesk'ish Postfix. Would you need more detail?
Comment 3 Jim Nelson 2014-04-10 19:38:58 UTC
I suspect them problem you're seeing is fixed with bug #713983.  Is it possible for you to run Geary out of master?  That would verify if the patch fixes your problem.
Comment 4 jon richter 2014-04-11 00:43:29 UTC
I might try that on saturday. I might also have to recompile GNOME, so that could be done in a swipe.
Comment 5 Sébastien Pierre 2014-04-23 17:43:47 UTC
I have the same problem with Gmail (Google Apps) as IMAP server. When writing an email, multiple drafts are saved and persisted -- I usually get 8 drafts per email I write, so I guess a new draft is created every 10s. As I have to manually remove the drafts, this bug prevents me from using Geary to write emails (but it's really great for reading).
Comment 6 Jim Nelson 2014-04-23 19:27:47 UTC
Sebastien, what version of Geary are you running?  Can you run Geary like this from a terminal:

$ geary --debug --log-network > geary.log

and mail the log file to geary@yorba.org?
Comment 7 itsjustarumour 2014-04-27 18:27:24 UTC
I'm seeing the same problem as sebastien.pierre@gmail.com in Comment #5 when using GMail. I also experienced as many as 8 drafts for a single email.

I'm running the latest version 201404212102~0.6.0+1345~ubuntu14.04.1 from the Yorba Daily Builds PPA at http://ppa.launchpad.net/yorba/daily-builds/ubuntu

I've just tried running Geary with geary --debug --log-network > geary.log, and of course "sods law" dictates the issue has disappeared!  I'll monitor this for the next couple of days though, and if I can capture the output I'll post up my geary.log file

Really enjoying using Gearing at the moment, looking forward to the implementation of more features but liking what I'm seeing so far! :)
Comment 8 Sébastien Pierre 2014-04-29 16:36:14 UTC
Created attachment 275434 [details]
Log file with writing a email where drafts are saved and left after sending.
Comment 9 Sébastien Pierre 2014-04-29 16:39:43 UTC
I managed to reproduce the problem, and here is the attached log. Here's what I've noticed:

- the "drafts" counter oscillates between 1 and 2 while writing, so it would seem as if a new draft was created instead of updating the current one (I have no idea if that is possible with IMAP)
- it doesn't happen all the time, but most of the time.
- in most cases, multiple drafts are left.

Many thanks!
Comment 10 Jim Nelson 2014-05-06 20:52:31 UTC
(In reply to comment #9)
> - the "drafts" counter oscillates between 1 and 2 while writing, so it would
> seem as if a new draft was created instead of updating the current one (I have
> no idea if that is possible with IMAP)

IMAP doesn't allow for updating an email, so what you're seeing is consistent with Geary's design: upload the new draft then delete the old one.

> - it doesn't happen all the time, but most of the time.
> - in most cases, multiple drafts are left.

Unfortunately the log indicates that everything is working correctly at the network level, that is, the new draft is being saved and the old draft is being deleted.  The fact that the counter oscillates between 1 and 2, while not aesthetically pleasing, also indicates the save-drafts mechanism is working.

I'm curious, if you close Geary and re-open it, do you still see all the draft messages in the Drafts folder?  You might need to wait a minute or two for Geary to re-synchronize in the background.
Comment 11 Gustavo Rubio 2014-06-16 23:31:31 UTC
I too have this issue, however something wierd happened on my end. Using gmail Geary would save an awful lot of drafts, there was a message with as much as 47 drafts, given that I kept the composer open, this happens with 0.7 or master if you will.

I deleted the drafts from geary, and they were not showing up anymore on gmail web app, however, on my nexus tablet they did showed up still, so I went again to the drafts folder in gmail web app and noticed that no drafts were there, yet, the tablet had all these drafts, a lot of them, for at least half emails I sent in a lapse time of 4 weeks that I been testing geary. I deleted the gmail app cache and data from the android settings to no avail, the drafts has to be discarted manually for each message.

I will try to reproduce it as soon as I have time and will try to log anything. I think this is an important issue because if you use geary a lot you'll end up with lots of drafts, worst case scenario, drafts "appended" to gmail messages which are not actually in the drafts folder but yet appear on the gmail message list. I deleted probably a handful 150 drafts, no joke. This took me a lot of time but that's the price of living on the bleeding edge of a piece of software.

I did some more testing later that day and tried my "good 'ol" IMAP/SMTP personal account which is hosted on my shared server and had this behaviour too.
Comment 12 Jim Nelson 2014-06-17 19:32:10 UTC
What you're seeing is described in bug #726728.  Geary master now allows users to turn off saving drafts just to work around this problem.
Comment 13 Davi 2014-09-28 12:53:38 UTC
I am having this problem with geary-0.8.0 and a Gmail account. I'm attaching the geary.log as per comment#6.

After quitting Geary and reopening, I see multiple editable drafts in the conversation, plus one extra copy of the draft in the end that does not have the "edit draft" button.

Also, while I'm at it, when clicking the "edit draft" button, the inline composer is created too small (but this is probably content for another bug, i guess).
Comment 14 Davi 2014-09-28 13:15:19 UTC
I've just noticed that the behavior is not consistently faulty. When I tried to create the log, the old drafts started to be properly removed.
Comment 15 Davi 2014-09-28 13:21:55 UTC
Created attachment 287290 [details]
My tentative to log the multiple drafts problem, but geary worked right... attaching anyway
Comment 16 Davi 2014-09-28 13:29:04 UTC
Those non-editable drafts aeem to be kept permanently in the conversation. They are not saved on Gmail, though. So, my test conversation has 5 messages on geary, 2 of which are drafts that cannot be edited. In Gmail, initially the conversation shows 3 messages, but it points that there are messages in the trash that belong to that conversation. Clicking to show these messages bring those 2 drafts ready for editing. So, it seems some drafts are being discarded to the trash in the server.

(sorry sor the spam, last message)
Comment 17 Federico Bruni 2016-11-04 15:47:09 UTC
I'm running geary master:
0.11.0+465~g1b80419

Since Monday, one of my two accounts - let's call it account 2, has lots of drafts saved (now 88). I can see 10 conversations in the drafts folder, so each has about 9 drafts saved.

The other account - account 1 - is not affected at all.
Comment 18 Michael Gratton 2016-11-15 04:42:47 UTC
(In reply to Federico Bruni from comment #17)
> I'm running geary master:
> 0.11.0+465~g1b80419
> 
> Since Monday, one of my two accounts - let's call it account 2, has lots of
> drafts saved (now 88). I can see 10 conversations in the drafts folder, so
> each has about 9 drafts saved.
> 
> The other account - account 1 - is not affected at all.

Hmm, now we're actually saving drafts most of the time when it's enabled, maybe we're triggering other bugs.

Can you say what type (generic, GMail, …) the three accounts are, and if generic if you know what IMAP server software they are running?
Comment 19 Federico Bruni 2016-11-15 06:20:50 UTC
I have two accounts.
The account which works uses Dovecot for sure.
The account which doesn't work is on Webfaction server. According to this old question, they use Dovecot as well:
https://community.webfaction.com/questions/2674/what-is-webfactions-mail-server-software-dovecot-cyrus-etc

but I might double-check and ask them
Comment 20 Federico Bruni 2016-11-15 10:38:25 UTC
Webfaction confirms that they are running Dovecot 1.0.7.
If you need more info from them, let me know.

There's only one "peculiarity" of this account: the username is different from the email address. (in case it matters)
Comment 21 Federico Bruni 2016-11-21 16:44:48 UTC
Well, special folders are defined in the web interface. Both accounts use Roundcube, but different versions:

- account 1 uses Roundcube version 1.2.1
- account 2 (webfaction) uses Roundcube version 1.2.2

Don't know if this is relevant...
Comment 22 Michael Gratton 2016-11-21 23:50:36 UTC
Federico, does account 2 still accumulate multiple copies of drafts after the last changes to Bug 747627?

If so, and if you can easily reproduce the problem, can you try enabling network logging, open a composer and cause multiple draft copies to be created, redact personal information from the log file, and attach it here (or send to me)?

I.e.: 

> geary -d --log-network | tee geary.out

Thanks!
Comment 23 Federico Bruni 2016-11-22 12:20:17 UTC
For the records, account 2 never saves drafts anymore after the last changes to Bug #747627.
I'll try to run with network logging enabled and report to the mailing list.
Comment 24 Michael Gratton 2017-01-28 04:26:02 UTC
Hmm, so where are we at with this? We know GMail still has issues and hence we have configurable support (i.e. Bug 726728) - but what about other servers? Anyone else still see this on non-google servers?

Federico, IIRC your Account #2 was suffering from the lack of UIDPLUS support on the server (i.e. Bug 775263). Does your Account #1 still show this problem?
Comment 25 Federico Bruni 2017-01-31 17:32:25 UTC
Now account 2 has UIDPLUS support, so it behaves correctly as account 1.

I noticed that each time I save a draft manually (by clicking on the Save icon), the message in the drafts folder disappears for a moment and then reappears.
Comment 26 Michael Gratton 2017-10-26 01:17:32 UTC
Closing this since the outstanding issues are covered by other bugs.