Update Thundermail system add-on to match AccountHub API experiment
Categories
(Thunderbird :: Build Config, enhancement)
Tracking
(thunderbird153 fixed)
| Tracking | Status | |
|---|---|---|
| thunderbird153 | --- | fixed |
People
(Reporter: aaspinwall, Assigned: aaspinwall)
References
Details
Attachments
(1 external file, 2 obsolete files)
Describe the bug
The AccountHub experiment API — which logs the add-on in automatically when a Thundermail account is added through Thunderbird's Accounts Hub — stopped working. Adding a Thundermail account no longer signs the add-on in.
Root cause: two upstream Thunderbird API changes the experiment code was never updated for:
nsIMsgIncomingServerrenamed itshostNameproperty tohostname(lowercase). The listener readserver.hostName, which now returnsundefined, so the Thundermail host regex never matched andonServerLoadedreturned early on every account.OAuth2Module.getRefreshToken()becameasync. It was called withoutawait, so a Promise (always truthy) was fired across the experiment→background boundary instead of the refresh-token string.
To Reproduce
Steps to reproduce the behavior:
- Run a recent Thunderbird (140+, where the upstream API changes landed).
- Open the Accounts Hub and add a Thundermail account (
mail.thundermail.com/mail.stage-thundermail.com). - Complete the OAuth login for the mail account.
- See error: the add-on never logs in (silent failure in the Error Console).
Expected behavior
After adding a Thundermail account via the Accounts Hub, the add-on logs in automatically: onAccountAdded fires with a valid refresh token, the token is stored against the mail account, and the Add-On → Web login flow runs.
Actual behavior
Nothing happens — the add-on stays logged out. The onServerLoaded handler returns early because server.hostName is undefined (/thundermail\.com$/i.test(undefined) is false). Even past that gate, getRefreshToken() returned a Promise instead of the token string, so the wrong value would have been dispatched. No exception is thrown; the failure is entirely silent.
Screenshots
N/A
System
- OS: macOS (Darwin 25.5.0)
- Browser Version: Thunderbird 140–155
Additional context
Verified against the Thunderbird source: OAuth2Module.getRefreshToken() is declared async in OAuth2Module.sys.mjs, and nsIMsgIncomingServer.idl declares attribute AUTF8String hostname; with no hostName variant. The copy of this add-on bundled in the Thunderbird tree is a stale snapshot carrying the same two bugs.
| Assignee | ||
Comment 1•4 months ago
|
||
Updated•4 months ago
|
| Assignee | ||
Comment 2•4 months ago
|
||
| Assignee | ||
Comment 3•4 months ago
|
||
Updated•4 months ago
|
| Assignee | ||
Updated•4 months ago
|
| Assignee | ||
Comment 4•4 months ago
|
||
Comment on attachment 9598346 [details]
Bug 2048069 - Update Thundermail system add-on to 1.9.0; await OAuth2 refresh token on server load. r=#thunderbuild
Uplift Approval Request
- Please state case for uplift consideration and ensure bug severity is set: The patch contains minimal changes only targeted for the add-on to work properly
- User impact if declined:
- 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?: No
- 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): not risky as it doesn't affect main functionality
- Does the fix cause any migrations to be skipped?: No
- String changes made/needed:
Comment 5•4 months ago
|
||
Comment on attachment 9598346 [details]
Bug 2048069 - Update Thundermail system add-on to 1.9.0; await OAuth2 refresh token on server load. r=#thunderbuild
[Triage Comment]
Approved for beta
Updated•4 months ago
|
Pushed by corey@thunderbird.net:
https://hg.mozilla.org/comm-central/rev/b6a623d00fb0
Update Thundermail system add-on to 1.9.0; await OAuth2 refresh token on server load. r=coreycb
Comment 7•4 months ago
|
||
| bugherder uplift | ||
Thunderbird 153.0b2:
https://hg.mozilla.org/releases/comm-beta/rev/1af662d80d9a
Updated•4 months ago
|
Updated•4 months ago
|
Description
•