Closed Bug 1576529 Opened 5 years ago Closed 4 years ago

Intermittent browser/base/content/test/siteIdentity/browser_no_mcb_for_onions.js | Test timed out -

Categories

(Firefox :: Site Identity, defect, P5)

defect

Tracking

()

RESOLVED WORKSFORME
Fission Milestone M4.1

People

(Reporter: intermittent-bug-filer, Unassigned)

References

Details

(Keywords: intermittent-failure, regression)

Filed by: cbrindusan [at] mozilla.com
Parsed log: https://treeherder.mozilla.org/logviewer.html#?job_id=263430230&repo=mozilla-central
Full log: https://queue.taskcluster.net/v1/task/UMIsMjyARiyCdVxhFkczoA/runs/0/artifacts/public/logs/live_backing.log


[task 2019-08-25T23:07:44.797Z] 23:07:44 INFO - TEST-START | browser/base/content/test/siteIdentity/browser_no_mcb_for_onions.js
[task 2019-08-25T23:07:45.182Z] 23:07:45 INFO - GECKO(11256) | JavaScript error: , line 0: TypeError: NetworkError when attempting to fetch resource.
[task 2019-08-25T23:08:29.818Z] 23:08:29 INFO - TEST-INFO | started process screenshot
[task 2019-08-25T23:08:29.881Z] 23:08:29 INFO - TEST-INFO | screenshot: exit 0
[task 2019-08-25T23:08:29.882Z] 23:08:29 INFO - Buffered messages logged at 23:07:44
[task 2019-08-25T23:08:29.882Z] 23:08:29 INFO - Entering test bound allowOnionMixedContent
[task 2019-08-25T23:08:29.883Z] 23:08:29 INFO - Console message: [JavaScript Error: "TypeError: NetworkError when attempting to fetch resource."]
[task 2019-08-25T23:08:29.883Z] 23:08:29 INFO - Console message: [JavaScript Error: "TypeError: NetworkError when attempting to fetch resource."]
[task 2019-08-25T23:08:29.883Z] 23:08:29 INFO - Console message: [JavaScript Error: "TypeError: NetworkError when attempting to fetch resource."]
[task 2019-08-25T23:08:29.883Z] 23:08:29 INFO - Buffered messages logged at 23:07:45
[task 2019-08-25T23:08:29.883Z] 23:08:29 INFO - Console message: [JavaScript Warning: "Loading failed for the <script> with source “http://123456789abcdef.onion:8/test.js”." {file: "https://example.com/browser/browser/base/content/test/siteIdentity/test_no_mcb_for_onions.html" line: 21}]
[task 2019-08-25T23:08:29.883Z] 23:08:29 INFO - Console message: [JavaScript Warning: "Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://123456789abcdef.onion:8/. (Reason: CORS request did not succeed)."]
[task 2019-08-25T23:08:29.884Z] 23:08:29 INFO - Console message: [JavaScript Error: "TypeError: NetworkError when attempting to fetch resource."]
[task 2019-08-25T23:08:29.884Z] 23:08:29 INFO - Buffered messages finished
[task 2019-08-25T23:08:29.884Z] 23:08:29 INFO - TEST-UNEXPECTED-FAIL | browser/base/content/test/siteIdentity/browser_no_mcb_for_onions.js | Test timed out -

This was caused by the patch for bug 1559841 (since backed out for now).

Blocks: 1559841
Fission Milestone: --- → M4

Georg, it seems that this test doesn't run properly locally for me because the .onion URLs fail to load. I've no experience of using Tor/onion locally. Could you point me in the right direction for the minimal steps necessary to get set up so that those URLs will resolve and I can start debugging why this test is failing?

Flags: needinfo?(gk)

FWIW I'm trying to run it using:

./mach mochitest --setpref fission.autostart=true browser/base/content/test/siteIdentity/browser_no_mcb_for_onions.js

(In reply to Jonathan Watt [:jwatt] from comment #5)

Georg, it seems that this test doesn't run properly locally for me because the .onion URLs fail to load. I've no experience of using Tor/onion locally. Could you point me in the right direction for the minimal steps necessary to get set up so that those URLs will resolve and I can start debugging why this test is failing?

The .onion URL in the test is not really meant to get loaded. I mean Firefox does not contain any capability at the moment to resolve .onion URLs but still the tests have been passing so far. Additionally, 123456789abcdef.onion is not a valid onion domain either.

So, I wonder what else is the problem here. Maybe port 8? Do you get the similar errors if you keep that port but change the URL to something non-onion?

Flags: needinfo?(gk)

Thanks, Georg. Seems like I assumed too much regarding what is failing.

The following reproduces the issue (loading doesn't complete with the patch applied):

data:text/html,<body><iframe src="http://123456789abcdef.onion:8/test.html"></iframe><script src="http://123456789abcdef.onion:8/test.js"></script><link href="http://123456789abcdef.onion:8/test.css" rel="stylesheet"></link>

Actually, this seems to be racy. Using the data: URI from the previous comment I can mostly repro. If I put the <iframe> element last, it's harder to repro. Or if I remove the <script> or <link> element it becomes a lot harder to repro. Or if I remove the <iframe> element it appears to not repro at all.

If I follow the code correctly, when an error occurs loading an in-process sub-document, we never call ChildEnteringOnload and therefore we never block the embedding document's 'load' event for that sub-document. The code as it currently stands for bug 1559841 makes the BrowserBridgeChild block the parent document's 'load' event as soon as it's created (before any loading has begun) and so the OOP-sub-document case is different. In this case we need to somehow notify the parent if an error occurs loading the sub-document so that it stops waiting for it to load.

As best I can tell the place to add the cross-process notification to is nsDocShell::DisplayLoadError. That seems to work, so I'll do that in the patch for bug 1559841 and see how the review does.

Roll unfixed test bugs from Fission Milestone M4 to M4.1

Fission Milestone: M4 → M4.1

Jonathan, this bug is a blocker for Fission's current milestone (M4.1 aka "fix all the mochitests"), but it's currently unassigned. The Fission team is hoping teams will fix their mochitests for Fission before the end of Q1 (75 or 76 Nightly).

Will your team be able to prioritize this bug for Q1? If you don't think this mochitest failure should block shipping Fission, just let me know.

If you have questions for Fission engineers, you can reach them in the #fission channel on Slack or Riot.

Flags: needinfo?(jwatt)

(In reply to Jonathan Watt [:jwatt] from comment #4)

This was caused by the patch for bug 1559841 (since backed out for now).

Landing the updated patches for that bug did not retrigger this intermittent failure. So this seems to be WORKSFORME.

Status: NEW → RESOLVED
Closed: 4 years ago
Flags: needinfo?(jwatt)
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.