Closed Bug 1801668 Opened 2 years ago Closed 11 months ago

Send Message Error - The server responded: Error: timeout exceeded

Categories

(MailNews Core :: Networking: SMTP, defect, P2)

Thunderbird 108

Tracking

(thunderbird_esr102 unaffected, thunderbird_esr115+ fixed, thunderbird111+ affected, thunderbird118 fixed)

RESOLVED FIXED
119 Branch
Tracking Status
thunderbird_esr102 --- unaffected
thunderbird_esr115 + fixed
thunderbird111 + affected
thunderbird118 --- fixed

People

(Reporter: paully.littlefield, Assigned: mkmelin)

References

(Regression, )

Details

(Keywords: regression)

Attachments

(4 files)

User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36

Steps to reproduce:

Send message.

Actual results:

At regular intervals, the pop-up window titled "Send Message Error" appears with the attached image content.

Expected results:

There are no messages in the queue or local Outbox, and the SMTP server I use works perfectly. If I send a new message to my other email it sends and arrives at the destination normally. So there appears to be something stuck or wrong with TB. This error window did not appear in 107beta.

I think this would be fallout from bug 136871

Component: Untriaged → Networking: SMTP
Keywords: dupeme, regression
Product: Thunderbird → MailNews Core
Regressed by: 136871

Good catch. I've been seeing this. I use send in the background, if that makes a difference.
I didn't find any duplicates https://mzl.la/3TY6Ncm

Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(remotenonsense)
Keywords: dupeme
Assignee: nobody → remotenonsense
Status: NEW → ASSIGNED
Flags: needinfo?(remotenonsense)

Can we uplift bug 1766382 comment 17 first? I think it will fix 90% of the problem, I will make a patch to fix the remaining 10%.

(In reply to Ping Chen (:rnons) from comment #3)

Can we uplift bug 1766382 comment 17 first? I think it will fix 90% of the problem, I will make a patch to fix the remaining 10%.

Uplift approved.

So that patch does more than just apply a potential increase in the TCP timeout?
And if that is the case, does it fix other previously user reported problems?

Before bug 1766382, there was no explicit timeout in SmtpClient, so it depended on the system socket timeout. After 1766382, TCPSocket.cpp should notify SmtpClient after being inactive for mailnews.tcptimeout seconds.

And if that is the case, does it fix other previously user reported problems?

Not sure which problems you mean.

Before bug 1766382, there was no explicit timeout in SmtpClient, so it depended on the system socket timeout. After 1766382, TCPSocket.cpp should notify SmtpClient after being inactive for mailnews.tcptimeout seconds.

That's the impression I had, and so ...

Not sure which problems you mean.

I'll try a different question - so with Bug 136871 - reuse server connection, especially for slow or overloaded network - there is possibility of using a connection that has exceeded or is near its timeout? And bug 1766382 resolves that issue?

And bug 1766382 resolves that issue?

90% as I said in comment 3. The other 10% may be a timing issue I guess, a socket is timeout when we are about to reuse a connection. I will make a patch to reconnect immediately instead of showing error.

Duplicate of this bug: 1846531
Duplicate of this bug: 1843696

Any news on this being fixed guys as I'm seeing it now since I've upgraded to Supernova? I never had it with the old release version. I've uninstalled TB and twice re-added the account and nothing seems to help.
I reported it twice (in error) as bug reports 1843696 & 1846531, I get a slightly different error message. (I've now closed these bugs out and marked them as duplicates of this bug.
I have tried increasing the SMTP server timeout value to 200 but it doesn't help. Also the error seems to occur even when I have no mail to send out.

(In reply to Ping Chen [:rnons] (away) from comment #7)

And bug 1766382 resolves that issue?

90% as I said in comment 3. The other 10% may be a timing issue I guess, a socket is timeout when we are about to reuse a connection. I will make a patch to reconnect immediately instead of showing error.

I'm not finding a bug created by ping to do this, so it still needs to be done?

Flags: needinfo?(mkmelin+mozilla)

(In reply to Wayne Mery (:wsmwk) from comment #12)

I'm not finding a bug created by ping to do this, ...

This bug here. He sketched the solution in comment #7, but never got to it. Sounds like Fermat.

Assignee: remotenonsense → nobody
Severity: -- → S3
Status: ASSIGNED → NEW
Priority: -- → P2
Summary: Send Message Error → Send Message Error "timeout exceeded"

I don't know if this information can be useful.

Duplicate of this bug: 1847618

I doesn't seem this would be Thunderbird's fault, given the smtp 421 error code. It is odd that that shows up though as the server has already said it accepted the mail.
Doesn't seem like there has been a lot of reports about issues either, so may just be some fluke...

Flags: needinfo?(mkmelin+mozilla)
Summary: Send Message Error "timeout exceeded" → Send Message Error - The server responded: Error: timeout exceeded

I see this on a regular basis on macOS, reported it ......

Please attach an smtp log for when it happens, with 115 or later. See https://wiki.mozilla.org/MailNews:Logging

Attached file SendEmail.txt

Hi,
I have activated the logging system for SMTP and it shows the same as the image I attached. I forward this information again in TXT. It happens to me almost every time I send an email.
Indicate that the email is sent. It is stored in the sent folder and it is after 20-30 seconds that it shows the error message.

Console Error:
[ImapModuleLoader] Using nsImapService.cpp
console.log: Calendar: [CalTimezoneService] Timezones version 2023c loaded
console.debug: Calendar:
[CalMetronome] Scheduling one-off event in 56295ms
console.log: Calendar: Start loading of locale dependent preference default values...
console.log: Calendar: Loading of locale sensitive preference default values completed.
console.warn: services.settings: Failed to load last_modified.json: TypeError: NetworkError when attempting to fetch resource.
JavaScript error: resource://gre/modules/crypto-SDR.sys.mjs, line 199: NS_ERROR_FAILURE: Couldn't decrypt string
JavaScript error: resource://gre/modules/crypto-SDR.sys.mjs, line 199: NS_ERROR_FAILURE: Couldn't decrypt string
JavaScript error: resource://gre/modules/crypto-SDR.sys.mjs, line 199: NS_ERROR_FAILURE: Couldn't decrypt string
JavaScript error: resource://gre/modules/crypto-SDR.sys.mjs, line 199: NS_ERROR_FAILURE: Couldn't decrypt string
JavaScript error: resource://gre/modules/crypto-SDR.sys.mjs, line 199: NS_ERROR_FAILURE: Couldn't decrypt string
JavaScript error: resource://gre/modules/crypto-SDR.sys.mjs, line 199: NS_ERROR_FAILURE: Couldn't decrypt string
JavaScript error: resource://gre/modules/crypto-SDR.sys.mjs, line 199: NS_ERROR_FAILURE: Couldn't decrypt string
JavaScript error: resource://gre/modules/crypto-SDR.sys.mjs, line 199: NS_ERROR_FAILURE: Couldn't decrypt string
JavaScript error: resource://gre/modules/crypto-SDR.sys.mjs, line 199: NS_ERROR_FAILURE: Couldn't decrypt string
JavaScript error: resource://gre/modules/crypto-SDR.sys.mjs, line 199: NS_ERROR_FAILURE: Couldn't decrypt string
JavaScript error: resource://gre/modules/crypto-SDR.sys.mjs, line 199: NS_ERROR_FAILURE: Couldn't decrypt string
JavaScript error: resource://gre/modules/crypto-SDR.sys.mjs, line 199: NS_ERROR_FAILURE: Couldn't decrypt string
JavaScript error: resource://gre/modules/crypto-SDR.sys.mjs, line 199: NS_ERROR_FAILURE: Couldn't decrypt string
JavaScript error: resource://gre/modules/crypto-SDR.sys.mjs, line 199: NS_ERROR_FAILURE: Couldn't decrypt string
JavaScript error: resource://gre/modules/crypto-SDR.sys.mjs, line 199: NS_ERROR_FAILURE: Couldn't decrypt string
JavaScript error: resource://gre/modules/crypto-SDR.sys.mjs, line 199: NS_ERROR_FAILURE: Couldn't decrypt string
JavaScript error: resource://gre/modules/crypto-SDR.sys.mjs, line 199: NS_ERROR_FAILURE: Couldn't decrypt string
JavaScript error: resource://gre/modules/crypto-SDR.sys.mjs, line 199: NS_ERROR_FAILURE: Couldn't decrypt string
JavaScript error: resource://gre/modules/crypto-SDR.sys.mjs, line 199: NS_ERROR_FAILURE: Couldn't decrypt string
JavaScript error: resource://gre/modules/crypto-SDR.sys.mjs, line 199: NS_ERROR_FAILURE: Couldn't decrypt string
JavaScript error: resource://gre/modules/crypto-SDR.sys.mjs, line 199: NS_ERROR_FAILURE: Couldn't decrypt string
JavaScript error: resource://gre/modules/crypto-SDR.sys.mjs, line 199: NS_ERROR_FAILURE: Couldn't decrypt string
JavaScript error: resource://gre/modules/crypto-SDR.sys.mjs, line 199: NS_ERROR_FAILURE: Couldn't decrypt string
JavaScript error: resource://gre/modules/crypto-SDR.sys.mjs, line 199: NS_ERROR_FAILURE: Couldn't decrypt string
JavaScript error: resource://gre/modules/crypto-SDR.sys.mjs, line 199: NS_ERROR_FAILURE: Couldn't decrypt string
JavaScript error: resource://gre/modules/crypto-SDR.sys.mjs, line 199: NS_ERROR_FAILURE: Couldn't decrypt string
JavaScript error: resource://gre/modules/crypto-SDR.sys.mjs, line 199: NS_ERROR_FAILURE: Couldn't decrypt string
JavaScript error: resource://gre/modules/crypto-SDR.sys.mjs, line 199: NS_ERROR_FAILURE: Couldn't decrypt string
JavaScript error: resource:///modules/AddrBookManager.jsm, line 271: NS_ERROR_FAILURE: No directory for uri=moz-abldapdirectory://ldap_2.servers.DOMINIOLOCAL
JavaScript error: resource:///modules/AddrBookManager.jsm, line 271: NS_ERROR_FAILURE: No directory for uri=moz-abldapdirectory://ldap_2.servers.DOMINIOLOCAL
JavaScript error: resource://gre/modules/LoginManagerChild.sys.mjs, line 149: NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIAutoCompleteInput.popup]
JavaScript error: resource://gre/modules/crypto-SDR.sys.mjs, line 199: NS_ERROR_FAILURE: Couldn't decrypt string
JavaScript error: resource://gre/modules/crypto-SDR.sys.mjs, line 199: NS_ERROR_FAILURE: Couldn't decrypt string
JavaScript error: resource://gre/modules/crypto-SDR.sys.mjs, line 199: NS_ERROR_FAILURE: Couldn't decrypt string
JavaScript error: resource://gre/modules/crypto-SDR.sys.mjs, line 199: NS_ERROR_FAILURE: Couldn't decrypt string
JavaScript error: resource://gre/modules/crypto-SDR.sys.mjs, line 199: NS_ERROR_FAILURE: Couldn't decrypt string
JavaScript error: resource://gre/modules/crypto-SDR.sys.mjs, line 199: NS_ERROR_FAILURE: Couldn't decrypt string
JavaScript error: resource://gre/modules/crypto-SDR.sys.mjs, line 199: NS_ERROR_FAILURE: Couldn't decrypt string
JavaScript error: resource://gre/modules/crypto-SDR.sys.mjs, line 199: NS_ERROR_FAILURE: Couldn't decrypt string
JavaScript error: resource://gre/modules/crypto-SDR.sys.mjs, line 199: NS_ERROR_FAILURE: Couldn't decrypt string
JavaScript error: resource://gre/modules/crypto-SDR.sys.mjs, line 199: NS_ERROR_FAILURE: Couldn't decrypt string
JavaScript error: resource://gre/modules/crypto-SDR.sys.mjs, line 199: NS_ERROR_FAILURE: Couldn't decrypt string
JavaScript error: resource://gre/modules/crypto-SDR.sys.mjs, line 199: NS_ERROR_FAILURE: Couldn't decrypt string
JavaScript error: resource://gre/modules/crypto-SDR.sys.mjs, line 199: NS_ERROR_FAILURE: Couldn't decrypt string
JavaScript error: resource://gre/modules/crypto-SDR.sys.mjs, line 199: NS_ERROR_FAILURE: Couldn't decrypt string
JavaScript error: resource://gre/modules/crypto-SDR.sys.mjs, line 199: NS_ERROR_FAILURE: Couldn't decrypt string
console.debug: Calendar:
[CalMetronome] Starting repeating events
JavaScript error: , line 0: NS_ERROR_UNEXPECTED

Thanks you.

I use 115.2.0 version.

We were logging out of order at one place, which made the logs difficult to understand.
The issue discovered was that now that we reuse connections, the connection to the server
is left open after send. After the send was successful, if the server decides it wants
us to disconnect and sends us 421, that was erroneously interpreted as a send failure.

Also did a bit of modernization.

Assignee: nobody → mkmelin+mozilla
Status: NEW → ASSIGNED
See Also: → 1851767
Attachment #9351742 - Attachment description: Bug 1801668 - Avoid "Send Message Error" during idle. r=#thunderbird-reviewers → Bug 1801668 - Avoid "Send Message Error" during idle. r=babolivier
Target Milestone: --- → 119 Branch

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/fd461cee4898
Avoid "Send Message Error" during idle. r=babolivier

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

Good for beta?

Flags: needinfo?(mkmelin+mozilla)

Comment on attachment 9351742 [details]
Bug 1801668 - Avoid "Send Message Error" during idle. r=babolivier

[Approval Request Comment]
Regression caused by (bug #): bug 136871
User impact if declined: "send error" messages can be shown when they should not
Testing completed (on c-c, etc.): c-c
Risk to taking this patch (and alternatives if risky): safe

Flags: needinfo?(mkmelin+mozilla)
Attachment #9351742 - Flags: approval-comm-esr115?
Attachment #9351742 - Flags: approval-comm-beta?

Comment on attachment 9351742 [details]
Bug 1801668 - Avoid "Send Message Error" during idle. r=babolivier

[Triage Comment]
Approved for beta

Attachment #9351742 - Flags: approval-comm-beta? → approval-comm-beta+

Comment on attachment 9351742 [details]
Bug 1801668 - Avoid "Send Message Error" during idle. r=babolivier

[Triage Comment]
Approved for esr115

Attachment #9351742 - Flags: approval-comm-esr115? → approval-comm-esr115+

https://hg.mozilla.org/releases/comm-esr115/rev/86ed70b96a25

This broke my class that derives from MessageSend because QueryInterface is now a direct property of the object rather than being on the prototype. Is there really no better way of doing this with ES6 classes? It seems to be a bit of a backward step.

Hard to say without context. Can't the derived class override the QueryInterface property of MessageSend to be what it needs, if it needs to be something else?

(It turns out that we don't actually need to override QueryInterface. And I've since noticed on MDN that this is a common pattern. It still seems to be a bit of an antipattern to me though, e.g. super won't work on functions defined like this.)

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

Attachment

General

Created:
Updated:
Size: