Closed Bug 1751466 Opened 2 years ago Closed 2 years ago

On a news-only profile, when posting a news message fails, no error is reported, instead there is a JS error smtpServer is null

Categories

(MailNews Core :: Networking: NNTP, defect)

defect

Tracking

(thunderbird_esr91 unaffected, thunderbird97 wontfix)

RESOLVED FIXED
98 Branch
Tracking Status
thunderbird_esr91 --- unaffected
thunderbird97 --- wontfix

People

(Reporter: rachel, Assigned: rnons)

Details

Attachments

(2 files)

Looks like the previous line didn't receive an SMTP server:
https://searchfox.org/comm-central/rev/ce30946f9f46d13d98655dddcdd5d55ac48fffac/mailnews/compose/src/MimeMessageUtils.jsm#988

We saw that when we got a "Duplicate message (MD5)" from the news server. We can't reproduce it now, but we assume a news server error can me simulated to test this. This is on a profile with only one news account and hence no configured SMTP server.

Thanks, will take a look at how the C++ code handles this and do the same.

Assignee: nobody → remotenonsense
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Target Milestone: --- → 98 Branch

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/4dc984888162
Emit error when posting fails in NntpClient.jsm. r=mkmelin

Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED

BTW, this is also broken in TB 91. Post to a non-existing newsgroup and you'll get
TypeError: smtpServer is MimeMessageUtils.jsm:988:24
on a news-only profile. Looks like that causes the alert not to be logged in the activity manager.

This isn't fixed. Please test: Follow-up to a post and change the newsgroup name to a NG that doesn't exist to provoke an error. Using the JS module, there is no error message at all.

Using the C++ module, we get:
A News (NNTP) error occurred: No valid newsgroups in "eternal-september.testv"
Followed by:
TypeError: can't access property "hostname", smtpServer is null MimeMessageUtils.jsm:988:24

or, if an SMTP server is configured:
Sending of the message failed.
The message could not be sent using Outgoing server (SMTP) mail.your-server.de for an unknown reason. Please verify that your Outgoing server (SMTP) settings are correct and try again.

In TB 91, with an SMTP server configured, the additional SMTP error is displayed which is confusing since news isn't send via SMTP.

Status: RESOLVED → REOPENED
Flags: needinfo?(remotenonsense)
Resolution: FIXED → ---

https://github.com/Betterbird/thunderbird-patches/blob/main/91/bugs/1751466-smtp-error-on-news-failure.patch
This fixes the attempted SMTP error when news delivery fails and reinstates the TB 78 behaviour for the C++ module. We haven't look at why with the JS module no error is displayed at all.

Show an error msg with news.properties and server error.

Thanks, will send a patch for 91 later.

-   if (errorName == "sendFailed") {
+   if (errorName != "sendFailed") {
Flags: needinfo?(remotenonsense)

Confirmed working, thank you.

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/bb1b945bb76d
Fix error msg when posting fails in NntpClient.jsm. r=mkmelin

Status: REOPENED → RESOLVED
Closed: 2 years ago2 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: