Open Bug 1857777 Opened 3 years ago Updated 1 year ago

messenger.messages.move silently fails to move message from Gmail Drafts folder to one of its subfolders

Categories

(Thunderbird :: Add-Ons: Extensions API, defect)

Thunderbird 115
defect

Tracking

(Not tracked)

People

(Reporter: 52qtuqm9, Unassigned)

Details

If you try to move a message in a Gmail account from [Gmail]/Drafts to [Gmail]/Drafts/some-subfolder-that-does-exist using messenger.messages.move, it silently fails to move the message.

See also bug 844494, which may or may not be relevant.

I'm not sure we can do anything about the move failing (see errors below), but at least the API should notice the error and bubble it back up to the caller.

[Parent 389751: Main Thread]: I/IMAP considering playing queued url:imap://jikamens@gmail.com@imap.gmail.com:993/onlinemove>UID>/[Gmail]/Drafts>74>/[Gmail]/Drafts/Send Later
[Parent 389751: Main Thread]: I/IMAP creating protocol instance to play queued url:imap://jikamens@gmail.com@imap.gmail.com:993/onlinemove>UID>/[Gmail]/Drafts>74>/[Gmail]/Drafts/Send Later
[Parent 389751: Main Thread]: D/IMAP proposed url = [Gmail]/Drafts folder for connection [Gmail]/Drafts has To Wait = false can run = true
[Parent 389751: Main Thread]: I/IMAP playing queued url:imap://jikamens@gmail.com@imap.gmail.com:993/onlinemove>UID>/[Gmail]/Drafts>74>/[Gmail]/Drafts/Send Later
[Parent 389751: Main Thread]: I/IMAP 7f6d64914900:imap.gmail.com:S-[Gmail]/Drafts:SetupSinkProxy: got m_imapMailFolderSink
[Parent 389751: IMAP]: I/IMAP 7f6d64f7a100:imap.gmail.com:S-[Gmail]/All Mail:ImapThreadMainLoop: idlePending set
[Parent 389751: IMAP]: I/IMAP 7f6d64914900:imap.gmail.com:S-[Gmail]/Drafts:ProcessCurrentURL: entering
[Parent 389751: IMAP]: I/IMAP 7f6d64914900:imap.gmail.com:S-[Gmail]/Drafts:ProcessCurrentURL:imap://jikamens%40gmail%2Ecom@imap.gmail.com:993/onlinemove%3EUID%3E/%5BGmail%5D/Drafts%3E74%3E/%5BGmail%5D/Drafts/Send%20Later:  = currentUrl
[Parent 389751: IMAP]: I/IMAP 7f6d64914900:imap.gmail.com:S-[Gmail]/Drafts:SendData: 67 uid move 74 "[Gmail]/Drafts/Send Later"
[Parent 389751: IMAP]: V/IMAP ReadNextLine [rv=0x0 stream=7f6d668f4240 nb=71 needmore=0]
[Parent 389751: IMAP]: I/IMAP 7f6d64914900:imap.gmail.com:S-[Gmail]/Drafts:CreateNewLineFromSocket: 67 NO [ALERT] Cannot MOVE messages out of the Drafts folder (Failure)
[Parent 389751: IMAP]: V/IMAP SetConnectionStatus(0x0)
[Parent 389751: IMAP]: D/IMAP URL failed with code 0x80550021 (imap://jikamens%40gmail%2Ecom@imap.gmail.com:993/onlinemove%3EUID%3E/%5BGmail%5D/Drafts%3E74%3E/%5BGmail%5D/Drafts/Send%20Later)
Summary: messenger.messages.move fails to move message from Gmail Drafts folder to one of its subfolders → messenger.messages.move silently fails to move message from Gmail Drafts folder to one of its subfolders

Thanks for the report.

How did you move the message to a folder which does not exist? Are you making up a MailFolderId or a minimal MailFolder object as shown below?

{
   accountId: "account4",
   path: "/[Gmail]/Entwürfe/DoesNotExist, 
}

I tested this in Thunderbird 128 and Daily 137 and in both versions I got a proper error when specifying an invalid id or folder object:

Error: Folder not found: account4://[Gmail]/Entwürfe/DoesNotExist

Can this be closed as resolved?

I also tried to move the message into an existing folder and then I could observe the described behavior: Google reverts the move.

The move is also reverted when I move it into any other folder, not necessarily a subfolder of my Drafts folder.

Fun fact #1: When I copy the message, and then delete the original message, the copied message is deleted as well.
Fun fact #2: I can move messages between subfolders of Drafts (both source and dest being different subfolders)
Fun fact #3: A move from a subfolder of Drafts into Drafts is reverted as well.

You need to log in before you can comment on or make changes to this bug.