Closed Bug 2034749 Opened 6 months ago Closed 6 months ago

Compose window closes prematurely and progress dialog hangs when NNTP message sending fails

Categories

(MailNews Core :: Composition, defect)

Thunderbird 152
defect

Tracking

(thunderbird_esr140 unaffected, thunderbird151 unaffected)

VERIFIED FIXED
152 Branch
Tracking Status
thunderbird_esr140 --- unaffected
thunderbird151 --- unaffected

People

(Reporter: welpy-cw, Assigned: welpy-cw)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 external file)

When composing a newsgroup (NNTP) message that the server ultimately rejects, the compose window closes immediately instead of staying open to let the user correct the issue. Additionally, the "Sending message…" progress dialog fails to close and hangs indefinitely.

Steps to Reproduce

  1. Configure an NNTP newsgroup account, for example 'news.eternal-september.org`.
  2. Open the compose window and draft a message destined to fail, the mentioned server for example rejects postings without any contents.
  3. Click Send.
  4. Dismiss the alert "news.eternal-september.org: Article is empty"

Actual Results
The compose window closes immediately after step 3. After step 4, the send progress dialog remains stuck on the screen with the state "Assembling message…done". Error console produces:

11:34:00.621 mailnews.nntp: Got an error, the server said: 441 Article is empty NntpClient.sys.mjs:1162:18
11:34:03.629 mailnews.send: Sending failed; The message could not be posted because connecting to the news server failed. The server may be unavailable or is refusing connections. Please verify that your news server settings are correct and try again., exitCode=2147500037, originalMsgURI= MessageSend.sys.mjs:369:32
11:34:03.728 NS_ERROR_ABORT: Component returned failure code: 0x80004004 (NS_ERROR_ABORT) [nsIWindowWatcher.openWindow] Prompter.sys.mjs:1288:17

Expected Results
The compose window should remain open so the user can fix the issue, the progress dialog should close after the user has dismissed the specific error alert.

This fixes a regression from Bug 2030913 where failing to send a newsgroup
message resulted in the compose window closing prematurely and the progress
dialog hanging indefinitely.

  • Restores the error-handling branch in nsMsgComposeSendListener::OnStopSending
    to ensure the send progress dialog is properly closed when a send error occurs,
    bypassing the FCC check.
  • Promisifies _deliverAsNews in MessageSend.sys.mjs using
    Promise.withResolvers() and a wrapper nsIUrlListener.
  • Awaits _deliverAsNews() to block execution until the NNTP server responds
Assignee: nobody → h.w.forms
Attachment #9573399 - Attachment description: WIP: Bug 2034749 - Fix premature compose window closure and hanging progress dialog on NNTP send failures. r=#thunderbird-reviewers → Bug 2034749 - Fix premature compose window closure and hanging progress dialog on NNTP send failures. r=#thunderbird-reviewers
Status: NEW → ASSIGNED
Target Milestone: --- → 152 Branch

Pushed by kaie@kuix.de:
https://hg.mozilla.org/comm-central/rev/92b1e4258988
Fix premature compose window closure and hanging progress dialog on NNTP send failures. r=mkmelin

Status: ASSIGNED → RESOLVED
Closed: 6 months ago
Resolution: --- → FIXED

Confirming this issue as verified fixed with 154.0a1(20260712081932) with macOS 15/26, Win11 and Ubu24.

Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: