Closed Bug 2033055 Opened 15 days ago Closed 9 days ago

"Update Add-ons Automatically" menu item does not have checkmark any more

Categories

(Toolkit :: UI Widgets, defect)

defect

Tracking

()

VERIFIED FIXED
152 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox-esr140 --- unaffected
firefox149 --- unaffected
firefox150 --- unaffected
firefox151 + verified
firefox152 --- verified

People

(Reporter: robwu, Assigned: mbeier)

References

(Regression)

Details

(Keywords: regression)

Attachments

(2 files)

STR:

  1. Visit about:addons
  2. Click on the settings button (cog) in the upper-right corner.
  3. Look at the Update Add-ons Automatically menu item.

Expected:

  • It should be checked.

Actual:

  • It is not checked.
  • When I step through with a debugger, I see that when we try to set the checked state in onUpdateModeChanged, that this.toggleUpdatesEl.checked is unexpectedly not a getter, implying that its custom element definition is somehow not loaded.

mozregression points to https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=7834ac686ade4f1abf049c4220f64860aa3c2beb&tochange=aac53931d99ba7dffa92666e032d9cfa064c703d

This was regressed by bug 2025900.

Likely unrelated, but while looking at a patch in bug 2025900, I see a compat layer at https://searchfox.org/firefox-main/rev/0ae2fcae6a70566ab9e13e401480387b34911bad/toolkit/content/widgets/panel-list/panel-list.js#13. The import() call is a dynamic import, which means that the code is behaviorally different from the original. If the intent is to behave as before, then using ChromeUtils.importESModule instead of dynamic import() may make more sense.

:mbeier, since you are the author of the regressor, bug 2025900, could you take a look? Also, could you set the severity field?

For more information, please visit BugBot documentation.

Flags: needinfo?(mbeier)

Hi :mbeir
I took a brief look into this because I'm working on a refactoring in this area and I was curious about what may be going on,
using the STR Rob described in comment 0 and confirmed that Rob is right that by the time the onUpdateModeChanged is hit for the first time this.toggleUpdatesEl.constructor is HTMLElement (instead of a PanelItem).

I noticed though that the document.readyState is "interactive" at that time, and that the customElements.setElementCreationCallback registered from toolkit/content/customElements.js that is supposed to load the panel-list.mjs (from here) is actually firing later on (after the onUpdateModeChanged linked in comment 0 has been already executed, and so the panel-item will not be checked as it should have been).

Looking to the changes in the two patches landed from Bug 2026900, I think that panel-list likely used to be loaded earlier before Bug 2025900 because the customElements.setElementCreationCallback registering the callback that loads the .js shared custom elements is registered right away, whereas the other customElements.setElementCreationCallback callback that imports the .mjs shared custom elements is registered on DOMContentLoaded, that would explain why by the time onUpdateModeChanged is executed panel-list isn't loaded yet but it gets loaded as expected later on.

Set release status flags based on info from the regressing bug 2025900

Assignee: nobody → mbeier
Status: NEW → ASSIGNED

The dynamic import() in the newtab shim is likely not an issue because the newtab code loads it using <script async.

Flags: needinfo?(mbeier)
Status: ASSIGNED → RESOLVED
Closed: 9 days ago
Resolution: --- → FIXED
Target Milestone: --- → 152 Branch

The patch landed in nightly and beta is affected.
:mbeier, is this bug important enough to require an uplift?

For more information, please visit BugBot documentation.

Flags: needinfo?(mbeier)
Flags: needinfo?(mbeier)
Attachment #9573448 - Flags: approval-mozilla-beta?

firefox-beta Uplift Approval Request

  • User impact if declined/Reason for urgency: It looks like automatic add-on updates are disabled even if they are enabled.
  • Code covered by automated testing?: no
  • Fix verified in Nightly?: no
  • Needs manual QE testing?: yes
  • Steps to reproduce for manual QE testing: See https://bugzilla.mozilla.org/show_bug.cgi?id=2033055#c0
  • Risk associated with taking this patch: low
  • Explanation of risk level: Imports a module that would be imported anyway earlier
  • String changes made/needed?: no
  • Is Android affected?: no
Flags: qe-verify+
Attachment #9573448 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
QA Whiteboard: [qa-triage-done-c152/b151]
QA Contact: acornestean
Duplicate of this bug: 2034939

Verified as Fixed. Tested on the latest Nightly (152.0a1/20260426211850) and Beta (151.0b3/20260424174848 from https://treeherder.mozilla.org/jobs?repo=mozilla-beta&revision=8c36cec7ff010ddf8dd1d848029550ae6a191343) under Windows 11 and Ubuntu 25.10.

The "Update Add-ons Automatically" menu item now has a checkmark. Disabling/Enabling the option hides/shows the checkmark accordingly.

Status: RESOLVED → VERIFIED
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: