Bug: Intermittent /search/tests/xpcshell/test_list_json_searchorder.js | test_searchOrderJSON_separate_private - [test_searchOrderJSON_separate_private : 285] A promise chain failed to handle a rejection: The object has been already finalized. - stack: finaliz
Status: RESOLVED
Priority: P5
Resolution: DUPLICATE
Created: 2021-03-27 09:16:30+00:00
Resolved: 2021-03-29 06:39:40+00:00

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

---
```
[task 2021-03-27T08:23:16.298Z] 08:23:16     INFO -  TEST-START | xpcshell.ini:toolkit/components/search/tests/xpcshell/test_list_json_searchorder.js
[task 2021-03-27T08:23:17.059Z] 08:23:17  WARNING -  TEST-UNEXPECTED-FAIL | xpcshell.ini:toolkit/components/search/tests/xpcshell/test_list_json_searchorder.js | xpcshell return code: 0
[task 2021-03-27T08:23:17.059Z] 08:23:17     INFO -  TEST-INFO took 760ms
[task 2021-03-27T08:23:17.060Z] 08:23:17     INFO -  >>>>>>>
[task 2021-03-27T08:23:17.060Z] 08:23:17     INFO -  (xpcshell/head.js) | test MAIN run_test pending (1)
[task 2021-03-27T08:23:17.061Z] 08:23:17     INFO -  (xpcshell/head.js) | test run_next_test 0 pending (2)
[task 2021-03-27T08:23:17.061Z] 08:23:17     INFO -  (xpcshell/head.js) | test MAIN run_test finished (2)
[task 2021-03-27T08:23:17.061Z] 08:23:17     INFO -  running event loop
[task 2021-03-27T08:23:17.062Z] 08:23:17     INFO -  xpcshell.ini:toolkit/components/search/tests/xpcshell/test_list_json_searchorder.js | Starting setup
[task 2021-03-27T08:23:17.062Z] 08:23:17     INFO -  (xpcshell/head.js) | test setup pending (2)
[task 2021-03-27T08:23:17.062Z] 08:23:17     INFO -  (xpcshell/head.js) | test run_next_test 0 finished (2)
[task 2021-03-27T08:23:17.062Z] 08:23:17     INFO -  PID 3828 | console.debug: SearchService: "init"
[task 2021-03-27T08:23:17.063Z] 08:23:17     INFO -  PID 3828 | console.info: Region.jsm: "_getRegion called"
[task 2021-03-27T08:23:17.063Z] 08:23:17     INFO -  PID 3828 | console.info: Region.jsm: "_getRegion url is: " ""
[task 2021-03-27T08:23:17.063Z] 08:23:17     INFO -  PID 3828 | console.warn: SearchSettings: "get: No settings file exists, new profile?" (new NotFoundError("Could not open the file at c:\\\\users\\\\task_1616831828\\\\appdata\\\\local\\\\temp\\\\xpc-profile-msawgx\\\\search.json.mozlz4", (void 0), 241))
[task 2021-03-27T08:23:17.063Z] 08:23:17     INFO -  PID 3828 | console.debug: SearchService: "_loadEngines: start"
[task 2021-03-27T08:23:17.063Z] 08:23:17     INFO -  PID 3828 | console.debug: SearchEngineSelector: "fetchEngineConfiguration en-US:default:default::false:xpcshell:42"
[task 2021-03-27T08:23:17.064Z] 08:23:17     INFO -  PID 3828 | console.debug: SearchEngineSelector: "fetchEngineConfiguration: engine@search.mozilla.org,engine-pref@search.mozilla.org,engine-resourceicon@search.mozilla.org,engine-chromeicon@search.mozilla.org,engine-rel-searchform-purpose@search.mozilla.org,engine-reordered@search.mozilla.org"
[task 2021-03-27T08:23:17.064Z] 08:23:17     INFO -  PID 3828 | console.debug: SearchService: "_loadEnginesFromConfig"
[task 2021-03-27T08:23:17.064Z] 08:23:17     INFO -  PID 3828 | console.debug: SearchService: "makeEngineFromConfig:" ({webExtension:{id:"engine@search.mozilla.org", locale:"default"}, orderHint:10000, default:"yes"})
[task 2021-03-27T08:23:17.064Z] 08:23:17     INFO -  "CONSOLE_MESSAGE: (error) [JavaScript Error: "NotFoundError: Could not open the file at c:\\users\\task_1616831828\\appdata\\local\\temp\\xpc-profile-msawgx\\startupCache\\webext.sc.lz4"]
[task 2021-03-27T08:23:17.065Z] 08:23:17     INFO -  _do_main@Z:\\task_1616831828\\build\\tests\\xpcshell\\head.js:241:6
[task 2021-03-27T08:23:17.065Z] 08:23:17     INFO -  _execute_test@Z:\\task_1616831828\\build\\tests\\xpcshell\\head.js:598:5
[task 2021-03-27T08:23:17.065Z] 08:23:17     INFO -  @-e:1:1
[task 2021-03-27T08:23:17.066Z] 08:23:17     INFO -  "
[task 2021-03-27T08:23:17.066Z] 08:23:17     INFO -  PID 3828 | console.debug: SearchService: "addEnginesFromExtension: engine@search.mozilla.org"
[task 2021-03-27T08:23:17.066Z] 08:23:17     INFO -  PID 3828 | console.debug: SearchService: "addEnginesFromExtension: Ignoring builtIn engine."
[task 2021-03-27T08:23:17.066Z] 08:23:17     INFO -  PID 3828 | console.debug: SearchEngine: "_setIcon: Setting icon url for" "Test search engine" "to" "moz-extension://c283daae-0f77-41eb-871b-817c0e711ddd/favicon.ico"
[task 2021-03-27T08:23:17.066Z] 08:23:17     INFO -  PID 3828 | console.debug: SearchService: "makeEngineFromConfig:" ({webExtension:{id:"engine-pref@search.mozilla.org", locale:"default"}, orderHint:7000, default:"no", defaultPrivate:"yes"})
[task 2021-03-27T08:23:17.066Z] 08:23:17     INFO -  PID 3828 | console.debug: SearchService: "addEnginesFromExtension: engine-pref@search.mozilla.org"
[task 2021-03-27T08:23:17.067Z] 08:23:17     INFO -  PID 3828 | console.debug: SearchService: "addEnginesFromExtension: Ignoring builtIn engine."
[task 2021-03-27T08:23:17.067Z] 08:23:17     INFO -  PID 3828 | console.debug: SearchService: "makeEngineFromConfig:" ({webExtension:{id:"engine-resourceicon@search.mozilla.org", locale:"default"}, orderHint:9000, default:"no"})
[task 2021-03-27T08:23:17.067Z] 08:23:17     INFO -  PID 3828 | console.debug: SearchService: "addEnginesFromExtension: engine-resourceicon@search.mozilla.org"
[task 2021-03-27T08:23:17.067Z] 08:23:17     INFO -  PID 3828 | console.debug: SearchService: "addEnginesFromExtension: Ignoring builtIn engine."
[task 2021-03-27T08:23:17.067Z] 08:23:17     INFO -  PID 3828 | console.debug: SearchEngine: "_setIcon: Setting icon url for" "engine-resourceicon" "to" "moz-extension://8d9e490c-b1d6-46c3-bb3b-ff33e38896b2/favicon.png"
[task 2021-03-27T08:23:17.068Z] 08:23:17     INFO -  PID 3828 | console.debug: SearchService: "makeEngineFromConfig:" ({webExtension:{id:"engine-chromeicon@search.mozilla.org", locale:"default"}, orderHint:8000, default:"no"})
[task 2021-03-27T08:23:17.068Z] 08:23:17     INFO -  PID 3828 | console.debug: SearchService: "_handleIgnoreListUpdated"
[task 2021-03-27T08:23:17.068Z] 08:23:17     INFO -  PID 3828 | console.debug: SearchService: "addEnginesFromExtension: engine-chromeicon@search.mozilla.org"
[task 2021-03-27T08:23:17.068Z] 08:23:17     INFO -  PID 3828 | console.debug: SearchService: "addEnginesFromExtension: Ignoring builtIn engine."
[task 2021-03-27T08:23:17.069Z] 08:23:17     INFO -  PID 3828 | console.debug: SearchService: "makeEngineFromConfig:" ({webExtension:{id:"engine-rel-searchform-purpose@search.mozilla.org", locale:"default"}, orderHint:6000, default:"no"})
[task 2021-03-27T08:23:17.069Z] 08:23:17     INFO -  PID 3828 | console.debug: SearchService: "addEnginesFromExtension: engine-rel-searchform-purpose@search.mozilla.org"
[task 2021-03-27T08:23:17.069Z] 08:23:17     INFO -  PID 3828 | console.debug: SearchService: "addEnginesFromExtension: Ignoring builtIn engine."
[task 2021-03-27T08:23:17.069Z] 08:23:17     INFO -  PID 3828 | console.debug: SearchService: "makeEngineFromConfig:" ({webExtension:{id:"engine-reordered@search.mozilla.org", locale:"default"}, orderHint:5000, default:"no"})
[task 2021-03-27T08:23:17.070Z] 08:23:17     INFO -  PID 3828 | console.debug: SearchService: "addEnginesFromExtension: engine-reordered@search.mozilla.org"
[task 2021-03-27T08:23:17.070Z] 08:23:17     INFO -  PID 3828 | console.debug: SearchService: "addEnginesFromExtension: Ignoring builtIn engine."
[task 2021-03-27T08:23:17.070Z] 08:23:17     INFO -  PID 3828 | console.debug: SearchEngine: "_setIcon: Setting icon url for" "Test search engine (Reordered)" "to" "moz-extension://87b7aae1-7ea1-4313-b58a-1d6247077615/favicon.ico"
[task 2021-03-27T08:23:17.070Z] 08:23:17     INFO -  PID 3828 | console.debug: SearchService: "_addEngineToStore: Adding engine:" "Test search engine"
[task 2021-03-27T08:23:17.071Z] 08:23:17     INFO -  PID 3828 | console.debug: SearchService: "_addEngineToStore: Adding engine:" "engine-pref"
[task 2021-03-27T08:23:17.071Z] 08:23:17     INFO -  PID 3828 | console.debug: SearchService: "_addEngineToStore: Adding engine:" "engine-resourceicon"
[task 2021-03-27T08:23:17.071Z] 08:23:17     INFO -  PID 3828 | console.debug: SearchService: "_addEngineToStore: Adding engine:" "engine-chromeicon"
[task 2021-03-27T08:23:17.071Z] 08:23:17     INFO -  PID 3828 | console.debug: SearchService: "_addEngineToStore: Adding engine:" "engine-rel-searchform-purpose"
[task 2021-03-27T08:23:17.072Z] 08:23:17     INFO -  PID 3828 | console.debug: SearchService: "_addEngineToStore: Adding engine:" "Test search engine (Reordered)"
[task 2021-03-27T08:23:17.072Z] 08:23:17     INFO -  PID 3828 | console.debug: SearchService: "_loadEngines: loading" 0 "engines reported by AddonManager startup"
[task 2021-03-27T08:23:17.072Z] 08:23:17     INFO -  PID 3828 | console.debug: SearchService: "_loadEngines: done"
[task 2021-03-27T08:23:17.072Z] 08:23:17     INFO -  PID 3828 | console.debug: SearchService: "_init: engines loaded, writing settings"
[task 2021-03-27T08:23:17.073Z] 08:23:17     INFO -  PID 3828 | console.debug: SearchService: "Completed _init"
[task 2021-03-27T08:23:17.073Z] 08:23:17     INFO -  (xpcshell/head.js) | test run_next_test 1 pending (2)
[task 2021-03-27T08:23:17.073Z] 08:23:17     INFO -  (xpcshell/head.js) | test setup finished (2)
[task 2021-03-27T08:23:17.073Z] 08:23:17     INFO -  xpcshell.ini:toolkit/components/search/tests/xpcshell/test_list_json_searchorder.js | Starting test_searchOrderJSON_no_separate_private
[task 2021-03-27T08:23:17.074Z] 08:23:17     INFO -  (xpcshell/head.js) | test test_searchOrderJSON_no_separate_private pending (2)
[task 2021-03-27T08:23:17.074Z] 08:23:17     INFO -  PID 3828 | console.debug: SearchService: "init"
[task 2021-03-27T08:23:17.074Z] 08:23:17     INFO -  (xpcshell/head.js) | test run_next_test 1 finished (2)
[task 2021-03-27T08:23:17.074Z] 08:23:17     INFO -  PID 3828 | console.debug: SearchService: "getEngines: getting all engines"
[task 2021-03-27T08:23:17.074Z] 08:23:17     INFO -  PID 3828 | console.debug: SearchService: "_buildSortedEngineList: using default orders"
[task 2021-03-27T08:23:17.074Z] 08:23:17     INFO -  TEST-PASS | xpcshell.ini:toolkit/components/search/tests/xpcshell/test_list_json_searchorder.js | test_searchOrderJSON_no_separate_private - [test_searchOrderJSON_no_separate_private : 22] Should have the expected engine order - ["Test search engine","engine-resourceicon","engine-chromeicon","engine-pref","engine-rel-searchform-purpose","Test search engine (Reordered)"] deepEqual ["Test search engine","engine-resourceicon","engine-chromeicon","engine-pref","engine-rel-searchform-purpose","Test search engine (Reordered)"]
[task 2021-03-27T08:23:17.074Z] 08:23:17     INFO -  (xpcshell/head.js) | test run_next_test 2 pending (2)
[task 2021-03-27T08:23:17.074Z] 08:23:17     INFO -  (xpcshell/head.js) | test test_searchOrderJSON_no_separate_private finished (2)
[task 2021-03-27T08:23:17.074Z] 08:23:17     INFO -  xpcshell.ini:toolkit/components/search/tests/xpcshell/test_list_json_searchorder.js | Starting test_searchOrderJSON_separate_private
[task 2021-03-27T08:23:17.074Z] 08:23:17     INFO -  (xpcshell/head.js) | test test_searchOrderJSON_separate_private pending (2)
[task 2021-03-27T08:23:17.074Z] 08:23:17     INFO -  PID 3828 | console.debug: SearchUtils: "NOTIFY: Engine:" "engine-pref" "Verb:" "engine-default-private"
[task 2021-03-27T08:23:17.075Z] 08:23:17     INFO -  PID 3828 | console.debug: SearchService: "init"
[task 2021-03-27T08:23:17.075Z] 08:23:17     INFO -  (xpcshell/head.js) | test run_next_test 2 finished (2)
[task 2021-03-27T08:23:17.075Z] 08:23:17     INFO -  PID 3828 | console.debug: SearchService: "getEngines: getting all engines"
[task 2021-03-27T08:23:17.075Z] 08:23:17     INFO -  PID 3828 | console.debug: SearchService: "_buildSortedEngineList: using default orders"
[task 2021-03-27T08:23:17.075Z] 08:23:17     INFO -  TEST-PASS | xpcshell.ini:toolkit/components/search/tests/xpcshell/test_list_json_searchorder.js | test_searchOrderJSON_separate_private - [test_searchOrderJSON_separate_private : 22] Should have the expected engine order - ["Test search engine","engine-pref","engine-resourceicon","engine-chromeicon","engine-rel-searchform-purpose","Test search engine (Reordered)"] deepEqual ["Test search engine","engine-pref","engine-resourceicon","engine-chromeicon","engine-rel-searchform-purpose","Test search engine (Reordered)"]
[task 2021-03-27T08:23:17.075Z] 08:23:17     INFO -  (xpcshell/head.js) | test run_next_test 3 pending (2)
[task 2021-03-27T08:23:17.075Z] 08:23:17     INFO -  (xpcshell/head.js) | test test_searchOrderJSON_separate_private finished (2)
[task 2021-03-27T08:23:17.075Z] 08:23:17     INFO -  (xpcshell/head.js) | test run_next_test 3 finished (1)
[task 2021-03-27T08:23:17.075Z] 08:23:17     INFO -  exiting test
[task 2021-03-27T08:23:17.075Z] 08:23:17     INFO -  PID 3828 | console.debug: SearchSettings: "batchTask: Invalidating engine settings"
[task 2021-03-27T08:23:17.075Z] 08:23:17     INFO -  PID 3828 | console.debug: SearchSettings: "_write: Writing to settings file."
[task 2021-03-27T08:23:17.075Z] 08:23:17     INFO -  PID 3828 | WARNING: A blocker encountered an error while we were waiting.
[task 2021-03-27T08:23:17.076Z] 08:23:17     INFO -  PID 3828 |           Blocker:  Flush WebExtension StartupCache
[task 2021-03-27T08:23:17.076Z] 08:23:17     INFO -  PID 3828 |           Phase: IOUtils: waiting for profileBeforeChange IO to complete
[task 2021-03-27T08:23:17.076Z] 08:23:17     INFO -  PID 3828 |           State: (none)
[task 2021-03-27T08:23:17.076Z] 08:23:17     INFO -  PID 3828 | WARNING: Error: The object has been already finalized.
[task 2021-03-27T08:23:17.076Z] 08:23:17     INFO -  PID 3828 | WARNING: finalize@resource://gre/modules/DeferredTask.jsm:267:13
[task 2021-03-27T08:23:17.076Z] 08:23:17     INFO -  PID 3828 | save/<@resource://gre/modules/ExtensionParent.jsm:1748:32
[task 2021-03-27T08:23:17.076Z] 08:23:17     INFO -  PID 3828 | trigger@resource://gre/modules/AsyncShutdown.jsm:747:23
[task 2021-03-27T08:23:17.076Z] 08:23:17     INFO -  PID 3828 | _wait@resource://gre/modules/AsyncShutdown.jsm:899:15
[task 2021-03-27T08:23:17.076Z] 08:23:17     INFO -  PID 3828 | wait@resource://gre/modules/AsyncShutdown.jsm:880:34
[task 2021-03-27T08:23:17.076Z] 08:23:17     INFO -  PID 3828 | wait@resource://gre/modules/nsAsyncShutdown.jsm:209:25
[task 2021-03-27T08:23:17.076Z] 08:23:17     INFO -  PID 3828 | addBlocker/moduleBlocker/<@resource://gre/modules/nsAsyncShutdown.jsm:156:30
[task 2021-03-27T08:23:17.076Z] 08:23:17     INFO -  PID 3828 | moduleBlocker@resource://gre/modules/nsAsyncShutdown.jsm:152:9
[task 2021-03-27T08:23:17.076Z] 08:23:17     INFO -  PID 3828 | trigger@resource://gre/modules/AsyncShutdown.jsm:747:23
[task 2021-03-27T08:23:17.077Z] 08:23:17     INFO -  PID 3828 | _wait@resource://gre/modules/AsyncShutdown.jsm:899:15
[task 2021-03-27T08:23:17.077Z] 08:23:17     INFO -  PID 3828 | wait@resource://gre/modules/AsyncShutdown.jsm:880:34
[task 2021-03-27T08:23:17.077Z] 08:23:17     INFO -  PID 3828 | observe@resource://gre/modules/AsyncShutdown.jsm:557:10
[task 2021-03-27T08:23:17.077Z] 08:23:17     INFO -  PID 3828 | _execute_test@Z:\\task_1616831828\\build\\tests\\xpcshell\\head.js:701:19
[task 2021-03-27T08:23:17.077Z] 08:23:17     INFO -  PID 3828 | @-e:1:1
[task 2021-03-27T08:23:17.077Z] 08:23:17     INFO -  PID 3828 | JavaScript error: resource://gre/modules/DeferredTask.jsm, line 267: Error: The object has been already finalized.
[task 2021-03-27T08:23:17.077Z] 08:23:17     INFO -  PID 3828 | console.debug: SearchSettings: "_write: settings file written to disk."
[task 2021-03-27T08:23:17.077Z] 08:23:17     INFO -  "CONSOLE_MESSAGE: (error) [JavaScript Error: "Error: The object has been already finalized." {file: "resource://gre/modules/DeferredTask.jsm" line: 267}]"
[task 2021-03-27T08:23:17.077Z] 08:23:17  WARNING -  TEST-UNEXPECTED-FAIL | xpcshell.ini:toolkit/components/search/tests/xpcshell/test_list_json_searchorder.js | test_searchOrderJSON_separate_private - [test_searchOrderJSON_separate_private : 285] A promise chain failed to handle a rejection: The object has been already finalized. - stack: finalize@resource://gre/modules/DeferredTask.jsm:267:13
[task 2021-03-27T08:23:17.077Z] 08:23:17     INFO -  save/<@resource://gre/modules/ExtensionParent.jsm:1748:32
[task 2021-03-27T08:23:17.078Z] 08:23:17     INFO -  trigger@resource://gre/modules/AsyncShutdown.jsm:747:23
[task 2021-03-27T08:23:17.078Z] 08:23:17     INFO -  _wait@resource://gre/modules/AsyncShutdown.jsm:899:15
[task 2021-03-27T08:23:17.078Z] 08:23:17     INFO -  wait@resource://gre/modules/AsyncShutdown.jsm:880:34
[task 2021-03-27T08:23:17.078Z] 08:23:17     INFO -  wait@resource://gre/modules/nsAsyncShutdown.jsm:209:25
[task 2021-03-27T08:23:17.078Z] 08:23:17     INFO -  addBlocker/moduleBlocker/<@resource://gre/modules/nsAsyncShutdown.jsm:156:30
[task 2021-03-27T08:23:17.078Z] 08:23:17     INFO -  moduleBlocker@resource://gre/modules/nsAsyncShutdown.jsm:152:9
[task 2021-03-27T08:23:17.078Z] 08:23:17     INFO -  trigger@resource://gre/modules/AsyncShutdown.jsm:747:23
[task 2021-03-27T08:23:17.078Z] 08:23:17     INFO -  _wait@resource://gre/modules/AsyncShutdown.jsm:899:15
[task 2021-03-27T08:23:17.078Z] 08:23:17     INFO -  wait@resource://gre/modules/AsyncShutdown.jsm:880:34
[task 2021-03-27T08:23:17.078Z] 08:23:17     INFO -  observe@resource://gre/modules/AsyncShutdown.jsm:557:10
[task 2021-03-27T08:23:17.078Z] 08:23:17     INFO -  _execute_test@Z:\\task_1616831828\\build\\tests\\xpcshell\\head.js:701:19
[task 2021-03-27T08:23:17.078Z] 08:23:17     INFO -  @-e:1:1
[task 2021-03-27T08:23:17.078Z] 08:23:17     INFO -  Rejection date: Sat Mar 27 2021 08:23:16 GMT+0000 (Greenwich Mean Time) - false == true
[task 2021-03-27T08:23:17.078Z] 08:23:17     INFO -  resource://testing-common/PromiseTestUtils.jsm:assertNoUncaughtRejections:285
[task 2021-03-27T08:23:17.079Z] 08:23:17     INFO -  Z:\task_1616831828\build\tests\xpcshell\head.js:_execute_test:709
[task 2021-03-27T08:23:17.079Z] 08:23:17     INFO -  -e:null:1
[task 2021-03-27T08:23:17.079Z] 08:23:17     INFO -  exiting test
[task 2021-03-27T08:23:17.079Z] 08:23:17     INFO -  PID 3828 | JavaScript error: Z:\\task_1616831828\\build\\tests\\xpcshell\\head.js, line 861: NS_ERROR_ABORT:
[task 2021-03-27T08:23:17.079Z] 08:23:17     INFO -  <<<<<<<
[task 2021-03-27T08:23:17.098Z] 08:23:17     INFO -  TEST-START | xpcshell.ini:toolkit/components/search/tests/xpcshell/test_multipleIcons.js
[task 2021-03-27T08:23:17.858Z] 08:23:17     INFO -  TEST-PASS | xpcshell.ini:toolkit/components/search/tests/xpcshell/test_multipleIcons.js | took 761ms```