browser_ext_slow_script.js fails with "stopButton is null" and then hangs until the task's max run time
Categories
(WebExtensions :: Untriaged, defect)
Tracking
(firefox-esr153 unaffected, firefox159 unaffected, firefox160 unaffected, firefox161 fixed, firefox162 fixed)
| Tracking | Status | |
|---|---|---|
| firefox-esr153 | --- | unaffected |
| firefox159 | --- | unaffected |
| firefox160 | --- | unaffected |
| firefox161 | --- | fixed |
| firefox162 | --- | fixed |
People
(Reporter: jstutte, Assigned: flod)
References
(Regression)
Details
(Keywords: regression)
Attachments
(2 external files)
Since 2026-10-29, browser/components/extensions/test/browser/browser_ext_slow_script.js fails on macOS aarch64 with:
TEST-FAIL | browser_ext_slow_script.js | test_slow_content_script - Uncaught exception in test - TypeError: can't access property "click", stopButton is null
The extension is then unloaded while its content script keeps busy-waiting, ProcessHangMonitor.sys.mjs logs NS_ERROR_ILLEGAL_VALUE from nsIAddonPolicyService.getExtensionName every few seconds, and the job runs until the task is aborted for exceeding its max run time (about 90 minutes later). These jobs get classified as the max-run-time meta bug 1809667, which hides them: of the 125 macosx1500-aarch64 browser-chrome jobs classified there between 2026-10-05 and 2026-11-04, 117 stopped in this test, all from 2026-10-29 on (about 17 a day, on autoland, mozilla-central and try).
This started with bug 2086504, which moved the hang notification's strings to Fluent. The Stop button used to get label synchronously; it now gets "l10n-id": "process-hang-stop-button", so its label is filled in asynchronously, while the test still looks it up right away with querySelector("[label='Stop']").
Notification buttons get their data-l10n-id attribute synchronously (document.l10n.setAttributes in notificationbox.js), so looking the button up with [data-l10n-id='process-hang-stop-button'] should fix the test. Separately, it might be worth making the hang notification cope with the extension being gone, so that a failing test does not turn into a 90 minute hang.
Comment 1•17 days ago
|
||
Set release status flags based on info from the regressing bug 2086504
:flod, since you are the author of the regressor, bug 2086504, could you take a look? Also, could you set the severity field?
For more information, please visit BugBot documentation.
| Assignee | ||
Comment 2•17 days ago
|
||
Will look into it today.
Since 2026-10-29,
browser/components/extensions/test/browser/browser_ext_slow_script.jsfails on macOS aarch64 with:
Can you add more on how you're testing this? I've tested the patch locally multiple times on the same platform, but didn't see a failure.
| Assignee | ||
Comment 3•17 days ago
|
||
OK, apparently the failure depends on the machine, and how quickly it can get the Fluent translation.
| Assignee | ||
Comment 4•17 days ago
|
||
The Stop button label is now set asynchronously by Fluent. If the test fails,
stop the hung script during cleanup, and let the hang notification fall back
to the add-on ID once the extension has been unloaded.
Updated•17 days ago
|
Comment 5•15 days ago
|
||
Set release status flags based on info from the regressing bug 2086504
Comment 8•14 days ago
|
||
The patch landed in nightly and beta is affected.
:flod, please make an uplift decision for beta:
- For beta, nominate the patch for beta uplift approval if the fix should be included in this release, or set
status-firefox161towontfixif the fix can wait for the next release.
Uplift requests can be submitted from Lando: D339511.
See Requesting an Uplift for documentation on how to request an uplift.
For more information, please visit BugBot documentation.
Comment 9•14 days ago
|
||
firefox-beta Uplift Approval Request
- User impact if declined/Reason for urgency: Fixes a couple of edge cases in a test (race condition, which might then result in a 90 minute hang).
- Code covered by automated testing?: yes
- Fix verified in Nightly?: yes
- Needs manual QE testing?: no
- Steps to reproduce for manual QE testing:
- Risk associated with taking this patch: low
- Explanation of risk level: Only test fix
- String changes made/needed?: -
- Is Android affected?: no
| Assignee | ||
Comment 10•14 days ago
|
||
The Stop button label is now set asynchronously by Fluent. If the test fails,
stop the hung script during cleanup, and let the hang notification fall back
to the add-on ID once the extension has been unloaded.
Original Revision: https://phabricator.services.mozilla.com/D339511
| Assignee | ||
Updated•14 days ago
|
Updated•12 days ago
|
Updated•12 days ago
|
Comment 11•12 days ago
|
||
| uplift | ||
Description
•