Bug: Intermittent browser/components/preferences/tests/browser_sync_pairing.js | uncaught exception - ReferenceError: can't access lexical declaration 'Preferences' before initialization at @chrome://browser/content/preferences/home.js:23:1
Status: RESOLVED
Priority: P5
Resolution: INCOMPLETE
Created: 2021-07-20 21:06:54+00:00
Resolved: 2021-08-17 17:02:30+00:00

**Filed by:** smolnar [at] mozilla.com
**Parsed log:** https://treeherder.mozilla.org/logviewer?job_id=345795881&repo=autoland
**Full log:** https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/YJ580WHCT-yvRV-w19ipsQ/runs/0/artifacts/public/logs/live_backing.log

---
```
INFO - TEST-PASS | browser/components/preferences/tests/browser_sync_pairing.js | true == true - 
[task 2021-07-20T20:53:18.768Z] 20:53:18     INFO - waiting for dialog to unload
[task 2021-07-20T20:53:18.769Z] 20:53:18     INFO - Leaving test bound testShowsQRCode
[task 2021-07-20T20:53:18.769Z] 20:53:18     INFO - Entering test bound testCantShowQrCode
[task 2021-07-20T20:53:18.770Z] 20:53:18     INFO - Buffered messages finished
[task 2021-07-20T20:53:18.771Z] 20:53:18     INFO - TEST-UNEXPECTED-FAIL | browser/components/preferences/tests/browser_sync_pairing.js | uncaught exception - ReferenceError: can't access lexical declaration 'Preferences' before initialization at @chrome://browser/content/preferences/home.js:23:1
[task 2021-07-20T20:53:18.771Z] 20:53:18     INFO - 
[task 2021-07-20T20:53:18.771Z] 20:53:18     INFO - Stack trace:
[task 2021-07-20T20:53:18.771Z] 20:53:18     INFO - chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:simpletestOnerror:1964
[task 2021-07-20T20:53:18.772Z] 20:53:18     INFO - GECKO(3516) | JavaScript error: chrome://browser/content/preferences/home.js, line 23: ReferenceError: can't access lexical declaration 'Preferences' before initialization
[task 2021-07-20T20:53:18.773Z] 20:53:18     INFO - Console message: [JavaScript Error: "ReferenceError: can't access lexical declaration 'Preferences' before initialization" {file: "chrome://browser/content/preferences/home.js" line: 23}]
[task 2021-07-20T20:53:18.773Z] 20:53:18     INFO - @chrome://browser/content/preferences/home.js:23:1
[task 2021-07-20T20:53:18.773Z] 20:53:18     INFO - 
[task 2021-07-20T20:53:18.774Z] 20:53:18     INFO - Not taking screenshot here: see the one that was previously logged
[task 2021-07-20T20:53:18.775Z] 20:53:18     INFO - TEST-UNEXPECTED-FAIL | browser/components/preferences/tests/browser_sync_pairing.js | uncaught exception - ReferenceError: can't access lexical declaration 'Preferences' before initialization at @chrome://browser/content/preferences/search.js:39:1
[task 2021-07-20T20:53:18.775Z] 20:53:18     INFO - 
[task 2021-07-20T20:53:18.775Z] 20:53:18     INFO - Stack trace:
[task 2021-07-20T20:53:18.775Z] 20:53:18     INFO - chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:simpletestOnerror:1964
[task 2021-07-20T20:53:18.776Z] 20:53:18     INFO - GECKO(3516) | JavaScript error: chrome://browser/content/preferences/search.js, line 39: ReferenceError: can't access lexical declaration 'Preferences' before initialization
[task 2021-07-20T20:53:18.776Z] 20:53:18     INFO - Console message: [JavaScript Error: "ReferenceError: can't access lexical declaration 'Preferences' before initialization" {file: "chrome://browser/content/preferences/search.js" line: 39}]
[task 2021-07-20T20:53:18.777Z] 20:53:18     INFO - @chrome://browser/content/preferences/search.js:39:1
[task 2021-07-20T20:53:18.777Z] 20:53:18     INFO - 
[task 2021-07-20T20:53:18.777Z] 20:53:18     INFO - Not taking screenshot here: see the one that was previously logged
[task 2021-07-20T20:53:18.778Z] 20:53:18     INFO - TEST-UNEXPECTED-FAIL | browser/components/preferences/tests/browser_sync_pairing.js | uncaught exception - ReferenceError: can't access lexical declaration 'Preferences' before initialization at @chrome://browser/content/preferences/privacy.js:111:1
[task 2021-07-20T20:53:18.778Z] 20:53:18     INFO - 
[task 2021-07-20T20:53:18.779Z] 20:53:18     INFO - Stack trace:
[task 2021-07-20T20:53:18.779Z] 20:53:18     INFO - chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:simpletestOnerror:1964
[task 2021-07-20T20:53:18.779Z] 20:53:18     INFO - GECKO(3516) | JavaScript error: chrome://browser/content/preferences/privacy.js, line 111: ReferenceError: can't access lexical declaration 'Preferences' before initialization
[task 2021-07-20T20:53:18.780Z] 20:53:18     INFO - Console message: [JavaScript Error: "ReferenceError: can't access lexical declaration 'Preferences' before initialization" {file: "chrome://browser/content/preferences/privacy.js" line: 111}]
[task 2021-07-20T20:53:18.780Z] 20:53:18     INFO - @chrome://browser/content/preferences/privacy.js:111:1
[task 2021-07-20T20:53:18.780Z] 20:53:18     INFO - 
[task 2021-07-20T20:54:01.845Z] 20:54:01     INFO - Not taking screenshot here: see the one that was previously logged
[task 2021-07-20T20:54:01.845Z] 20:54:01     INFO - TEST-UNEXPECTED-FAIL | browser/components/preferences/tests/browser_sync_pairing.js | Test timed out - 
[task 2021-07-20T20:54:01.846Z] 20:54:01     INFO - Not taking screenshot here: see the one that was previously logged
[task 2021-07-20T20:54:01.847Z] 20:54:01     INFO - TEST-UNEXPECTED-FAIL | browser/components/preferences/tests/browser_sync_pairing.js | Uncaught exception received from previously timed out test - Initialized listener not removed before the end of test
[task 2021-07-20T20:54:01.854Z] 20:54:01     INFO - Not taking screenshot here: see the one that was previously logged
[task 2021-07-20T20:54:01.855Z] 20:54:01     INFO - TEST-UNEXPECTED-FAIL | browser/components/preferences/tests/browser_sync_pairing.js | A promise chain failed to handle a rejection: sync-pane-loaded observer not removed before the end of test - stack: (No stack available.)
[task 2021-07-20T20:54:01.855Z] 20:54:01     INFO - Rejection date: Tue Jul 20 2021 20:54:01 GMT+0000 (Coordinated Universal Time) - false == true - JS frame :: resource://testing-common/PromiseTestUtils.jsm :: assertNoUncaughtRejections :: line 285
[task 2021-07-20T20:54:01.855Z] 20:54:01     INFO - Stack trace:
INFO - resource://testing-common/PromiseTestUtils.jsm:assertNoUncaughtRejections:285
[task 2021-07-20T20:54:01.855Z] 20:54:01     INFO - chrome://mochikit/content/browser-test.js:nextTest:625
[task 2021-07-20T20:54:01.856Z] 20:54:01     INFO - GECKO(3516) | JavaScript error: resource://testing-common/PromiseTestUtils.jsm, line 131: uncaught exception: sync-pane-loaded observer not removed before the end of test
[task 2021-07-20T20:54:01.857Z] 20:54:01     INFO - Console message: [JavaScript Error: "uncaught exception: sync-pane-loaded observer not removed before the end of test" {file: "resource://testing-common/PromiseTestUtils.jsm" line: 131}]
[task 2021-07-20T20:54:01.886Z] 20:54:01     INFO - GECKO(3516) | MEMORY STAT | vsize 1931MB | vsizeMaxContiguous 6MB | residentFast 926MB | heapAllocated 721MB
[task 2021-07-20T20:54:01.887Z] 20:54:01     INFO - TEST-OK | browser/components/preferences/tests/browser_sync_pairing.js | took 45161ms
[task 2021-07-20T20:54:01.888Z] 20:54:01     INFO - Not taking screenshot here: see the one that was previously logged
[task 2021-07-20T20:54:01.889Z] 20:54:01     INFO - TEST-UNEXPECTED-FAIL | browser/components/preferences/tests/browser_sync_pairing.js | Found a tab after previous test timed out: about:preferences#sync - 
[task 2021-07-20T20:54:01.918Z] 20:54:01     INFO - checking window state
[task 2021-07-20T20:54:01.930Z] 20:54:01     INFO - TEST-START | browser/components/preferences/tests/browser_warning_permanent_private_browsing.js
```