Closed Bug 1909005 Opened 2 months ago Closed 1 month ago

owl accounts are omitted by accounts API

Categories

(Thunderbird :: Add-Ons: Extensions API, defect)

Thunderbird 128
defect

Tracking

(thunderbird_esr128? fixed, thunderbird130 fixed)

RESOLVED FIXED
131 Branch
Tracking Status
thunderbird_esr128 ? fixed
thunderbird130 --- fixed

People

(Reporter: axel.grude, Assigned: TbSync)

Details

Attachments

(1 file, 1 obsolete file)

It appears that I cannot retrieve accounts of type "Owl" anymore by using messenger.accounts.list()

I had 2 users of 2 different Add-ons complaining that their license keys are not validating - I use default identity email addresses for these, that I retrieve by iterating all accounts via the same shared module script (Licenser.mjs.js). So I debugged the particular library, stepping into ext-accounts.js. It turns out that the function convert() omits any accounts that are not of the following types:

"pop3" "imap" or "nntp" - these are all the types that the function GetType can return - any unknown types (including "owl") will return null and then cause a skip of the account record during the iteration. I am not sure what the situation is with Thunderbird 115, but my guess is that it was changed as both my bug reports mentioned that they encountered the problem after updating to Thunderbird 128. If it turns out that this bug is affecting the account listing I would be grateful for a quick fix as I believe it doesn't just affect at least 3 of my own Add-ons but also might affect other Add-ons that use the accountsRead permission.

The type checking is in ExtensionAccounts.sys.mjs, line 31. I would propose that we add "owl" to the supported list of types (or at least return a string or value different from null, such as "unknown". At least that way the conversion of the account for account.list won't fail silently which leads to missing out on the existence of the account altogether.

Flags: needinfo?(john)

The current code lists only 4 account types and returns null for all others. That means that Owl, ExQuilla and TB Exchange accounts will not be listed.

This is a regression in TB 128 and caused Alex Grude's license manager to fail.

Assignee: nobody → ben.bucksch
Status: NEW → ASSIGNED

(I didn't intent to take this bug. Just to submit a potential fix. Back to John.)

Assignee: ben.bucksch → john

This patch allows validation of built-in account types without
skipping additional account types added by Experiment add-ons.

Chat accounts are ignored, because the accounts and folders API cannot
interact with them. EWS accounts are ignored because support is
preliminary.

Depends on D218731

Attachment #9414026 - Attachment is obsolete: true
Flags: needinfo?(john)
Target Milestone: --- → 131 Branch

Pushed by alessandro@thunderbird.net:
https://hg.mozilla.org/comm-central/rev/ab7bd39620c8
Correctly handle built-in account types and extension account types. r=BenB

Status: ASSIGNED → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED

Excuse if I misunderstand the bugzilla update system, it looks to me like you changed target from 128 to a later version...
Quick question, why only target=>131 branch - I am sure this bug has the potential to affect quite a few Add-ons that need to iterate accounts - they will just stop working when users are auto-updated to 128. Or maybe it could be solved by the owl owner in the meantime by pretending to use an "official" protocol?

Flags: needinfo?(alessandro)

Milestone (which I think is what you refer to as target) is the version this patch has landed in. Please see the tracking flag, which states 128 is affected. We will backport this to 128 after it has got some time on daily and beta.

Flags: needinfo?(alessandro)

Comment on attachment 9418174 [details]
Bug 1909005 - Correctly handle built-in account types and extension account types. r=#thunderbird-reviewers

[Approval Request Comment]
Regression caused by (bug #): Folders API added in TB128
User impact if declined: Non-standard accolunts are not returned by the API, for example OWL
Testing completed (on c-c, etc.): a few days on c-c
Risk to taking this patch (and alternatives if risky): Low,´. Instead of skipping unkown account types, we return them as extension:* account types

Attachment #9418174 - Flags: approval-comm-beta?

Comment on attachment 9418174 [details]
Bug 1909005 - Correctly handle built-in account types and extension account types. r=#thunderbird-reviewers

[Approval Request Comment]
Regression caused by (bug #): Folders API added in TB128
User impact if declined: Non-standard accolunts are not returned by the API, for example OWL
Testing completed (on c-c, etc.): a few days on c-c
Risk to taking this patch (and alternatives if risky): Low,´. Instead of skipping unkown account types, we return them as extension:* account types

Attachment #9418174 - Flags: approval-comm-esr128?

Comment on attachment 9418174 [details]
Bug 1909005 - Correctly handle built-in account types and extension account types. r=#thunderbird-reviewers

[Triage Comment]
Approved for beta

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

Comment on attachment 9418174 [details]
Bug 1909005 - Correctly handle built-in account types and extension account types. r=#thunderbird-reviewers

[Triage Comment]
Approved for esr128

Attachment #9418174 - Flags: approval-comm-esr128? → approval-comm-esr128+

I can confirm it is fixed in 128.2.0esr - I can verify user licenses again that reference OWL accounts.

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

Attachment

General

Created:
Updated:
Size: