Closed Bug 2076834 Opened 1 month ago Closed 1 month ago

High frequency [tier2] browser/components/places/tests/browser/browser_sidebar_bookmarks_telemetry.js | single tracking bug

Categories

(Firefox :: Sidebar, defect, P5)

defect

Tracking

()

RESOLVED FIXED
160 Branch
Tracking Status
firefox-esr153 --- unaffected
firefox157 + wontfix
firefox158 + fixed
firefox159 + fixed
firefox160 --- fixed

People

(Reporter: intermittent-bug-filer, Assigned: jsudiaman)

References

(Regression)

Details

(Keywords: intermittent-failure, intermittent-testcase, regression, Whiteboard: [collect_confirm_failure])

Attachments

(3 external files)

Filed by: asilaghi [at] mozilla.com
Parsed log: https://treeherder.mozilla.org/logviewer?job_id=596675235&repo=autoland&task=I1Uv3ZlITdOeN9IqA5YTwA.0
Full log: https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/I1Uv3ZlITdOeN9IqA5YTwA/runs/0/artifacts/public/logs/live_backing.log


[task 2026-09-30T16:32:43.074+00:00] 16:32:43     INFO - TEST-PASS | browser/components/places/tests/browser/browser_sidebar_bookmarks_telemetry.js | test_open_multiple_bookmarks - sidebar.link['bookmarks'] must contain the expected value - 4 == 4
[task 2026-09-30T16:32:43.075+00:00] 16:32:43     INFO - Leaving test test_open_multiple_bookmarks
[task 2026-09-30T16:32:43.076+00:00] 16:32:43     INFO - Entering test test_bookmarks_search
[task 2026-09-30T16:32:43.077+00:00] 16:32:43     INFO - withSidebarTree: waiting sidebar load
[task 2026-09-30T16:32:43.078+00:00] 16:32:43     INFO - Console message: [JavaScript Warning: "Empty string passed to getElementById()." {file: "chrome://browser/content/browser.xhtml" line: 0}]
[task 2026-09-30T16:32:43.079+00:00] 16:32:43     INFO - Console message: [JavaScript Error: "AbortError: Actor 'NetError' destroyed before query 'SearchCTA:GetInfo' was resolved"]
[task 2026-09-30T16:32:43.079+00:00] 16:32:43     INFO - withSidebarTree: executing the task
[task 2026-09-30T16:32:43.080+00:00] 16:32:43     INFO - Console message: [JavaScript Warning: "Key event not available on some keyboard layouts: key=โ€œzโ€ modifiers=โ€œcontrol,altโ€ id=โ€œtoggleSidebarKbโ€" {file: "chrome://mochikit/content/tests/SimpleTest/EventUtils.js" line: 1891}]
[task 2026-09-30T16:32:43.082+00:00] 16:32:43     INFO - Console message: [JavaScript Warning: "Key event not available on some keyboard layouts: key=โ€œuโ€ modifiers=โ€œaccel,altโ€ id=โ€œviewOpenTabsSidebarKbโ€" {file: "chrome://mochikit/content/tests/SimpleTest/EventUtils.js" line: 1891}]
[task 2026-09-30T16:32:43.083+00:00] 16:32:43     INFO - Console message: [JavaScript Warning: "Key event not available on some keyboard layouts: key=โ€œxโ€ modifiers=โ€œaccel,altโ€ id=โ€œviewGenaiChatSidebarKbโ€" {file: "chrome://mochikit/content/tests/SimpleTest/EventUtils.js" line: 1891}]
[task 2026-09-30T16:32:43.084+00:00] 16:32:43     INFO - Console message: [JavaScript Warning: "Key event not available on some keyboard layouts: key=โ€œrโ€ modifiers=โ€œaccel,altโ€ id=โ€œkey_toggleReaderModeโ€" {file: "chrome://mochikit/content/tests/SimpleTest/EventUtils.js" line: 1891}]
[task 2026-09-30T16:32:43.085+00:00] 16:32:43     INFO - Console message: [JavaScript Warning: "Key event not available on some keyboard layouts: key=โ€œiโ€ modifiers=โ€œaccel,alt,shiftโ€ id=โ€œkey_browserToolboxโ€" {file: "chrome://mochikit/content/tests/SimpleTest/EventUtils.js" line: 1891}]
[task 2026-09-30T16:32:43.085+00:00] 16:32:43     INFO - Buffered messages logged at 16:32:42
[task 2026-09-30T16:32:43.086+00:00] 16:32:43     INFO - Console message: [JavaScript Warning: "Empty string passed to getElementById()." {file: "about:newtab" line: 0}]
[task 2026-09-30T16:32:43.087+00:00] 16:32:43     INFO - Search was reset
[task 2026-09-30T16:32:43.088+00:00] 16:32:43     INFO - Second search was performed
[task 2026-09-30T16:32:43.088+00:00] 16:32:43     INFO - Buffered messages finished
[task 2026-09-30T16:32:43.092+00:00] 16:32:43     INFO - TEST-UNEXPECTED-FAIL | browser/components/places/tests/browser/browser_sidebar_bookmarks_telemetry.js | test_bookmarks_search - Node is not accessible via accessibility API: id: , tagName: treechildren, className: sidebar-placesTreechildren
[task 2026-09-30T16:32:43.092+00:00] 16:32:43     INFO - chrome://mochikit/content/browser-test.js:test_ok:2087
[task 2026-09-30T16:32:43.092+00:00] 16:32:43     INFO - chrome://mochikit/content/tests/SimpleTest/AccessibilityUtils.js:a11yFail:874
[task 2026-09-30T16:32:43.092+00:00] 16:32:43     INFO - chrome://mochikit/content/tests/SimpleTest/AccessibilityUtils.js:assertCanBeClicked:1319
[task 2026-09-30T16:32:43.092+00:00] 16:32:43     INFO - chrome://mochikit/content/tests/SimpleTest/AccessibilityUtils.js:runIfA11YChecks/this.AccessibilityUtils:1295
[task 2026-09-30T16:32:43.092+00:00] 16:32:43     INFO - chrome://mochikit/content/tests/SimpleTest/AccessibilityUtils.js:handleEvent:1429
[task 2026-09-30T16:32:43.092+00:00] 16:32:43     INFO - chrome://mochikit/content/tests/SimpleTest/EventUtils.js:synthesizeMouseAtPoint:833
[task 2026-09-30T16:32:43.092+00:00] 16:32:43     INFO - chrome://mochikit/content/tests/SimpleTest/EventUtils.js:synthesizeMouse:702
[task 2026-09-30T16:32:43.092+00:00] 16:32:43     INFO - chrome://mochitests/content/browser/browser/components/places/tests/browser/head.js:synthesizeClickOnSelectedTreeCell:133
[task 2026-09-30T16:32:43.092+00:00] 16:32:43     INFO - async*chrome://mochitests/content/browser/browser/components/places/tests/browser/browser_sidebar_bookmarks_telemetry.js:test_bookmarks_search/<:119
[task 2026-09-30T16:32:43.092+00:00] 16:32:43     INFO - async*chrome://mochitests/content/browser/browser/components/places/tests/browser/head.js:withSidebarTree:383
[task 2026-09-30T16:32:43.092+00:00] 16:32:43     INFO - async*chrome://mochitests/content/browser/browser/components/places/tests/browser/browser_sidebar_bookmarks_telemetry.js:test_bookmarks_search:105
[task 2026-09-30T16:32:43.092+00:00] 16:32:43     INFO - chrome://mochikit/content/browser-test.js:handleTask:1565
[task 2026-09-30T16:32:43.092+00:00] 16:32:43     INFO - chrome://mochikit/content/browser-test.js:_runTaskBasedTest:1655
[task 2026-09-30T16:32:43.092+00:00] 16:32:43     INFO - async*chrome://mochikit/content/browser-test.js:Tester_execTest:1808
[task 2026-09-30T16:32:43.092+00:00] 16:32:43     INFO - chrome://mochikit/content/browser-test.js:nextTest/<:1545
[task 2026-09-30T16:32:43.092+00:00] 16:32:43     INFO - chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:SimpleTest.waitForFocus/<:1060
[task 2026-09-30T16:32:43.092+00:00] 16:32:43     INFO - promise callback*chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:SimpleTest.waitForFocus:1059
[task 2026-09-30T16:32:43.092+00:00] 16:32:43     INFO - chrome://mochikit/content/browser-test.js:nextTest:1483
[task 2026-09-30T16:32:43.092+00:00] 16:32:43     INFO - chrome://mochikit/content/browser-test.js:Tester_start/<:539
[task 2026-09-30T16:32:43.092+00:00] 16:32:43     INFO - promise callback*chrome://mochikit/content/browser-test.js:Tester_start:537
[task 2026-09-30T16:32:43.092+00:00] 16:32:43     INFO - chrome://mochikit/content/browser-harness.xhtml:createTester/</<:265
[task 2026-09-30T16:32:43.093+00:00] 16:32:43     INFO - First link was selected and then clicked on
[task 2026-09-30T16:32:43.094+00:00] 16:32:43     INFO - TEST-PASS | browser/components/places/tests/browser/browser_sidebar_bookmarks_telemetry.js | test_bookmarks_search - sidebar.link must be recorded. - true == true
[task 2026-09-30T16:32:43.094+00:00] 16:32:43     INFO - TEST-PASS | browser/components/places/tests/browser/browser_sidebar_bookmarks_telemetry.js | test_bookmarks_search - sidebar.link must contain the 'bookmarks' key. - true == true
[task 2026-09-30T16:32:43.095+00:00] 16:32:43     INFO - TEST-PASS | browser/components/places/tests/browser/browser_sidebar_bookmarks_telemetry.js | test_bookmarks_search - sidebar.link['bookmarks'] must contain the expected value - 1 == 1
[task 2026-09-30T16:32:43.096+00:00] 16:32:43     INFO - TEST-PASS | browser/components/places/tests/browser/browser_sidebar_bookmarks_telemetry.js | test_bookmarks_search - unexpected counts should be zero for PLACES_BOOKMARKS_SEARCHBAR_CUMULATIVE_SEARCHES at index 1 - 0 == 0
[task 2026-09-30T16:32:43.097+00:00] 16:32:43     INFO - TEST-PASS | browser/components/places/tests/browser/browser_sidebar_bookmarks_telemetry.js | test_bookmarks_search - expected counts should match for PLACES_BOOKMARKS_SEARCHBAR_CUMULATIVE_SEARCHES at index 2 - 1 == 1
[task 2026-09-30T16:32:43.097+00:00] 16:32:43     INFO - TEST-PASS | browser/components/places/tests/browser/browser_sidebar_bookmarks_telemetry.js | test_bookmarks_search - unexpected counts should be zero for PLACES_BOOKMARKS_SEARCHBAR_CUMULATIVE_SEARCHES at index 3 - 0 == 0
[task 2026-09-30T16:32:43.098+00:00] 16:32:43     INFO - TEST-PASS | browser/components/places/tests/browser/browser_sidebar_bookmarks_telemetry.js | test_bookmarks_search - Should have found an entry for PLACES_BOOKMARKS_SEARCHBAR_CUMULATIVE_SEARCHES at index 2 - true == true
[task 2026-09-30T16:32:43.099+00:00] 16:32:43     INFO - Cumulative search probe is recorded
[task 2026-09-30T16:32:43.099+00:00] 16:32:43     INFO - Leaving test test_bookmarks_search
[task 2026-09-30T16:32:43.100+00:00] 16:32:43     INFO - checking for open popups
[task 2026-09-30T16:32:43.101+00:00] 16:32:43     INFO - Console message: [JavaScript Warning: "This page is in Quirks Mode. Page layout may be impacted. For Standards Mode use โ€œ<!DOCTYPE html>โ€." {file: "https://www.mozilla.org/contribute/?utm_medium=firefox-desktop&utm_source=bookmarks-toolbar&utm_campaign=new-users-nightly&utm_content=-global" line: 0}]
[task 2026-09-30T16:32:43.620+00:00] 16:32:43     INFO - GECKO(8929) | MEMORY STAT vsizeMaxContiguous not supported in this build configuration.
[task 2026-09-30T16:32:43.621+00:00] 16:32:43     INFO - GECKO(8929) | MEMORY STAT | vsize 11815MB | residentFast 537MB | heapAllocated 311MB
[task 2026-09-30T16:32:43.625+00:00] 16:32:43     INFO - checking for open sidebars
[task 2026-09-30T16:32:43.625+00:00] 16:32:43     INFO - checking window state
[task 2026-09-30T16:32:44.169+00:00] 16:32:44     INFO - Not taking screenshot here: see the one that was previously logged
[task 2026-09-30T16:32:44.170+00:00] 16:32:44     INFO - TEST-UNEXPECTED-FAIL | browser/components/places/tests/browser/browser_sidebar_bookmarks_telemetry.js | profile uploaded in profile_browser_sidebar_bookmarks_telemetry-2.js.json.gz
[task 2026-09-30T16:32:44.170+00:00] 16:32:44     INFO - Not taking screenshot here: see the one that was previously logged
[task 2026-09-30T16:32:44.171+00:00] 16:32:44     INFO - TEST-UNEXPECTED-FAIL | browser/components/places/tests/browser/browser_sidebar_bookmarks_telemetry.js | finished in 3204ms
[task 2026-09-30T16:32:44.171+00:00] 16:32:44     INFO - TEST-INFO took 3207ms
[task 2026-09-30T16:32:44.304+00:00] 16:32:44     INFO - TEST-START | browser/components/places/tests/browser/browser_sidebarpanels_click.js

