Closed Bug 1515802 Opened 4 years ago Closed 4 years ago

Intermittent browser/components/extensions/test/browser/browser_ext_contextMenus.js | Uncaught exception - at chrome://mochikit/content/tests/SimpleTest/EventUtils.js:507 - TypeError: aTarget is null

Categories

(WebExtensions :: Untriaged, defect, P5)

defect

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1515810

People

(Reporter: intermittent-bug-filer, Unassigned)

Details

(Keywords: intermittent-failure)

Filed by: nbeleuzu [at] mozilla.com

https://treeherder.mozilla.org/logviewer.html#?job_id=218223766&repo=autoland

https://queue.taskcluster.net/v1/task/Mh5cKs0UR2SFdqP5uQ1eeA/runs/0/artifacts/public/logs/live_backing.log

14:03:25     INFO - TEST-PASS | browser/components/extensions/test/browser/browser_ext_contextMenus.js | menu item gamma found - 
14:03:25     INFO - Leaving test bound testRemoveAllWithTwoExtensions
14:03:25     INFO - Entering test bound test_bookmark_contextmenu
14:03:25     INFO - Console message: [JavaScript Warning: "Password fields present on an insecure (http://) page. This is a security risk that allows user login credentials to be stolen." {file: "http://mochi.test:8888/browser/browser/components/extensions/test/browser/context.html" line: 0 column: 0 source: "0"}]
14:03:25     INFO - Buffered messages logged at 14:03:25
14:03:25     INFO - Global property added while loading chrome://browser/content/places/browserPlacesViews.js: PlacesViewBase
14:03:25     INFO - Extension loaded
14:03:25     INFO - Console message: Warning: attempting to write 8033 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.
14:03:25     INFO - Buffered messages finished
14:03:25     INFO - TEST-UNEXPECTED-FAIL | browser/components/extensions/test/browser/browser_ext_contextMenus.js | Uncaught exception - at chrome://mochikit/content/tests/SimpleTest/EventUtils.js:507 - TypeError: aTarget is null
14:03:25     INFO - Stack trace:
14:03:25     INFO - synthesizeMouseAtCenter@chrome://mochikit/content/tests/SimpleTest/EventUtils.js:507:7
14:03:25     INFO - openChromeContextMenu@chrome://mochitests/content/browser/browser/components/extensions/test/browser/head.js:401:3
14:03:25     INFO - async*test_bookmark_contextmenu@chrome://mochitests/content/browser/browser/components/extensions/test/browser/browser_ext_contextMenus.js:561:20
14:03:25     INFO - Async*Tester_execTest/<@chrome://mochikit/content/browser-test.js:1106:34
14:03:25     INFO - async*Tester_execTest@chrome://mochikit/content/browser-test.js:1097:16
14:03:25     INFO - nextTest/<@chrome://mochikit/content/browser-test.js:995:9
14:03:25     INFO - focusedOrLoaded/<@chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:803:59
14:03:25     INFO - Leaving test bound test_bookmark_contextmenu
14:03:25     INFO - Entering test bound test_bookmark_context_requires_permission
14:03:25     INFO - Extension loaded
14:03:25     INFO - Console message: Warning: attempting to write 8113 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.
14:04:01     INFO - Not taking screenshot here: see the one that was previously logged

I was able to trigger this error when I artificially removed the delay between showing the bookmarks bar and opening a menu; i.e. removing the code between these blocks: https://searchfox.org/mozilla-central/rev/c43240cef5829b8a2dec118faff8a5e1fec6ae1b/browser/components/extensions/test/browser/browser_ext_contextMenus.js#520-521,561-563

Minimal test case:

add_task(async function open_bookmark_menu() {
  await PlacesUtils.bookmarks.insert({
    parentGuid: "toolbar_____",
    url: "https://example.com/",
    title: "Example"});

  const bookmarksToolbar = document.getElementById("PersonalToolbar");
  setToolbarVisibility(bookmarksToolbar, true);

  await openChromeContextMenu(
    "placesContext",
    "#PersonalToolbar .bookmark-item:last-child"); // Error here.
  closeChromeContextMenu("placesContext");

  setToolbarVisibility(bookmarksToolbar, false);
});

When I apply the patch for bug 1515810 to the above reproduction case, the error does not occur any more. Hence I'm marking this as a duplicate of bug 1515810.

Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1515810
You need to log in before you can comment on or make changes to this bug.