Bug: Perma browser/components/newtab/test/browser/abouthomecache/browser_locale_change.js | There should be page scripts. - false == true - got false, expected true (operator ==) when Gecko 104 merges to Beta on 2022-07-25
Status: VERIFIED
Priority: --
Resolution: FIXED
Created: 2022-07-11 11:45:34+00:00
Resolved: 2022-07-18 06:37:34+00:00

[Central-as-beta simulation](https://treeherder.mozilla.org/jobs?repo=try&group_state=expanded&selectedTaskRun=CiOpdVPCRgCvMRBNVN74sA.0&resultStatus=testfailed%2Cbusted%2Cexception&revision=0b7685c3b147ca3e2e9b8068eb6a22f312b0b45d&test_paths=browser%2Fcomponents%2Fnewtab%2Ftest%2Fbrowser%2Fabouthomecache)

[How to run these simulations](https://wiki.mozilla.org/Sheriffing/How_To/Beta_simulations#TRUNK_AS_EARLY_BETA)

[Failure log:](https://treeherder.mozilla.org/logviewer?job_id=383943686&repo=try&lineNumber=20044)

```
[task 2022-07-11T10:54:40.805Z] 10:54:40     INFO - TEST-START | browser/components/newtab/test/browser/abouthomecache/browser_locale_change.js
[task 2022-07-11T10:54:40.834Z] 10:54:40     INFO - GECKO(10694) | [Child 10789: Main Thread]: I/DocShellAndDOMWindowLeak ++DOCSHELL 7f64e8278000 == 10 [pid = 10789] [id = 11]
[task 2022-07-11T10:54:40.836Z] 10:54:40     INFO - GECKO(10694) | [Child 10789: Main Thread]: I/DocShellAndDOMWindowLeak ++DOMWINDOW == 43 (7f64e9754de0) [pid = 10789] [serial = 44] [outer = 0]
[task 2022-07-11T10:54:40.838Z] 10:54:40     INFO - GECKO(10694) | [Child 10789: Main Thread]: I/DocShellAndDOMWindowLeak ++DOMWINDOW == 44 (7f64e8278c00) [pid = 10789] [serial = 45] [outer = 7f64e9754de0]
[task 2022-07-11T10:54:40.859Z] 10:54:40     INFO - GECKO(10694) | [Child 10845, Main Thread] WARNING: '!CanHandleWith(aPresContext)', file /builds/worker/checkouts/gecko/dom/events/IMEStateManager.cpp:498
[task 2022-07-11T10:54:40.968Z] 10:54:40     INFO - GECKO(10694) | [Child 10789: Main Thread]: I/DocShellAndDOMWindowLeak ++DOMWINDOW == 45 (7f64e827ac00) [pid = 10789] [serial = 46] [outer = 7f64e9754de0]
[task 2022-07-11T10:54:41.535Z] 10:54:41     INFO - GECKO(10694) | [Child 10789: Main Thread]: I/DocShellAndDOMWindowLeak ++DOMWINDOW == 46 (7f64e827dc00) [pid = 10789] [serial = 47] [outer = 7f64e9754de0]
[task 2022-07-11T10:54:41.909Z] 10:54:41     INFO - GECKO(10694) | [Child 10869: Main Thread]: I/DocShellAndDOMWindowLeak --DOMWINDOW == 2 (7f0d2c028800) [pid = 10869] [serial = 2] [outer = 0] [url = about:blank]
[task 2022-07-11T10:54:41.912Z] 10:54:41     INFO - GECKO(10694) | [Child 10869: Main Thread]: I/DocShellAndDOMWindowLeak --DOCSHELL 7f0d11142800 == 0 [pid = 10869] [id = 1] [url = about:blank]
[task 2022-07-11T10:54:41.987Z] 10:54:41     INFO - TEST-INFO | started process screentopng
[task 2022-07-11T10:54:42.587Z] 10:54:42     INFO - TEST-INFO | screentopng: exit 0
[task 2022-07-11T10:54:42.588Z] 10:54:42     INFO - Buffered messages logged at 10:54:40
[task 2022-07-11T10:54:42.589Z] 10:54:42     INFO - Entering test bound test_locale_change
[task 2022-07-11T10:54:42.591Z] 10:54:42     INFO - Console message: [JavaScript Error: "TypeError: browser is null" {file: "resource:///actors/ContentSearchParent.jsm" line: 669}]
[task 2022-07-11T10:54:42.591Z] 10:54:42     INFO - receiveMessage@resource:///actors/ContentSearchParent.jsm:669:5
[task 2022-07-11T10:54:42.592Z] 10:54:42     INFO - 
[task 2022-07-11T10:54:42.593Z] 10:54:42     INFO - Console message: [JavaScript Error: "TypeError: browser is null" {file: "resource:///actors/ContentSearchParent.jsm" line: 669}]
[task 2022-07-11T10:54:42.593Z] 10:54:42     INFO - receiveMessage@resource:///actors/ContentSearchParent.jsm:669:5
[task 2022-07-11T10:54:42.593Z] 10:54:42     INFO - 
[task 2022-07-11T10:54:42.595Z] 10:54:42     INFO - Buffered messages logged at 10:54:41
[task 2022-07-11T10:54:42.595Z] 10:54:42     INFO - Simulating restart of the browser
[task 2022-07-11T10:54:42.595Z] 10:54:42     INFO - Intentionally skipping shutdown write
[task 2022-07-11T10:54:42.602Z] 10:54:42     INFO - Waiting for AboutHomeStartupCacheChild to uninit
[task 2022-07-11T10:54:42.602Z] 10:54:42     INFO - AboutHomeStartupCacheChild uninitted
[task 2022-07-11T10:54:42.602Z] 10:54:42     INFO - Waiting for about:home to load
[task 2022-07-11T10:54:42.602Z] 10:54:42     INFO - about:home loaded
[task 2022-07-11T10:54:42.602Z] 10:54:42     INFO - Buffered messages finished
[task 2022-07-11T10:54:42.602Z] 10:54:42     INFO - TEST-UNEXPECTED-FAIL | browser/components/newtab/test/browser/abouthomecache/browser_locale_change.js | There should be page scripts. - false == true - got false, expected true (operator ==)
[task 2022-07-11T10:54:42.602Z] 10:54:42     INFO - Stack trace:
[task 2022-07-11T10:54:42.603Z] 10:54:42     INFO - @chrome://mochitests/content/browser/browser/components/newtab/test/browser/abouthomecache/head.js:254:12
[task 2022-07-11T10:54:42.603Z] 10:54:42     INFO - execute@resource://specialpowers/SpecialPowersSandbox.jsm:143:12
[task 2022-07-11T10:54:42.603Z] 10:54:42     INFO - _spawnTask@resource://specialpowers/SpecialPowersChild.jsm:1640:15
[task 2022-07-11T10:54:42.603Z] 10:54:42     INFO - receiveMessage@resource://specialpowers/SpecialPowersChild.jsm:298:21
[task 2022-07-11T10:54:42.603Z] 10:54:42     INFO - Not taking screenshot here: see the one that was previously logged
[task 2022-07-11T10:54:42.607Z] 10:54:42     INFO - TEST-UNEXPECTED-FAIL | browser/components/newtab/test/browser/abouthomecache/browser_locale_change.js | Uncaught exception in test - at chrome://mochitests/content/browser/browser/components/newtab/test/browser/abouthomecache/head.js:257 - TypeError: lastScript is undefined
[task 2022-07-11T10:54:42.607Z] 10:54:42     INFO - Stack trace:
[task 2022-07-11T10:54:42.608Z] 10:54:42     INFO - @chrome://mochitests/content/browser/browser/components/newtab/test/browser/abouthomecache/head.js:257:1
[task 2022-07-11T10:54:42.609Z] 10:54:42     INFO - execute@resource://specialpowers/SpecialPowersSandbox.jsm:143:12
[task 2022-07-11T10:54:42.609Z] 10:54:42     INFO - _spawnTask@resource://specialpowers/SpecialPowersChild.jsm:1640:15
[task 2022-07-11T10:54:42.609Z] 10:54:42     INFO - receiveMessage@resource://specialpowers/SpecialPowersChild.jsm:298:21
[task 2022-07-11T10:54:42.614Z] 10:54:42     INFO - Leaving test bound test_locale_change
[task 2022-07-11T10:54:42.615Z] 10:54:42     INFO - GECKO(10694) | MEMORY STAT | vsize 3015MB | residentFast 426MB | heapAllocated 182MB
[task 2022-07-11T10:54:42.616Z] 10:54:42     INFO - TEST-OK | browser/components/newtab/test/browser/abouthomecache/browser_locale_change.js | took 1234ms
[task 2022-07-11T10:54:42.616Z] 10:54:42     INFO - Not taking screenshot here: see the one that was previously logged
[task 2022-07-11T10:54:42.617Z] 10:54:42     INFO - TEST-UNEXPECTED-FAIL | browser/components/newtab/test/browser/abouthomecache/browser_locale_change.js | Found an unexpected tab at the end of test run: about:home - 
[task 2022-07-11T10:54:42.618Z] 10:54:42     INFO - GECKO(10694) | [Child 10789, Main Thread] WARNING: '!CanHandleWith(aPresContext)', file /builds/worker/checkouts/gecko/dom/events/IMEStateManager.cpp:498
[task 2022-07-11T10:54:42.619Z] 10:54:42     INFO - GECKO(10694) | [Child 10869: Main Thread]: I/DocShellAndDOMWindowLeak ++DOCSHELL 7f0d11143c00 == 1 [pid = 10869] [id = 2]
[task 2022-07-11T10:54:42.620Z] 10:54:42     INFO - GECKO(10694) | [Child 10869: Main Thread]: I/DocShellAndDOMWindowLeak ++DOMWINDOW == 3 (7f0d2c0919f0) [pid = 10869] [serial = 5] [outer = 0]
[task 2022-07-11T10:54:42.620Z] 10:54:42     INFO - GECKO(10694) | [Child 10869: Main Thread]: I/DocShellAndDOMWindowLeak ++DOMWINDOW == 4 (7f0d11144000) [pid = 10869] [serial = 6] [outer = 7f0d2c0919f0]
[task 2022-07-11T10:54:42.621Z] 10:54:42     INFO - GECKO(10694) | [Child 10845: Main Thread]: I/DocShellAndDOMWindowLeak --DOMWINDOW == 3 (7f7b21892130) [pid = 10845] [serial = 4] [outer = 0] [url = about:blank]
[task 2022-07-11T10:54:42.622Z] 10:54:42     INFO - GECKO(10694) | [Child 10845, Main Thread] WARNING: '!CanHandleWith(aPresContext)', file /builds/worker/checkouts/gecko/dom/events/IMEStateManager.cpp:498
[task 2022-07-11T10:54:42.623Z] 10:54:42     INFO - GECKO(10694) | [Child 10789: Main Thread]: I/DocShellAndDOMWindowLeak --DOCSHELL 7f64ea7c8800 == 9 [pid = 10789] [id = 6] [url = about:home]
[task 2022-07-11T10:54:42.623Z] 10:54:42     INFO - checking window state
[task 2022-07-11T10:54:42.624Z] 10:54:42     INFO - GECKO(10694) | [Child 10789: Main Thread]: I/DocShellAndDOMWindowLeak --DOCSHELL 7f64eacdb800 == 8 [pid = 10789] [id = 4] [url = about:home]
[task 2022-07-11T10:54:42.625Z] 10:54:42     INFO - GECKO(10694) | [Child 10789: Main Thread]: I/DocShellAndDOMWindowLeak --DOCSHELL 7f64ea7c1c00 == 7 [pid = 10789] [id = 5] [url = about:home]
[task 2022-07-11T10:54:42.626Z] 10:54:42     INFO - GECKO(10694) | [Child 10789: Main Thread]: I/DocShellAndDOMWindowLeak --DOCSHELL 7f64eacd4800 == 6 [pid = 10789] [id = 3] [url = about:home]
[task 2022-07-11T10:54:42.627Z] 10:54:42     INFO - GECKO(10694) | [Child 10789: Main Thread]: I/DocShellAndDOMWindowLeak --DOCSHELL 7f64e9722000 == 5 [pid = 10789] [id = 7] [url = about:home]
[task 2022-07-11T10:54:42.628Z] 10:54:42     INFO - GECKO(10694) | [Child 10789: Main Thread]: I/DocShellAndDOMWindowLeak --DOMWINDOW == 45 (7f64ece83800) [pid = 10789] [serial = 9] [outer = 0] [url = about:home]
[task 2022-07-11T10:54:42.629Z] 10:54:42     INFO - GECKO(10694) | [Child 10789: Main Thread]: I/DocShellAndDOMWindowLeak --DOMWINDOW == 44 (7f64eacd4c00) [pid = 10789] [serial = 13] [outer = 0] [url = about:blank]
[task 2022-07-11T10:54:42.630Z] 10:54:42     INFO - GECKO(10694) | [Child 10789: Main Thread]: I/DocShellAndDOMWindowLeak --DOMWINDOW == 43 (7f64ece82c00) [pid = 10789] [serial = 8] [outer = 0] [url = about:blank]
[task 2022-07-11T10:54:42.631Z] 10:54:42     INFO - GECKO(10694) | [Child 10789: Main Thread]: I/DocShellAndDOMWindowLeak --DOMWINDOW == 42 (7f64ece7ec00) [pid = 10789] [serial = 5] [outer = 0] [url = about:blank]
[task 2022-07-11T10:54:42.631Z] 10:54:42     INFO - GECKO(10694) | [Child 10789: Main Thread]: I/DocShellAndDOMWindowLeak --DOMWINDOW == 41 (7f64ee074c00) [pid = 10789] [serial = 3] [outer = 0] [url = about:home]
[task 2022-07-11T10:54:42.632Z] 10:54:42     INFO - GECKO(10694) | [Child 10789: Main Thread]: I/DocShellAndDOMWindowLeak --DOMWINDOW == 40 (7f64f2f44400) [pid = 10789] [serial = 2] [outer = 0] [url = about:blank]
[task 2022-07-11T10:54:42.633Z] 10:54:42     INFO - GECKO(10694) | [Child 10789: Main Thread]: I/DocShellAndDOMWindowLeak --DOCSHELL 7f64e9726800 == 4 [pid = 10789] [id = 8] [url = about:home]
[task 2022-07-11T10:54:42.634Z] 10:54:42     INFO - TEST-START | browser/components/newtab/test/browser/abouthomecache/browser_no_cache.js
```
Hello, could you take a look at this failure please? It seems to be caused by Bug 1776475 . Thank you!