:jsudiaman, since you are the author of the regressor, bug 2076296, could you take a look?

For more information, please visit BugBot documentation.

Flags: needinfo?(jsudiaman)

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

Summary: Perma [tier2] browser/components/places/tests/browser/browser_sidebar_bookmarks_telemetry.js | single tracking bug → High frequency [tier2] browser/components/places/tests/browser/browser_sidebar_bookmarks_telemetry.js | single tracking bug

Root Cause Analysis

This failure is a XUL-based timing issue that was surfaced by the additional module load added to the legacy bookmarks sidebar panel.

Adding async to the script declaration appears to fix it: https://treeherder.mozilla.org/#/jobs?repo=try&revision=ebf2cace2496bfaacfcd89a05d786f564595990e

Failure sequence

  1. The module delays DOMContentLoaded. Without async, it is deferred, not synchronously loaded. The XUL document can start layout while the module still blocks DOMContentLoaded. See XUL document initialization.

  2. The treeโ€™s children are not ready for layout yet. Their connected callbacks wait for DOMContentLoaded. In particular, MozTreeChildren.connectedCallback() assigns slot="treechildren", placing the rows inside the treeโ€™s shadow DOM. Before that assignment, the tree body has no layout frame. See the delayed slot assignment.

  3. Accessibility inspects the tree during that gap. Geckoโ€™s XUL-tree accessible factory requires a tree-body frame. Without one, it returns null, and accessibility falls back to a generic text container accessible. See the tree-frame check and generic fallback.

  4. Later initialization does not replace that generic accessible. The tree becomes visually functional, but its accessible remains a text container instead of an outline. The click checker cannot find an interactive accessible ancestor for treechildren, so it fails:

    Node is not accessible via accessibility API: id: , tagName: treechildren, className: sidebar-placesTreechildren
    

Observed trace

Point in initialization treechildren slot Treeโ€™s accessible role
Before delayed connected callbacks Missing text container
After callbacks treechildren text container
Document load treechildren text container

The accessible also remained wrong after another task. This is more than the test clicking too early: the accessible has already been constructed with the wrong type.

Interpretation

The cause is premature accessible construction caused by delayed custom-element connection, rather than a module-load exception. The async patch avoids that path; the underlying Gecko issue is that the generic accessible survives after the tree body becomes available.

This can affect assistive technology because the proper tree accessible supplies rows, selection, and tree navigation. Some generic container or descendant content may still be exposed.

Flags: needinfo?(jsudiaman)

Accessibility creates the wrong kind of accessible for the bookmarks tree before its custom-element initialization finishes. Adding async to the switcher module prevents that initialization race.

Assignee: nobody → jsudiaman
Status: NEW → ASSIGNED

:jsudiaman any update? its quite frequent on autoland

Flags: needinfo?(jsudiaman)
Pushed by rvandermeulen@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/8d0819571555 https://hg.mozilla.org/integration/autoland/rev/6a802725b92c Use asynchronous module load for the revamped switcher in the legacy bookmarks panel. r=sidebar-reviewers,nsharpley
Pushed by abutkovits@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/2e37e56cf8fe https://hg.mozilla.org/integration/autoland/rev/908045b72436 Revert "Bug 2076834 - Use asynchronous module load for the revamped switcher in the legacy bookmarks panel. r=sidebar-reviewers,nsharpley" for causing failures complaining about CustomElementCreationCallback.
Pushed by jsudiaman@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/e182eaf56725 https://hg.mozilla.org/integration/autoland/rev/8752d21ad0dc Use asynchronous module load for the revamped switcher in the legacy bookmarks panel. r=sidebar-reviewers,nsharpley
Status: ASSIGNED → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 160 Branch

