Closed Bug 1712141 Opened 3 years ago Closed 3 years ago

Intermittent browser/components/extensions/test/browser/browser_ext_menus.js | Uncaught exception - at chrome://mochikit/content/tests/SimpleTest/EventUtils.js:680 - TypeError: can't access property "getBoundingClientRect", aTarget is null

Categories

(WebExtensions :: Untriaged, defect, P5)

defect

Tracking

(firefox90 fixed)

RESOLVED FIXED
90 Branch
Tracking Status
firefox90 --- fixed

People

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

Details

(Keywords: intermittent-failure)

Attachments

(1 file)

Filed by: abutkovits [at] mozilla.com
Parsed log: https://treeherder.mozilla.org/logviewer?job_id=340321697&repo=autoland
Full log: https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/bbqPpttUTxqFBrwRA0HCsA/runs/0/artifacts/public/logs/live_backing.log
Reftest URL: https://hg.mozilla.org/mozilla-central/raw-file/tip/layout/tools/reftest/reftest-analyzer.xhtml#logurl=https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/bbqPpttUTxqFBrwRA0HCsA/runs/0/artifacts/public/logs/live_backing.log&only_show_unexpected=1


[task 2021-05-20T14:45:19.122Z] 14:45:19     INFO - TEST-PASS | browser/components/extensions/test/browser/browser_ext_menus.js | Click info pageUrl is correct - 
[task 2021-05-20T14:45:19.123Z] 14:45:19     INFO - TEST-PASS | browser/components/extensions/test/browser/browser_ext_menus.js | Click event tab ID is correct - 
[task 2021-05-20T14:45:19.124Z] 14:45:19     INFO - Buffered messages logged at 14:45:18
[task 2021-05-20T14:45:19.125Z] 14:45:19     INFO - Console message: [JavaScript Error: "sendRemoveListener on closed conduit {535053a2-8377-41d0-a22a-4a328bc0a948}.274877907327" {file: "resource://gre/modules/ConduitsChild.jsm" line: 108}]
[task 2021-05-20T14:45:19.126Z] 14:45:19     INFO - _send@resource://gre/modules/ConduitsChild.jsm:108:13
[task 2021-05-20T14:45:19.126Z] 14:45:19     INFO - removeListener@resource://gre/modules/ExtensionChild.jsm:663:34
[task 2021-05-20T14:45:19.127Z] 14:45:19     INFO - removeListener@resource://gre/modules/ExtensionChild.jsm:886:40
[task 2021-05-20T14:45:19.127Z] 14:45:19     INFO - getAPI/register/api.menus.onClicked@chrome://browser/content/child/ext-menus.js:284:21
[task 2021-05-20T14:45:19.128Z] 14:45:19     INFO - removeListener@resource://gre/modules/ExtensionCommon.jsm:2533:7
[task 2021-05-20T14:45:19.128Z] 14:45:19     INFO - revoke@resource://gre/modules/ExtensionCommon.jsm:2555:12
[task 2021-05-20T14:45:19.128Z] 14:45:19     INFO - close@resource://gre/modules/ExtensionCommon.jsm:2560:10
[task 2021-05-20T14:45:19.129Z] 14:45:19     INFO - unload@resource://gre/modules/ExtensionCommon.jsm:922:11
[task 2021-05-20T14:45:19.130Z] 14:45:19     INFO - unload@resource://gre/modules/ExtensionPageChild.jsm:261:11
[task 2021-05-20T14:45:19.130Z] 14:45:19     INFO - unload@resource://gre/modules/ExtensionPageChild.jsm:298:11
[task 2021-05-20T14:45:19.131Z] 14:45:19     INFO - destroyExtensionContext@resource://gre/modules/ExtensionPageChild.jsm:482:15
[task 2021-05-20T14:45:19.131Z] 14:45:19     INFO - observe@resource://gre/modules/ExtensionPageChild.jsm:395:12
[task 2021-05-20T14:45:19.132Z] 14:45:19     INFO - 
[task 2021-05-20T14:45:19.132Z] 14:45:19     INFO - Leaving test bound test_actionContextMenus
[task 2021-05-20T14:45:19.133Z] 14:45:19     INFO - Entering test bound test_bookmarkContextMenu
[task 2021-05-20T14:45:19.133Z] 14:45:19     INFO - Extension loaded
[task 2021-05-20T14:45:19.136Z] 14:45:19     INFO - Console message: Warning: attempting to write 5323 bytes to preference extensions.webextensions.uuids. This is bad for general performance and memory usage. Such an amount of data should rather be written to an external file. This preference will not be sent to any content processes.
[task 2021-05-20T14:45:19.137Z] 14:45:19     INFO - Buffered messages finished
[task 2021-05-20T14:45:19.137Z] 14:45:19     INFO - TEST-UNEXPECTED-FAIL | browser/components/extensions/test/browser/browser_ext_menus.js | Uncaught exception - at chrome://mochikit/content/tests/SimpleTest/EventUtils.js:680 - TypeError: can't access property "getBoundingClientRect", aTarget is null```
Summary: Intermittent TV browser/components/extensions/test/browser/browser_ext_menus.js | Uncaught exception - at chrome://mochikit/content/tests/SimpleTest/EventUtils.js:680 - TypeError: can't access property "getBoundingClientRect", aTarget is null → Intermittent browser/components/extensions/test/browser/browser_ext_menus.js | Uncaught exception - at chrome://mochikit/content/tests/SimpleTest/EventUtils.js:680 - TypeError: can't access property "getBoundingClientRect", aTarget is null

Bug 1711497 only removed subtests. Could the first one have set up the environment in a way which prevented the failure before?

Flags: needinfo?(gijskruitbosch+bugs)

(In reply to Sebastian Hengst [:aryx] (needinfo on intermittent or backout) from comment #2)

Bug 1711497 only removed subtests. Could the first one have set up the environment in a way which prevented the failure before?

I checked and I don't see anything. I think that this is just a race that the removal made more likely to happen - though I can't reproduce locally on macOS, I guess all the failures are on Linux... I'm pushing a speculative fix to try. Keeping ni for now.

This is a bit peculiar. When we show the bookmarks toolbar, we create its children. When it then
gets hidden, they do not get removed. When we then re-enable the bookmarks toolbar, we call
rebuild on the next tick (because of the await in init in PlacesToolbarHelper), which
synchronously removes all the children of the toolbar, and then rebuilds the places node. It
does that async because it avoids doing synchronous layout falushes.

This breaks in the test - and the closer you put the "show the bookmarks toolbar" code to
the code that tries to open the context menu, the more reliably it breaks, because we try
to show the context menu right after we synchronously remove everything, and before we've
(asynchronously) put content back.

To avoid the raciness here, we wait for the custom event in the places toolbar to indicate
we're done building it.

Assignee: nobody → gijskruitbosch+bugs
Status: NEW → ASSIGNED
Pushed by gijskruitbosch@gmail.com: https://hg.mozilla.org/integration/autoland/rev/ff6c0a5b384a fix intermittent browser_ext_menus.js test failures caused by bookmarks toolbar race, r=rpl
Flags: needinfo?(gijskruitbosch+bugs)
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 90 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: