Bug: Intermittent toolkit/components/httpsonlyerror/tests/browser/browser_errorpage.js | Uncaught exception - at resource://specialpowers/SpecialPowersParent.jsm:1222 - TypeError: can't access property "getActor", browsingContext.currentWindowGlobal is null
Status: RESOLVED
Priority: P5
Resolution: DUPLICATE
Created: 2021-01-14 11:13:51+00:00
Resolved: 2021-02-17 16:47:20+00:00

**Filed by:** btara [at] mozilla.com
**Parsed log:** https://treeherder.mozilla.org/logviewer?job_id=326665397&repo=mozilla-central
**Full log:** https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/SUepiPurR5a7R1-_HObTkg/runs/0/artifacts/public/logs/live_backing.log

---
```
[task 2021-01-14T10:36:24.488Z] 10:36:24     INFO - TEST-START | toolkit/components/httpsonlyerror/tests/browser/browser_errorpage.js
[task 2021-01-14T10:36:24.867Z] 10:36:24     INFO - GECKO(3765) | ###!!! [Child][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost
[task 2021-01-14T10:36:26.045Z] 10:36:26     INFO - TEST-INFO | started process screentopng
[task 2021-01-14T10:36:26.846Z] 10:36:26     INFO - TEST-INFO | screentopng: exit 0
[task 2021-01-14T10:36:26.846Z] 10:36:26     INFO - Buffered messages logged at 10:36:24
[task 2021-01-14T10:36:26.847Z] 10:36:26     INFO - Entering test bound 
[task 2021-01-14T10:36:26.847Z] 10:36:26     INFO - Leaving test bound 
[task 2021-01-14T10:36:26.848Z] 10:36:26     INFO - Entering test bound 
[task 2021-01-14T10:36:26.848Z] 10:36:26     INFO - Check that the error pages shows up
[task 2021-01-14T10:36:26.849Z] 10:36:26     INFO - Console message: [JavaScript Warning: "HTTPS-Only Mode: Upgrading insecure request “http://example.com/” to use “https”."]
[task 2021-01-14T10:36:26.849Z] 10:36:26     INFO - Console message: [JavaScript Warning: "HTTPS-Only Mode: Upgrading insecure request “http://expired.example.com/” to use “https”."]
[task 2021-01-14T10:36:26.850Z] 10:36:26     INFO - Console message: [JavaScript Warning: "HTTPS-Only Mode: Upgrading insecure request “http://self-signed.example.com/” to use “https”."]
[task 2021-01-14T10:36:26.850Z] 10:36:26     INFO - Console message: [JavaScript Error: "HTTPS-Only Mode: Upgrading insecure request “https://self-signed.example.com/” failed. (M21-C16370)"]
[task 2021-01-14T10:36:26.851Z] 10:36:26     INFO - Console message: [JavaScript Error: "HTTPS-Only Mode: Upgrading insecure request “https://expired.example.com/” failed. (M21-C8181)"]
[task 2021-01-14T10:36:26.851Z] 10:36:26     INFO - Buffered messages logged at 10:36:25
[task 2021-01-14T10:36:26.852Z] 10:36:26     INFO - Loading and waiting for the error page
[task 2021-01-14T10:36:26.853Z] 10:36:26     INFO - Loading and waiting for the error page
[task 2021-01-14T10:36:26.854Z] 10:36:26     INFO - TEST-PASS | toolkit/components/httpsonlyerror/tests/browser/browser_errorpage.js | Should not show error page on upgradeable website. - false == false - 
[task 2021-01-14T10:36:26.856Z] 10:36:26     INFO - TEST-PASS | toolkit/components/httpsonlyerror/tests/browser/browser_errorpage.js | Should show error page on unkown-issuer error. - true == true - 
[task 2021-01-14T10:36:26.857Z] 10:36:26     INFO - TEST-PASS | toolkit/components/httpsonlyerror/tests/browser/browser_errorpage.js | Should show error page on bad-certificate error. - true == true - 
[task 2021-01-14T10:36:26.858Z] 10:36:26     INFO - Leaving test bound 
[task 2021-01-14T10:36:26.861Z] 10:36:26     INFO - Entering test bound 
[task 2021-01-14T10:36:26.862Z] 10:36:26     INFO - Check that the go-back button returns to previous page
[task 2021-01-14T10:36:26.863Z] 10:36:26     INFO - Console message: [JavaScript Warning: "HTTPS-Only Mode: Upgrading insecure request “http://expired.example.com/” to use “https”."]
[task 2021-01-14T10:36:26.863Z] 10:36:26     INFO - Console message: [JavaScript Error: "HTTPS-Only Mode: Upgrading insecure request “https://expired.example.com/” failed. (M21-C8181)"]
[task 2021-01-14T10:36:26.864Z] 10:36:26     INFO - Loading and waiting for the error page
[task 2021-01-14T10:36:26.864Z] 10:36:26     INFO - TEST-PASS | toolkit/components/httpsonlyerror/tests/browser/browser_errorpage.js | !webNavigation.canGoBack should be false. - 
[task 2021-01-14T10:36:26.865Z] 10:36:26     INFO - TEST-PASS | toolkit/components/httpsonlyerror/tests/browser/browser_errorpage.js | webNavigation.canGoForward should be false. - 
[task 2021-01-14T10:36:26.867Z] 10:36:26     INFO - Buffered messages logged at 10:36:26
[task 2021-01-14T10:36:26.868Z] 10:36:26     INFO - TEST-PASS | toolkit/components/httpsonlyerror/tests/browser/browser_errorpage.js | There should be 1 shistory entry. - 
[task 2021-01-14T10:36:26.869Z] 10:36:26     INFO - Buffered messages finished
[task 2021-01-14T10:36:26.869Z] 10:36:26     INFO - TEST-UNEXPECTED-FAIL | toolkit/components/httpsonlyerror/tests/browser/browser_errorpage.js | Uncaught exception - at resource://specialpowers/SpecialPowersParent.jsm:1222 - TypeError: can't access property "getActor", browsingContext.currentWindowGlobal is null
[task 2021-01-14T10:36:26.869Z] 10:36:26     INFO - Stack trace:
[task 2021-01-14T10:36:26.870Z] 10:36:26     INFO - receiveMessage@resource://specialpowers/SpecialPowersParent.jsm:1222:24
[task 2021-01-14T10:36:26.871Z] 10:36:26     INFO - Leaving test bound 
[task 2021-01-14T10:36:26.871Z] 10:36:26     INFO - Entering test bound 
[task 2021-01-14T10:36:26.872Z] 10:36:26     INFO - Check that the go-back button returns to about:home
[task 2021-01-14T10:36:26.872Z] 10:36:26     INFO - Console message: [JavaScript Warning: "HTTPS-Only Mode: Upgrading insecure request “http://expired.example.com/” to use “https”."]
[task 2021-01-14T10:36:26.873Z] 10:36:26     INFO - Console message: [JavaScript Error: "HTTPS-Only Mode: Upgrading insecure request “https://expired.example.com/” failed. (M21-C8181)"]
[task 2021-01-14T10:36:26.874Z] 10:36:26     INFO - GECKO(3765) | JavaScript error: resource://testing-common/ContentEventListenerChild.jsm, line 138: InvalidStateError: JSWindowActorChild.sendAsyncMessage: JSWindowActorChild cannot send at the moment
[task 2021-01-14T10:36:26.874Z] 10:36:26     INFO - TEST-PASS | toolkit/components/httpsonlyerror/tests/browser/browser_errorpage.js | webNavigation.canGoBack should be true before navigation. - 
[task 2021-01-14T10:36:26.877Z] 10:36:26     INFO - TEST-PASS | toolkit/components/httpsonlyerror/tests/browser/browser_errorpage.js | webNavigation.canGoForward should be false before navigation. - 
[task 2021-01-14T10:36:26.877Z] 10:36:26     INFO - TEST-PASS | toolkit/components/httpsonlyerror/tests/browser/browser_errorpage.js | There should be 1 shistory entries. - 
[task 2021-01-14T10:36:26.878Z] 10:36:26     INFO - Console message: [JavaScript Error: "InvalidStateError: JSWindowActorChild.sendAsyncMessage: JSWindowActorChild cannot send at the moment" {file: "resource://testing-common/ContentEventListenerChild.jsm" line: 138}]
[task 2021-01-14T10:36:26.879Z] 10:36:26     INFO - listener@resource://testing-common/ContentEventListenerChild.jsm:138:20
[task 2021-01-14T10:36:26.879Z] 10:36:26     INFO - @chrome://global/content/httpsonlyerror/errorpage.js:78:10
[task 2021-01-14T10:36:26.880Z] 10:36:26     INFO - 
[task 2021-01-14T10:36:26.880Z] 10:36:26     INFO - GECKO(3765) | JavaScript error: resource://testing-common/ContentEventListenerChild.jsm, line 138: InvalidStateError: JSWindowActorChild.sendAsyncMessage: JSWindowActorChild cannot send at the moment
[task 2021-01-14T10:36:26.881Z] 10:36:26     INFO - TEST-PASS | toolkit/components/httpsonlyerror/tests/browser/browser_errorpage.js | webNavigation.canGoBack should be false after navigation. - 
[task 2021-01-14T10:36:26.881Z] 10:36:26     INFO - TEST-PASS | toolkit/components/httpsonlyerror/tests/browser/browser_errorpage.js | webNavigation.canGoForward should be true after navigation. - 
[task 2021-01-14T10:36:26.882Z] 10:36:26     INFO - TEST-PASS | toolkit/components/httpsonlyerror/tests/browser/browser_errorpage.js | Should go back to previous page after button click. - 
[task 2021-01-14T10:36:26.882Z] 10:36:26     INFO - Leaving test bound 
[task 2021-01-14T10:36:26.886Z] 10:36:26     INFO - Console message: [JavaScript Error: "can't access property "contentBlockingAllowListPrincipal", this.browsingContext.currentWindowGlobal is null" {file: "chrome://global/content/elements/browser-custom-element.js" line: 612}]
[task 2021-01-14T10:36:26.886Z] 10:36:26     INFO - get contentBlockingAllowListPrincipal@chrome://global/content/elements/browser-custom-element.js:612:7
[task 2021-01-14T10:36:26.887Z] 10:36:26     INFO - _basePrincipalForAntiTrackingCommon@resource://gre/modules/ContentBlockingAllowList.jsm:47:21
[task 2021-01-14T10:36:26.887Z] 10:36:26     INFO - canHandle@resource://gre/modules/ContentBlockingAllowList.jsm:73:17
[task 2021-01-14T10:36:26.887Z] 10:36:26     INFO - onLocationChange@chrome://browser/content/browser-siteProtections.js:1724:35
[task 2021-01-14T10:36:26.888Z] 10:36:26     INFO - onLocationChange@chrome://browser/content/browser.js:5265:27
[task 2021-01-14T10:36:26.888Z] 10:36:26     INFO - callListeners@chrome://browser/content/tabbrowser.js:826:31
[task 2021-01-14T10:36:26.889Z] 10:36:26     INFO - _callProgressListeners@chrome://browser/content/tabbrowser.js:840:22
[task 2021-01-14T10:36:26.889Z] 10:36:26     INFO - updateCurrentBrowser@chrome://browser/content/tabbrowser.js:1042:12
[task 2021-01-14T10:36:26.889Z] 10:36:26     INFO - _setupEventListeners/<@chrome://browser/content/tabbrowser.js:5287:16
[task 2021-01-14T10:36:26.890Z] 10:36:26     INFO - set selectedIndex@chrome://global/content/elements/tabbox.js:197:14
[task 2021-01-14T10:36:26.890Z] 10:36:26     INFO - set selectedPanel@chrome://global/content/elements/tabbox.js:216:7
[task 2021-01-14T10:36:26.891Z] 10:36:26     INFO - set selectedIndex@chrome://global/content/elements/tabbox.js:545:11
[task 2021-01-14T10:36:26.891Z] 10:36:26     INFO - set selectedItem@chrome://global/content/elements/tabbox.js:565:35
[task 2021-01-14T10:36:26.892Z] 10:36:26     INFO - set selectedTab@chrome://global/content/elements/tabbox.js:87:11
[task 2021-01-14T10:36:26.892Z] 10:36:26     INFO - set selectedTab@chrome://browser/content/tabbrowser.js:290:7
[task 2021-01-14T10:36:26.893Z] 10:36:26     INFO - _blurTab@chrome://browser/content/tabbrowser.js:3824:31
[task 2021-01-14T10:36:26.893Z] 10:36:26     INFO - _beginRemoveTab@chrome://browser/content/tabbrowser.js:3472:14
[task 2021-01-14T10:36:26.893Z] 10:36:26     INFO - removeTab@chrome://browser/content/tabbrowser.js:3340:15
[task 2021-01-14T10:36:26.893Z] 10:36:26     INFO - removeTab@resource://testing-common/BrowserTestUtils.jsm:1634:30
[task 2021-01-14T10:36:26.894Z] 10:36:26     INFO - @chrome://mochitests/content/browser/toolkit/components/httpsonlyerror/tests/browser/browser_errorpage.js:163:20
[task 2021-01-14T10:36:26.895Z] 10:36:26     INFO - 
[task 2021-01-14T10:36:26.896Z] 10:36:26     INFO - Console message: [JavaScript Error: "can't access property "contentBlockingAllowListPrincipal", this.browsingContext.currentWindowGlobal is null" {file: "chrome://global/content/elements/browser-custom-element.js" line: 612}]
[task 2021-01-14T10:36:26.897Z] 10:36:26     INFO - get contentBlockingAllowListPrincipal@chrome://global/content/elements/browser-custom-element.js:612:7
[task 2021-01-14T10:36:26.897Z] 10:36:26     INFO - _basePrincipalForAntiTrackingCommon@resource://gre/modules/ContentBlockingAllowList.jsm:47:21
[task 2021-01-14T10:36:26.898Z] 10:36:26     INFO - canHandle@resource://gre/modules/ContentBlockingAllowList.jsm:73:17
[task 2021-01-14T10:36:26.898Z] 10:36:26     INFO - onContentBlockingEvent@chrome://browser/content/browser-siteProtections.js:1868:35
[task 2021-01-14T10:36:26.898Z] 10:36:26     INFO - onContentBlockingEvent@chrome://browser/content/browser.js:5414:25
[task 2021-01-14T10:36:26.899Z] 10:36:26     INFO - callListeners@chrome://browser/content/tabbrowser.js:826:31
[task 2021-01-14T10:36:26.899Z] 10:36:26     INFO - _callProgressListeners@chrome://browser/content/tabbrowser.js:840:22
[task 2021-01-14T10:36:26.899Z] 10:36:26     INFO - updateCurrentBrowser@chrome://browser/content/tabbrowser.js:1061:14
[task 2021-01-14T10:36:26.900Z] 10:36:26     INFO - _setupEventListeners/<@chrome://browser/content/tabbrowser.js:5287:16
[task 2021-01-14T10:36:26.900Z] 10:36:26     INFO - set selectedIndex@chrome://global/content/elements/tabbox.js:197:14
[task 2021-01-14T10:36:26.901Z] 10:36:26     INFO - set selectedPanel@chrome://global/content/elements/tabbox.js:216:7
[task 2021-01-14T10:36:26.901Z] 10:36:26     INFO - set selectedIndex@chrome://global/content/elements/tabbox.js:545:11
[task 2021-01-14T10:36:26.902Z] 10:36:26     INFO - set selectedItem@chrome://global/content/elements/tabbox.js:565:35
[task 2021-01-14T10:36:26.902Z] 10:36:26     INFO - set selectedTab@chrome://global/content/elements/tabbox.js:87:11
[task 2021-01-14T10:36:26.902Z] 10:36:26     INFO - set selectedTab@chrome://browser/content/tabbrowser.js:290:7
[task 2021-01-14T10:36:26.903Z] 10:36:26     INFO - _blurTab@chrome://browser/content/tabbrowser.js:3824:31
[task 2021-01-14T10:36:26.903Z] 10:36:26     INFO - _beginRemoveTab@chrome://browser/content/tabbrowser.js:3472:14
[task 2021-01-14T10:36:26.904Z] 10:36:26     INFO - removeTab@chrome://browser/content/tabbrowser.js:3340:15
[task 2021-01-14T10:36:26.904Z] 10:36:26     INFO - removeTab@resource://testing-common/BrowserTestUtils.jsm:1634:30
[task 2021-01-14T10:36:26.905Z] 10:36:26     INFO - @chrome://mochitests/content/browser/toolkit/components/httpsonlyerror/tests/browser/browser_errorpage.js:163:20
[task 2021-01-14T10:36:26.905Z] 10:36:26     INFO - 
[task 2021-01-14T10:36:26.905Z] 10:36:26     INFO - Console message: [JavaScript Error: "InvalidStateError: JSWindowActorChild.sendAsyncMessage: JSWindowActorChild cannot send at the moment" {file: "resource://testing-common/ContentEventListenerChild.jsm" line: 138}]
[task 2021-01-14T10:36:26.906Z] 10:36:26     INFO - listener@resource://testing-common/ContentEventListenerChild.jsm:138:20
[task 2021-01-14T10:36:26.906Z] 10:36:26     INFO - 
[task 2021-01-14T10:36:26.907Z] 10:36:26     INFO - GECKO(3765) | MEMORY STAT vsizeMaxContiguous not supported in this build configuration.
[task 2021-01-14T10:36:26.908Z] 10:36:26     INFO - GECKO(3765) | MEMORY STAT | vsize 2832MB | residentFast 295MB | heapAllocated 111MB
[task 2021-01-14T10:36:26.908Z] 10:36:26     INFO - TEST-OK | toolkit/components/httpsonlyerror/tests/browser/browser_errorpage.js | took 2173ms
[task 2021-01-14T10:36:26.909Z] 10:36:26     INFO - Not taking screenshot here: see the one that was previously logged
[task 2021-01-14T10:36:26.909Z] 10:36:26     INFO - TEST-UNEXPECTED-FAIL | toolkit/components/httpsonlyerror/tests/browser/browser_errorpage.js | Found an unexpected tab at the end of test run: https://expired.example.com/ - 
[task 2021-01-14T10:36:26.910Z] 10:36:26     INFO - checking window state```