Unfortunately had to rework the solution, try-pushes didn't cover the tests causing the backout.

Will request dot release, and next beta uplift.

Flags: needinfo?(jsudiaman)

firefox-release Uplift Approval Request

  • User impact if declined/Reason for urgency: When using the legacy bookmarks sidebar panel, screen readers may fail to identify the bookmarks tree as its proper role ("outline").

This causes a high frequency test failure on browser/components/places/tests/browser/browser_sidebar_bookmarks_telemetry.js

  • Code covered by automated testing?: yes
  • Fix verified in Nightly?: no
  • Needs manual QE testing?: no
  • Steps to reproduce for manual QE testing:
  • Risk associated with taking this patch: low
  • Explanation of risk level: Fixes contained to the bookmarks sidebar window. Errors from the additional import are logged rather than propagated.
  • String changes made/needed?: none
  • Is Android affected?: no
Attachment #9656249 - Flags: approval-mozilla-release?

Accessibility creates the wrong kind of accessible for the bookmarks tree before its custom-element initialization finishes. Loading switcher module asynchronously prevents that initialization race.

Original Revision: https://phabricator.services.mozilla.com/D330158

The patch landed in nightly and beta is affected.

:jsudiaman, 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-firefox159 to wontfix if the fix can wait for the next release.

See Requesting an Uplift for documentation on how to request an uplift.

For more information, please visit BugBot documentation.

Flags: needinfo?(jsudiaman)

Accessibility creates the wrong kind of accessible for the bookmarks tree before its custom-element initialization finishes. Loading switcher module asynchronously prevents that initialization race.

Original Revision: https://phabricator.services.mozilla.com/D330158

Attachment #9656899 - Flags: approval-mozilla-beta?

firefox-beta Uplift Approval Request

  • User impact if declined/Reason for urgency: When using the legacy bookmarks sidebar panel, screen readers may fail to identify the bookmarks tree as its proper role ("outline").

This causes a high frequency test failure on browser/components/places/tests/browser/browser_sidebar_bookmarks_telemetry.js

  • Code covered by automated testing?: yes
  • Fix verified in Nightly?: no
  • Needs manual QE testing?: no
  • Steps to reproduce for manual QE testing:
  • Risk associated with taking this patch: low
  • Explanation of risk level: Fixes contained to the bookmarks sidebar window. Errors from the additional import are logged rather than propagated.
  • String changes made/needed?: none
  • Is Android affected?: no
Flags: needinfo?(jsudiaman)
Attachment #9656899 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Attachment #9656249 - Flags: approval-mozilla-release? → approval-mozilla-release+
QA Whiteboard: [qa-triage-done-c160/b159]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: