Closed Bug 1692924 Opened 2 years ago Closed 1 year ago

sendUnsentMessages returning failure code because mail.accountmanager.defaultaccount out of sync with existing accounts

Categories

(Thunderbird :: Account Manager, defect)

defect

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: jon, Unassigned)

References

Details

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:85.0) Gecko/20100101 Firefox/85.0

Steps to reproduce:

It seems that something is blocking the nsIMsgSendLater.sendUnsentMessages function for some users. I maintain the Send Later extension, which relies on the Outbox mechanism for delivering messages in the background. Since late January I've heard from two users, both on Windows, that messages will get stuck in the outbox, and are not being sent.

Actual results:

The sendUnsentMessages function from nsIMsgSendLater is returning a generic failure code:

Exception { name: "NS_ERROR_FAILURE", message: "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIMsgSendLater.sendUnsentMessages]", result: 2147500037 ....

The File > Send Unsent Messages command is also greyed out for these users, even when there are unsent messages in the outbox and the client is online.

Expected results:

sendUnsentMessages should deliver any messages currently in the outbox folder. This has been reported on Windows 7 and 10 with 32 and 64-bit installations of Thunderbird 78.6.1 and 78.7.1. Sample size is small at this point, but I'll add details as I get more user reports.

There is a bug report open for this on the Send Later extension's github repo here: https://github.com/Extended-Thunder/send-later/issues/292

Update: the affected user appears to have solved the problem. It seems that during a recent update, their account ID's got changed, but the mail.accountmanager.defaultaccount setting was not updated. Manually updating that value seems to fix the problem. Maybe that's just a fluke, but since I've heard the same thing from two users in the past few weeks I'm guessing it's not a completely isolated event.

Component: Untriaged → Backend
Product: Thunderbird → MailNews Core
Summary: sendUnsentMessages returning failure code → mail.accountmanager.defaultaccount out of sync with existing accounts

Thanks for reporting this. It is useful to have both symptoms and cause in the bug summary

One such issue was fixed in 78.7.0 in Bug 1680653 - If the default account is removed, and no other account can be default, defaultAccount still points to the removed account

Another example is Bug 1598596 - "Send Unsent Messages" from Outbox not working, because mail.accountmanager.defaultaccount was set to Local Folders when using Manually Sort Folders add-on

Component: Backend → Account Manager
Product: MailNews Core → Thunderbird
See Also: → 880602
Summary: mail.accountmanager.defaultaccount out of sync with existing accounts → sendUnsentMessages returning failure code because mail.accountmanager.defaultaccount out of sync with existing accounts

Thanks for the info. This does sound similar to Bug 1680653, but the user who originally reported it to me was using a fresh install on version 78.7.1. It happened when they were transferring an account from one computer to another.

On the other hand, I haven't heard from anyone else with this issue in the past two months, so it might be safe to assume that it's either fixed or was just a coincidence that it happened to two users in the first place.

Thanks for the update. If you get further reports, especially against version 91, please update the bug

Status: UNCONFIRMED → RESOLVED
Closed: 1 year ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.