Closed Bug 2088260 Opened 12 days ago Closed 12 days ago

Forward does nothing (OpenComposeWindow throws NS_ERROR_OUT_OF_MEMORY) for IMAP messages in a subfolder whose name contains a space

Categories

(Thunderbird :: Message Compose Window, defect)

Thunderbird 159
defect

Tracking

(thunderbird_esr153 unaffected, thunderbird159 wontfix, thunderbird160 affected)

RESOLVED FIXED
161 Branch
Tracking Status
thunderbird_esr153 --- unaffected
thunderbird159 --- wontfix
thunderbird160 --- affected

People

(Reporter: bugzillamail, Assigned: mkmelin)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 external file)

Steps to reproduce

Wanted to forward an email from within a subfolder.
Thunderbird 159.0 (64-bit), Windows, release channel. The account is IMAP through Proton Mail Bridge (127.0.0.1).

Steps to reproduce:

Create a parent folder with a subfolder whose name contains a space, for example Folders/Parent/Sub Folder.
Move a message into that subfolder.
Select the message and press Forward. Right-click Forward As (Inline or As Attachment) fails the same way.

Actual results

Nothing happens and no compose window opens.
The Error Console shows:
Uncaught (in promise) NS_ERROR_OUT_OF_MEMORY: Component returned failure code: 0x8007000e [nsIMsgComposeService.OpenComposeWindow], from ComposeMessage at mailCommands.js:443 and _composeMsgByType at mailCommon.js:898

Here's the report, ready to paste into Bugzilla. Choose Product Thunderbird and Component Message Compose Window.

Summary: Forward does nothing (OpenComposeWindow throws NS_ERROR_OUT_OF_MEMORY) for IMAP messages in a subfolder whose name contains a space

Description:
Thunderbird 159.0 (64-bit), Windows, release channel. The account is IMAP through Proton Mail Bridge (127.0.0.1).

Steps to reproduce:

  1. Create a parent folder with a subfolder whose name contains a space, for example Folders/Parent/Sub Folder.
  2. Move a message into that subfolder.
  3. Select the message and press Forward. Right-click Forward As (Inline or As Attachment) fails the same way.

Actual result: Nothing happens and no compose window opens. The Error Console shows:
Uncaught (in promise) NS_ERROR_OUT_OF_MEMORY: Component returned failure code: 0x8007000e [nsIMsgComposeService.OpenComposeWindow], from ComposeMessage at mailCommands.js:443 and _composeMsgByType at mailCommon.js:898

Expected result: The Forward compose window opens.

Notes:

  • Reply works on the same message.
  • Forward works in the parent folder, even when the parent's name contains a space (for example "Ace Folder").
  • Forward works after moving the message to another folder.
  • Renaming the subfolder to remove the space fixes Forward right away.
  • Repair Folder, Repair Bridge, resubscribing and opening the message in a new tab don't help.
  • The Proton web app forwards the same messages fine.
  • This looks like the same error as Bugzilla 2036765 (EWS, fixed in 151.0.1), but on IMAP. The message or folder address with an encoded space (%20) probably isn't resolving, possibly related to Bugzilla 1588391.

Expected results

When clicked Forward, a new compose window is expected to open.

Duplicate of this bug: 2088261

When referencing bugs, please just write "bug " and the number, so bugzilla can autolink. Like bug 2036765, bug 1588391.

Looks like this regressed from bug 2065695

Assignee: nobody → mkmelin+mozilla
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: regression
Regressed by: 2065695

IMAP folder URIs can hold unescaped mailbox names, such as "Sub Folder".
When forwarding inline, the message URI goes through nsIURI, which escapes
the space as %20. DecomposeImapURI() then failed to find the folder and
created a dangling one, whose file path is derived from the URI. Since bug 2065695,
GetUrlForUri() opens the database of that folder, which fails when
the path does not match the real folder's files, so the compose window never
opened.

Look up the existing folder by the unescaped path before falling back to
creating a dangling folder.

Status: NEW → ASSIGNED
Target Milestone: --- → 161 Branch

Pushed by kaie@kuix.de:
https://hg.mozilla.org/comm-central/rev/a461b43d1abd
Resolve escaped IMAP message URIs to the existing folder. r=BenC

Status: ASSIGNED → RESOLVED
Closed: 12 days ago
Resolution: --- → FIXED

Thanks, Magnus, for the quick diagnosis and fix, and thanks to Ben and Kai for the review and landing. Much appreciated!

Duplicate of this bug: 2088209

Comment on attachment 9672897 [details]
Bug 2088260 - Resolve escaped IMAP message URIs to the existing folder. r=BenC

Uplift Approval Request

  • Please state case for uplift consideration and ensure bug severity is set: Regression
  • User impact if declined: Per bug summary
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Daily?: Yes
  • Has the fix been verified in Beta?: No
  • Needs manual test from QA?: Yes
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): It only kicks in a fallback if we'd otherwise fail
  • Does the fix cause any migrations to be skipped?: No
  • String changes made/needed: none
Attachment #9672897 - Flags: approval-comm-beta?
See Also: → 2089065

Comment on attachment 9672897 [details]
Bug 2088260 - Resolve escaped IMAP message URIs to the existing folder. r=BenC

[Triage Comment]
Sorry, this missed the final beta.

Attachment #9672897 - Flags: approval-comm-beta? → approval-comm-beta-
See Also: → 2091482
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: