Closed Bug 1603925 Opened 4 years ago Closed 4 years ago

Intermittent dom/tests/browser/browser_ConsoleStorageAPITests.js | Uncaught exception - [Exception... "(null)" nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)" location: "<unknown>" data: no]

Categories

(DevTools :: General, defect, P5)

defect

Tracking

(firefox73 fixed, firefox74 fixed)

RESOLVED FIXED
Firefox 74
Tracking Status
firefox73 --- fixed
firefox74 --- fixed

People

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

Details

(Keywords: intermittent-failure)

Attachments

(1 file)

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


[task 2019-12-14T10:08:57.188Z] 10:08:57 INFO - TEST-PASS | dom/tests/browser/browser_ConsoleStorageAPITests.js | Cleared Storage - 0 == 0 -
[task 2019-12-14T10:08:57.188Z] 10:08:57 INFO - Buffered messages finished
[task 2019-12-14T10:08:57.188Z] 10:08:57 INFO - TEST-UNEXPECTED-FAIL | dom/tests/browser/browser_ConsoleStorageAPITests.js | Uncaught exception - [Exception... "(null)" nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)" location: "<unknown>" data: no]
[task 2019-12-14T10:08:57.188Z] 10:08:57 INFO - Leaving test bound
[task 2019-12-14T10:08:57.188Z] 10:08:57 INFO - GECKO(2959) | MEMORY STAT | vsize 20974928MB | residentFast 1060MB
[task 2019-12-14T10:08:57.188Z] 10:08:57 INFO - TEST-OK | dom/tests/browser/browser_ConsoleStorageAPITests.js | took 2039ms
[task 2019-12-14T10:08:57.188Z] 10:08:57 INFO - checking window state

Seems like there are two calls to BrowserTestUtils.addTab without await right before we call SpecialPowers.spawn. So we might try to use JSWindowActors that will be destroyed by navigation?

Let's see if that fixes it:

Adding await before those addTab calls didn't work, but it seems the issue is with

  await SpecialPowers.spawn(browser, [], function() {
    // make sure a closed window's events are in fact removed from
    // the storage cache
    content.console.log("adding a new event");
  });

Right before, the test tab navigates from about:blank to a test document, and even though we wait for DOMContentLoaded, it seems this is called too soon and we get old JSWindowActors instead of the ones for the new global?

I can try to workaround this, but I'm confused as to why the approach here is invalid.

Additionally waiting for a DOM element fixes the intermittent, but this is a workaround.

Assignee: nobody → jdescottes
Status: NEW → ASSIGNED

I am pushing a patch for working around the issue but it would be great if someone more familiar with JS Window Actors could check if the pattern used in the test (waiting for DOMContentLoaded) is bad (what should be done instead?) or if something needs to be looked at on the platform side.

Hopefully, kmag can share some advice.

Flags: needinfo?(jdescottes)
Pushed by jdescottes@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/230e7d093c19
Wait for navigation in browser_ConsoleStorageAPITests.js r=nchevobbe
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 74
Flags: needinfo?(kmaglione+bmo)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: