Closed Bug 510318 Opened 15 years ago Closed 15 years ago

Alert: The current command did not succeed. Fetched failure. (Gmail IMAP, NO Some messages could not be FETCHed (Failure), probably due to bad mail data

Categories

(MailNews Core :: Networking: IMAP, defect)

1.9.1 Branch
x86
All
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 517629

People

(Reporter: jonathanr.pritchard+bugzilla, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [has protocol logs])

Attachments

(6 files, 1 obsolete file)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.9.1.2) Gecko/20090803 Fedora/3.5.2-2.fc11 Firefox/3.5.2
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.1) Gecko/20090803 Fedora/3.0-3.6.b3.fc12 Thunderbird/3.0b3

I'm using a beta3 build of Thunderbird 3 with Enigmail 0.96a as my only extension.
I took it from Koji (Fedora).

I'm using it with my Gmail account and I've had this error pop up when retrieving messages or selecting a folder when I'm about to do a search on it.

It probably happens at least once a day for me, it's a common problem. I'm guessing it has something to do with the improved IMAP support, or something like that.

Reproducible: Sometimes

Steps to Reproduce:
1.Select the majority of folders in IMAP account for offline use.
2.Go offile.
3.Alert message will appear. Full text 'The current command did not succeed. The mail server responded:Some messages could not be FETCHed (Failure)'
Version: unspecified → Trunk
Is this happening on saved search folders ?
Summary: Error Message: Alert FETCHed Failure → Error Message: Alert Fetched Failure
I tried to create one, which I've never done before, however that too appeared to fail. Clicking the search-box drop-down and selecting 'save as search folder' did nothing that I could see.

It happened just as I was selecting 'All Mail' beneath my Google Mail main folder.
I'm changing this from Linux to All because I also saw this, albeit a hell of a lot less frequently on my Windows Thunderbird 2.x install on another computer.

To reiterate, I cannot use Thunderbird 3b3 without this happening at least once, often multiple times.
OS: Linux → All
Summary: Error Message: Alert Fetched Failure → Alert: The current command did not succeed. Fetched failure.
Another update, this does not appear to be a Thunderbird issue it is a Gmail server issue. However Thunderbird could handle it a bit more gracefully. Is there anyway to suppress these alerts?

A more thorough search on Google with the full alert text brings up talk of corrupt messages and hunting around for the correct UID to delete... all rather bonkers.
Jonathan if you think it's a gmail issue could you provide us with protocol logs (either pop or imap which ever you use) ? see https://wiki.mozilla.org/MailNews:Logging for information about getting the logs.
Attached file Extract from imap.log (obsolete) —
The problem occurs when either selection All Mail or Mailing List, if the corrupt message theory is correct then it is one of my mailing-list messages.

