Bug: Intermittent browser/components/preferences/tests/browser_security-2.js | uncaught exception - ReferenceError: can't access lexical declaration 'Preferences' before initialization at @chrome://browser/content/preferences/main.js:47:1
Status: RESOLVED
Priority: P5
Resolution: INCOMPLETE
Created: 2022-05-13 23:36:51+00:00
Resolved: 2022-06-07 17:05:49+00:00

**Filed by:** imoraru [at] mozilla.com
**Parsed log:** https://treeherder.mozilla.org/logviewer?job_id=378031368&repo=mozilla-beta
**Full log:** https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/SS6HR-VzRHqvLv8CMXP3nw/runs/0/artifacts/public/logs/live_backing.log

---
```
[task 2022-05-13T22:33:06.098Z] 22:33:06     INFO - TEST-START | browser/components/preferences/tests/browser_security-2.js
[task 2022-05-13T22:33:07.618Z] 22:33:07     INFO - GECKO(4884) | _create_dc_and_bitmap: Not enough storage is available to process this command.
[task 2022-05-13T22:33:08.043Z] 22:33:08     INFO - GECKO(4884) | [GFX1-]: wr_renderer_render: OutOfMemory
[task 2022-05-13T22:33:08.203Z] 22:33:08     INFO - GECKO(4884) | JavaScript error: , line 0: uncaught exception: out of memory
[task 2022-05-13T22:33:08.204Z] 22:33:08     INFO - GECKO(4884) | JavaScript error: , line 0: uncaught exception: out of memory
<...>
[task 2022-05-13T22:33:08.326Z] 22:33:08     INFO - TEST-PASS | browser/components/preferences/tests/browser_security-2.js | malware table has been sorted - ["goog-malware-proto","test-malware-simple"] deepEqual ["goog-malware-proto","test-malware-simple"] - 
[task 2022-05-13T22:33:08.327Z] 22:33:08     INFO - Buffered messages finished
[task 2022-05-13T22:33:08.328Z] 22:33:08     INFO - TEST-UNEXPECTED-FAIL | browser/components/preferences/tests/browser_security-2.js | uncaught exception - ReferenceError: can't access lexical declaration 'Preferences' before initialization at @chrome://browser/content/preferences/main.js:47:1
[task 2022-05-13T22:33:08.328Z] 22:33:08     INFO - 
[task 2022-05-13T22:33:08.328Z] 22:33:08     INFO - Stack trace:
[task 2022-05-13T22:33:08.328Z] 22:33:08     INFO - chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:simpletestOnerror:1957
[task 2022-05-13T22:33:08.329Z] 22:33:08     INFO - GECKO(4884) | JavaScript error: chrome://browser/content/preferences/main.js, line 47: ReferenceError: can't access lexical declaration 'Preferences' before initialization
[task 2022-05-13T22:33:08.330Z] 22:33:08     INFO - Console message: [JavaScript Error: "ReferenceError: can't access lexical declaration 'Preferences' before initialization" {file: "chrome://browser/content/preferences/main.js" line: 47}]
[task 2022-05-13T22:33:08.330Z] 22:33:08     INFO - @chrome://browser/content/preferences/main.js:47:1
[task 2022-05-13T22:33:08.330Z] 22:33:08     INFO - 
[task 2022-05-13T22:33:08.331Z] 22:33:08     INFO - Not taking screenshot here: see the one that was previously logged
[task 2022-05-13T22:33:08.332Z] 22:33:08     INFO - TEST-UNEXPECTED-FAIL | browser/components/preferences/tests/browser_security-2.js | uncaught exception - ReferenceError: can't access lexical declaration 'Preferences' before initialization at @chrome://browser/content/preferences/home.js:23:1
[task 2022-05-13T22:33:08.332Z] 22:33:08     INFO - 
[task 2022-05-13T22:33:08.332Z] 22:33:08     INFO - Stack trace:
[task 2022-05-13T22:33:08.332Z] 22:33:08     INFO - chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:simpletestOnerror:1957
[task 2022-05-13T22:33:08.333Z] 22:33:08     INFO - GECKO(4884) | JavaScript error: chrome://browser/content/preferences/home.js, line 23: ReferenceError: can't access lexical declaration 'Preferences' before initialization
[task 2022-05-13T22:33:08.334Z] 22:33:08     INFO - Console message: [JavaScript Error: "ReferenceError: can't access lexical declaration 'Preferences' before initialization" {file: "chrome://browser/content/preferences/home.js" line: 23}]
[task 2022-05-13T22:33:08.334Z] 22:33:08     INFO - @chrome://browser/content/preferences/home.js:23:1
[task 2022-05-13T22:33:08.334Z] 22:33:08     INFO - 
[task 2022-05-13T22:33:08.334Z] 22:33:08     INFO - Not taking screenshot here: see the one that was previously logged
[task 2022-05-13T22:33:08.335Z] 22:33:08     INFO - TEST-UNEXPECTED-FAIL | browser/components/preferences/tests/browser_security-2.js | uncaught exception - ReferenceError: can't access lexical declaration 'Preferences' before initialization at @chrome://browser/content/preferences/search.js:8:1
[task 2022-05-13T22:33:08.335Z] 22:33:08     INFO - 
[task 2022-05-13T22:33:08.335Z] 22:33:08     INFO - Stack trace:
[task 2022-05-13T22:33:08.336Z] 22:33:08     INFO - chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:simpletestOnerror:1957
[task 2022-05-13T22:33:08.336Z] 22:33:08     INFO - GECKO(4884) | JavaScript error: chrome://browser/content/preferences/search.js, line 8: ReferenceError: can't access lexical declaration 'Preferences' before initialization
[task 2022-05-13T22:33:08.337Z] 22:33:08     INFO - Console message: [JavaScript Error: "ReferenceError: can't access lexical declaration 'Preferences' before initialization" {file: "chrome://browser/content/preferences/search.js" line: 8}]
[task 2022-05-13T22:33:08.337Z] 22:33:08     INFO - @chrome://browser/content/preferences/search.js:8:1
[task 2022-05-13T22:33:08.337Z] 22:33:08     INFO - 
[task 2022-05-13T22:33:08.338Z] 22:33:08     INFO - Not taking screenshot here: see the one that was previously logged
[task 2022-05-13T22:33:08.339Z] 22:33:08     INFO - TEST-UNEXPECTED-FAIL | browser/components/preferences/tests/browser_security-2.js | uncaught exception - ReferenceError: can't access lexical declaration 'Preferences' before initialization at @chrome://browser/content/preferences/privacy.js:65:1
[task 2022-05-13T22:33:08.339Z] 22:33:08     INFO - 
<...>
[task 2022-05-13T22:33:08.346Z] 22:33:08     INFO - TEST-UNEXPECTED-FAIL | browser/components/preferences/tests/browser_security-2.js | Uncaught exception in test - at chrome://mochitests/content/browser/browser/components/preferences/tests/browser_security-2.js:107 - TypeError: checkbox is null
[task 2022-05-13T22:33:08.346Z] 22:33:08     INFO - Stack trace:
[task 2022-05-13T22:33:08.346Z] 22:33:08     INFO - checkPrefSwitch@chrome://mochitests/content/browser/browser/components/preferences/tests/browser_security-2.js:107:19
[task 2022-05-13T22:33:08.347Z] 22:33:08     INFO - Leaving test bound 
[task 2022-05-13T22:33:08.357Z] 22:33:08     INFO - GECKO(4884) | MEMORY STAT | vsize 1894MB | vsizeMaxContiguous 15MB | residentFast 1012MB | heapAllocated 759MB
[task 2022-05-13T22:33:08.358Z] 22:33:08     INFO - TEST-OK | browser/components/preferences/tests/browser_security-2.js | took 2259ms
[task 2022-05-13T22:33:08.367Z] 22:33:08     INFO - checking window state
[task 2022-05-13T22:33:08.371Z] 22:33:08     INFO - TEST-START | browser/components/preferences/tests/browser_site_login_exceptions.js
```