Closed Bug 782490 Opened 12 years ago Closed 11 years ago

Drafts folder damaged after returning from offline

Categories

(MailNews Core :: Networking: IMAP, defect)

defect
Not set
critical

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: u328142, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: dataloss)

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:14.0) Gecko/20100101 Firefox/14.0.1
Build ID: 20120713134347

Steps to reproduce:

I created a draft message while working offline, then returned online, then attempted to access the Drafts folder, but the Drafts folder seems damaged/inaccessible.

Steps to reproduce using mail account via IMAP connection:
 - access Drafts folder to confirm current contents and working

 - create new message with subject Test 1, save draft, close without sending
 - access Drafts folder to confirm Test 1 message appears correctly

 - Select File -> Offline -> Work Offline
 - access Drafts folder to confirm Test 1 message appears correctly

 - create new message with subject Test 2, save draft, close without sending
 - access Drafts folder to confirm Test 1 & Test 2 messages appear correctly

 - Deselect File -> Offline -> Work Offline
 * access Drafts folder to confirm Test 1 & Test 2 messages appear correctly

At this point the Drafts folder is displayed with Test 1 and Test 2 messages, but the icon starts twirling showing TB is busy doing something.

 - Right-click on Drafts folder, Properties, Repair Folder doesn't seem to clear the problem.

 - Restart TB
 - Accessing Drafts folder still has same problem
 - Right-click on Drafts folder, Properties, Repair Folder - this fixes the busy icon, however the Test 2 message no longer appears.


Actual results:

Drafts folder doesn't correctly display all draft messages and the busy icon is displayed for a long time after attempting to access the Drafts folder.


Expected results:

Drafts folder should be displayed correctly, busy icon should only be displayed for a very short period of time.

Possibly related to:
 - https://bugzilla.mozilla.org/show_bug.cgi?id=274800
 - https://bugzilla.mozilla.org/show_bug.cgi?id=775093
but these issues didn't seem identical.
The same problem occurs for:
- Kubuntu 12.04  64bit - Thunderbird 14
- Windows 7      64bit - Thunderbird 14
A synchronize/download operation reported the following warning/error:
 The current operation on 'Drafts' did not succeed. The mail server for account xyz@test.com responded: Error in IMAP command UID FETCH: Invalid uidset.
Increasing the Importance to Major as this occurs on a regular basis and renders Thunderbird somewhat unusable.
Severity: normal → major
Following was observed with Tb 15.0.1.
(0) For ease of test, no mail was held in Drafts folder.
    Offline-Use=On was set for Drafts folder.
(1) While Work Ofline mode, old version of draft mail(which was saved during this Work Offline mode) was not deleted by Save as draft. This is a phenomenon of bug 638358.
(2) "Order Received" value of draft mail which was saved during Work Ofline mode was offset of the mail in offline-store file.
This is different from bug 638358(negative value of 32bits signed integer is shown as 32bits unsigned integer).
(3) Due to (2), if file size of Drafts(not Drafts.msf) is ZERO, "Order Received" column value of first draft mail becomes ZERO.
(4) When went back to Work Online mode, Tb didn't send requests to upload draft mail generated during Work Offline mode.
(5) If Drafts is opened again(click IMAP account then click Drafts at folder pane), "* 0 EXIST, * 0 EXPUNGE" is returned. Then any draft mail generated during Work Offline mode is removed by this re-sync process, because mail of corresponding UID doesn't exist at server.
(6) Exception in (5) is mail of "Order Received column value=0".
Tb didn't remove mail of "Order Received column value=0 == corresponds to UID=0 " after re-sync by (5).
If delete of the mail of UID=0 is requested, Tb issued "uid store 0 +Flags (\Deleted)". So, ordinal IMAP server rejected it("BAD Could not parse command" if Gmail IMAP), but Yahoo! IMAP server retured OK to "uid store 0"(may be a workaround of bug of many mail Apps on Smart Phone).

Confirmig.
 
Above (2) and (4) is perhaps a mismatch between following after some changes.
(a) draft save logic while Work Offline mode
(b) re-sync logic when going back to Work Online.
Severity: major → critical
Status: UNCONFIRMED → NEW
Component: Folder and Message Lists → Networking: IMAP
Ever confirmed: true
Keywords: dataloss
Product: Thunderbird → MailNews Core
(In reply to Daniel McLean from comment #2)
> A synchronize/download operation reported the following warning/error:
>  The current operation on 'Drafts' did not succeed. The mail server for
> account xyz@test.com responded: Error in IMAP command UID FETCH: Invalid
> uidset.

Show "Order Received" column to know UID of mails, and get IMAP log with timestamp for the fetch error, please. (see bug 402793 comment #28)
Summary: Drafts folder damaged after returning from offline → Drafts folder damaged after returning from offline(draft created during offline mode is not uploaded by returning to online mode, then is removed by next re-sync of Drafts folder)
OS: Windows 7 → All
Hardware: x86_64 → All
Summary: Drafts folder damaged after returning from offline(draft created during offline mode is not uploaded by returning to online mode, then is removed by next re-sync of Drafts folder) → Drafts folder damaged after returning from offline(draft created during offline mode is not uploaded by returning to online mode, then it's removed by next re-sync of Drafts folder)
Summary: Drafts folder damaged after returning from offline(draft created during offline mode is not uploaded by returning to online mode, then it's removed by next re-sync of Drafts folder) → Drafts folder damaged after returning from offline(draft created during offline mode is not uploaded by returning to online mode, then it's removed by next re-sync of IMAP Drafts folder)
FYI.
bug 638358 is for phenomenon in Tb 3.
bug 397910 and duped bugs is for phenomenon in older Tb than Tb 3.
Summary: Drafts folder damaged after returning from offline(draft created during offline mode is not uploaded by returning to online mode, then it's removed by next re-sync of IMAP Drafts folder) → Drafts folder damaged after returning from offline
Blocks: tb-drafts
Since bug 805626 is fixed, I cannot reproduce the steps in Comment 0. Do the more technical issues you described in Comment 4 still exist or can we close this bug?
Flags: needinfo?(m-wada)
I retested my steps from Comment 0 using TB 17.0.6/Linux and couldn't repeat it, thanks all.
Status: NEW → RESOLVED
Closed: 11 years ago
Flags: needinfo?(m-wada)
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.