Hope this helps.
Component: General → Networking: IMAP
Product: Thunderbird → MailNews Core
QA Contact: general → networking.imap
Whiteboard: [has protocol logs]
Version: Trunk → 1.9.1 Branch
Are there many (or any) messages that were uploaded through IMAP?  I remember seeing a problem, several months ago, where uploaded messages were generating this error.
Sorry, uploaded? The issue only occurred after I was configuring my new Thunderbird install so I had to download all messages from the IMAP server (Gmail to my new client.

I've used multiple clients before, even on Linux and never run into this problem.

If there's any more questions or logs or anything, please just ask.

Thanks.
(In reply to comment #7)
> Extract from imap.log

Where can we see log data corresponds to next alert in log file you attached?
  The current command did not succeed. The mail server responded:
      Some messages could not be FETCHed (Failure)

Does alert occur upon each folder open(folder click) of "Mailing List" folder?
Or merely one-time failure when you created Gmail IMAP account and accessed the folder for the first time.
How many mails do you have in "Mailing List" folder via Gmail IMAP? What is total mail size?
How about "[Gmail]/All Mail" folder via Gmail IMAP?
(In reply to comment #9)
> Sorry, uploaded? The issue only occurred after I was configuring my new
> Thunderbird install so I had to download all messages from the IMAP server
> (Gmail to my new client.

The messages could have gotten into your account by normal SMTP arrival, through the mail fetcher from a POP3 server or by uploading them through IMAP.  Gmail have had occasional problems serving messages that had been uploaded through IMAP.
(In reply to comment #10)
> (In reply to comment #7)
> > Extract from imap.log
> 
> Where can we see log data corresponds to next alert in log file you attached?
>   The current command did not succeed. The mail server responded:
>       Some messages could not be FETCHed (Failure)
> 
> Does alert occur upon each folder open(folder click) of "Mailing List" folder?
> Or merely one-time failure when you created Gmail IMAP account and accessed the
> folder for the first time.
> How many mails do you have in "Mailing List" folder via Gmail IMAP? What is
> total mail size?
> How about "[Gmail]/All Mail" folder via Gmail IMAP?

I'm afraid I only arbitrarily cut the tail off the log file and attached that, it was ~8MB in size in it's original form but I can attach consecutive sections if you wish.

It occurs every time I left-click either "[Gmail]/All Mail" or "Inbox/Mailing List". The message count by Thunderbird (bottom-left corner of the screen) is 37507 and 53446 respectively.

(In reply to comment #11)
> (In reply to comment #9)
> > Sorry, uploaded? The issue only occurred after I was configuring my new
> > Thunderbird install so I had to download all messages from the IMAP server
> > (Gmail to my new client.
> 
> The messages could have gotten into your account by normal SMTP arrival,
> through the mail fetcher from a POP3 server or by uploading them through IMAP. 
> Gmail have had occasional problems serving messages that had been uploaded
> through IMAP.

I don't use, and have never used the POP3 feature of Gmail, which allows you to collate other email accounts into Gmail.

Again, any more questions feel free to ask and I'll attach the consecutive imap.log in four parts later today.

Thanks for the help.
Attached file New imap.log Part 1
Attachment #399477 - Attachment is obsolete: true
Attached file New imap.log Part 2
Attached file New imap.log Part 3
Attached file New imap.log Part 4
Attached file New imap.log Part 5
Attachment #399698 - Attachment mime type: application/octet-stream → text/plain
Attachment #399699 - Attachment mime type: application/octet-stream → text/plain
Attachment #399700 - Attachment mime type: application/octet-stream → text/plain
Attachment #399701 - Attachment mime type: application/octet-stream → text/plain
Attachment #399702 - Attachment mime type: application/octet-stream → text/plain
> New imap.log Part 5

"NO Some messages could not be FETCHed (Failure)" is seen in it.

> S-INBOX/mailing_list:SendData: 11 UID fetch 42001,42261,42318,42355,42667,42710,42825,46064,46595,46970:46985 (UID RFC822.SIZE FLAGS BODY.PEEK[HEADER.FIELDS (From To Cc Bcc Subject Date Message-ID Priority X-Priority References Newsgroups In-Reply-To Content-Type delivered-to)])
>(snip)
> CreateNewLineFromSocket: * 37497 FETCH (UID 46985 RFC822.SIZE 5100 FLAGS () BODY[HEADER.FIELDS (From To Cc Bcc Subject Date Message-ID Priority X-Priority References Newsgroups In-Reply-To Content-Type delivered-to)] {522}
> S-INBOX/mailing_list:STREAM:OPEN Size: 5100: Begin Message Download Stream
>(snip of mail data)
> S-INBOX/mailing_list:STREAM:CLOSE: Normal Message End Download Stream
> CreateNewLineFromSocket: 11 NO Some messages could not be FETCHed (Failure)

(Q1) Do you define IMAP folder of "mailing_list" under INBOX(=Gmail Label of "INBOX/mailing list")? 

Too many mail download or too large mail download size in one session?

(Q2) Show "Order Received" column(UID of mail) of the "mailing_list" folder, and sort by "Order Received" column. Largest UID is 46985?
(Q3) Click "mailing_list" folder(open the folder) with IMAP logging enabled.
Does next fetch start from UID next to 46985?
(In reply to comment #18)
> (Q1) Do you define IMAP folder of "mailing_list" under INBOX(=Gmail Label of
> "INBOX/mailing list")? 
> 
> Too many mail download or too large mail download size in one session?
>

Yes, the folder "mailing_list" has "INBOX" as it's parent, as such it is "INBOX/mailing_list".

And yes I had to do a fresh install so to speak, so ALL messages were downloaded again to the installation of Thunderbird. However I also get this error now on my old Thunderbird installation on Windows XP, on a completely different computer. It is exactly the same to reproduce the bug on that installation.

 
> (Q2) Show "Order Received" column(UID of mail) of the "mailing_list" folder,
> and sort by "Order Received" column. Largest UID is 46985?

No, the largest UID in the folder "mailing_list" is registering as 47007 (but I am receiving emails all the time so some more might have just been received).


> (Q3) Click "mailing_list" folder(open the folder) with IMAP logging enabled.
> Does next fetch start from UID next to 46985?

I'm having trouble locating the appropriate line in the imap.log. Should I be expecting my last actions to be logged at the end of the file?

I deleted the original imap.log and re-entered the logging commands at the commandline before executing Thunderbird with /usr/bin/thunderbird but the newly generated file is unexpectedly long for the number of actions I executed and the last actions recorded do not correspond to the actions I performed.

However I did a search in the newly generated file (which is over twice as big at about ~20MB) for '47007' the largest UID found in "INBOX/mailing_list" and found the following:

-1375736976[b2f5ad40]: b0524c00:imap.gmail.com:S-INBOX/foss:CreateNewLineFromSocket: 24 OK Success

-1375736976[b2f5ad40]: b0524c00:imap.gmail.com:S-INBOX/foss:SendData: 25 IDLE

-1578116240[b2da4870]: ReadNextLine [stream=a6defe88 nb=36 needmore=0]
-1578116240[b2da4870]: a6b64400:imap.gmail.com:S-INBOX/mailing_list:CreateNewLineFromSocket: * 37519 FETCH (UID 47007 FLAGS ())

-1578116240[b2da4870]: ReadNextLine [stream=a6defe88 nb=15 needmore=0]
-1578116240[b2da4870]: a6b64400:imap.gmail.com:S-INBOX/mailing_list:CreateNewLineFromSocket: 13 OK Success

-1375736976[b2f5ad40]: ReadNextLine [stream=b1de8de8 nb=10 needmore=0]
-1375736976[b2f5ad40]: b0524c00:imap.gmail.com:S-INBOX/foss:CreateNewLineFromSocket: + idling

-1578116240[b2da4870]: a6b64400:imap.gmail.com:S-INBOX/mailing_list:SendData: 14 UID fetch 42001,42261,42318,42355,42667,42710,42825,46064,46595 (UID RFC822.SIZE FLAGS BODY.PEEK[HEADER.FIELDS (From To Cc Bcc Subject Date Message-ID Priority X-Priority References Newsgroups In-Reply-To Content-Type delivered-to)])

-1578116240[b2da4870]: ReadNextLine [stream=a6defe88 nb=52 needmore=0]
-1578116240[b2da4870]: a6b64400:imap.gmail.com:S-INBOX/mailing_list:CreateNewLineFromSocket: 14 NO Some messages could not be FETCHed (Failure)

-1578116240[b2da4870]: a6b64400:imap.gmail.com:S-INBOX/mailing_list:SendData: 15 IDLE

-1578116240[b2da4870]: ReadNextLine [stream=a6defe88 nb=10 needmore=0]
-1578116240[b2da4870]: a6b64400:imap.gmail.com:S-INBOX/mailing_list:CreateNewLineFromSocket: + idling
Sounds like an issue with your gmail mailing_list folder, on the server. You might have to take it up with google. Or you could perhaps use the web mail interface to see if you can figure out which message(s) are causing the problem by moving the last 10 or so messages to an other folder, and then restart TB and see if the imap server works again...
Thanks for the comment. I have tried to take it up with Google but cannot find a way to contact them bar Google Help, which I have already posted on to no avail.

There are more people with my problem here too: http://forums.mozillazine.org/viewtopic.php?f=29&t=1455745&p=7479675#p7479675 (I'm Dead_1nside) and plenty more if you do a search.

I'll give your suggestion a try. It seems the thinking by those affected by this is to locate the corrupt message and delete it, however finding it and deleting it appears to be difficult.
(In reply to comment #20)
> Sounds like an issue with your gmail mailing_list folder, on the server. You
> might have to take it up with google. Or you could perhaps use the web mail
> interface to see if you can figure out which message(s) are causing the problem
> by moving the last 10 or so messages to an other folder, and then restart TB
> and see if the imap server works again...

Thanks for the suggestion. I tried moving the top and bottom 20 or so messages to a new folder but this didn't stop clicking the INBOX/mailing_list folder from producing the error.
These two links probably give the best explanation of other people's similar experiences. They also go some way to a solution using a patched email client.

http://superuser.com/questions/14045/thunderbird-gmail-imap-error-some-messages-could-not-be-fetched-failure

http://www.google.com/support/forum/p/gmail/thread?tid=3c7a18b612775f4e&hl=en
Getting to culprit is simple, cumbersome job though.
0. Add Gmail Label of X-0 to all conversations in INBOX/mailing_list
1. Add Gmail Label of X-1 to first half of conversations in X-0 (older mails)
   Add Gmail Label of X-2 to last  half of conversations in X-0 (newer mails)
   Check error occurs at which one using Tb. Say X-a
2. Add Gmail Label of X-a-1 to first half of conversations in X-a
   Add Gmail Label of X-a-2 to last  half of conversations in X-a
   Check error occurs at which one using Tb. Say X-a-b
3. Add Gmail Label of X-a-b-1 to first half of conversations in X-a-b
   Add Gmail Label of X-a-b-2 to last  half of conversations in X-a-b
   Check error occurs at which one using Tb. Say X-a-b-c
4. Repeat same work as step 3 for X-a-b-c-...-x-y-z.
Because good mails around culprit are already known by IMAP log, starting above work from conversations around them will reduce required steps.
Summary: Alert: The current command did not succeed. Fetched failure. → Alert: The current command did not succeed. Fetched failure. (Gmail IMAP)
> UID fetch 42001,...,46595 (UID RFC822.SIZE FLAGS BODY.PEEK[HEADER.FIELDS
> (From To Cc Bcc Subject Date Message-ID Priority X-Priority References Newsgroups
>  In-Reply-To Content-Type delivered-to)])

Do you have message filter which checks delivered-to: header? (Customized header)
If yes, change filter rule's condition of "if delivered-to: ..." to other one such as "if subject ..." in all message filter rules who has ""if delivered-to:".
Can it be a workaround?
(If deliver-to is relevant, Delivered-To may be another workaround...)
(In reply to comment #24)
> Getting to culprit is simple, cumbersome job though.
> 0. Add Gmail Label of X-0 to all conversations in INBOX/mailing_list
> 1. Add Gmail Label of X-1 to first half of conversations in X-0 (older mails)
>    Add Gmail Label of X-2 to last  half of conversations in X-0 (newer mails)
>    Check error occurs at which one using Tb. Say X-a
> 2. Add Gmail Label of X-a-1 to first half of conversations in X-a
>    Add Gmail Label of X-a-2 to last  half of conversations in X-a
>    Check error occurs at which one using Tb. Say X-a-b
> 3. Add Gmail Label of X-a-b-1 to first half of conversations in X-a-b
>    Add Gmail Label of X-a-b-2 to last  half of conversations in X-a-b
>    Check error occurs at which one using Tb. Say X-a-b-c
> 4. Repeat same work as step 3 for X-a-b-c-...-x-y-z.
> Because good mails around culprit are already known by IMAP log, starting above
> work from conversations around them will reduce required steps.

One look at that makes my head scream. Thanks for the help though. In the end last night I backed up the entire INBOX/mailing_list folder to a local one and then deleted them off the server through the Gmail interface. In doing so, I did not see the reported "corrupted message" which cannot supposedly be deleted properly, they simply all disappeared as intended. I then re-uploaded over IMAP the backup and now the error has gone. I do not know what solved it.
Did you remove mails from "Trash" of Gmail("Delete forever")?
If no, check next, to know you can still see problem or you made problem recreation(isolate mail, report to Gmail) impossible, please.

Access [Gmail]/Trash by Thunderbird. Problem occurs?
(In reply to comment #27)
> Did you remove mails from "Trash" of Gmail("Delete forever")?
> If no, check next, to know you can still see problem or you made problem
> recreation(isolate mail, report to Gmail) impossible, please.
> 
> Access [Gmail]/Trash by Thunderbird. Problem occurs?

I deleted them from Trash, so forever. I don't encounter the bug at all anymore which is a happy thing for me. I still have all the logs. However since the consensus seems to be this is not a Thunderbird bug I wanted to try everything to get rid of it.
Closing as INVALID, because it's Gmail/Gmail IMAP problem, and because there is no need to keep this bug open in order to report problem to Google as it's already impossible to identify problematic mail.
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago
Resolution: --- → INVALID
The Gmail's problem has been reported to Bug 517629 with bad mail pinpointed.
DUPing to Bug 517629.
Resolution: INVALID → DUPLICATE
Summary: Alert: The current command did not succeed. Fetched failure. (Gmail IMAP) → Alert: The current command did not succeed. Fetched failure. (Gmail IMAP, NO Some messages could not be FETCHed (Failure), probably due to bad mail data
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: