Closed Bug 1977082 Opened 1 year ago Closed 1 year ago

"Get Messages" button is broken when mozAddonManager (extensions.webapi.enabled) is disabled "Uncaught TypeError: can't redefine non-configurable property "AddonManager" <anonymous> chrome://messenger/content/mailWindowOverlay.js:25"

Categories

(Thunderbird :: Mail Window Front End, defect)

defect

Tracking

(thunderbird_esr140 unaffected)

RESOLVED FIXED
142 Branch
Tracking Status
thunderbird_esr140 --- unaffected

People

(Reporter: celenity, Assigned: darktrojan)

Details

Attachments

(1 file)

To repro:

1. Set extensions.webapi.enabled to false, via your about:config or other means.
2. Restart Thunderbird.
3. Try selecting the Get Messages button. Instead of fetching your latest messages, you'll be greeted to the following error in your console:

An error occurred executing the cmd_getNewMessages command: ReferenceError: can't access lexical declaration 'TransportErrorUrlListener' before initialization globalOverlay.js:102:13
    goDoCommand chrome://messenger/content/globalOverlay.js:102
    MsgGetMessagesForAccount chrome://messenger/content/mailWindowOverlay.js:1080
    init chrome://messenger/content/about3Pane.js:1647

Before trying this, when starting Thunderbird, you'll also see in your console:

Uncaught TypeError: can't redefine non-configurable property "AddonManager"
    <anonymous> chrome://messenger/content/mailWindowOverlay.js:25
mailWindowOverlay.js:25:13
    <anonymous> chrome://messenger/content/mailWindowOverlay.js:25
Component: General → Add-Ons: Extensions API
Flags: needinfo?(john)
Summary: "Get Messages" button is broken when mozAddonManager (extensions.webapi.enabled) is disabled → "Get Messages" button is broken when mozAddonManager (extensions.webapi.enabled) is disabled "Uncaught TypeError: can't redefine non-configurable property "AddonManager" <anonymous> chrome://messenger/content/mailWindowOverlay.js:25"
Component: Add-Ons: Extensions API → Mail Window Front End
Flags: needinfo?(john) → needinfo?(geoff)

This sounds like it might be an issue in upstream AddonManager code, since that pref is only intended to affect the API we expose to remote content. And yet somehow the AddonManager.sys.mjs module seems to break? It also seems to break the application in many weird ways.

Severity: -- → S3
Status: UNCONFIRMED → NEW
Ever confirmed: true

I don't understand why it's happening for only one value of the pref, but this is just a case of too many files trying to define the same symbol. Most of them are unnecessary remnants of past code, let's get rid of them.

Assignee: nobody → geoff
Status: NEW → ASSIGNED
Flags: needinfo?(geoff)

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/52e21ed992a0
Remove unused imports of AddonManager.sys.mjs. r=freaktechnik

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

not affecting 140, correct?

Target Milestone: --- → 142 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: