Bug: Intermittent toolkit/components/search/tests/xpcshell/test_selectedEngine.js | test_fallback_kept_after_restart - [test_fallback_kept_after_restart : 265] A promise chain failed to handle a rejection: A mutation operation was attempted on a database that
Status: RESOLVED
Priority: P5
Resolution: DUPLICATE
Created: 2020-03-27 20:05:28+00:00
Resolved: 2020-03-31 11:56:16+00:00

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

---

```
...
[task 2020-03-27T18:45:17.455Z] 18:45:17     INFO -  TEST-PASS | xpcshell.ini:toolkit/components/search/tests/xpcshell/test_selectedEngine.js | test_fallback_kept_after_restart - [test_fallback_kept_after_restart : 171] "engine1" == "engine1"
[task 2020-03-27T18:45:17.455Z] 18:45:17     INFO -  (xpcshell/head.js) | test run_next_test 8 pending (2)
[task 2020-03-27T18:45:17.455Z] 18:45:17     INFO -  (xpcshell/head.js) | test test_fallback_kept_after_restart finished (2)
[task 2020-03-27T18:45:17.455Z] 18:45:17     INFO -  "CONSOLE_MESSAGE: (info) _loadEngines: start"
[task 2020-03-27T18:45:17.455Z] 18:45:17     INFO -  "CONSOLE_MESSAGE: (info) _findEngineSelectorEngines: init"
[task 2020-03-27T18:45:17.455Z] 18:45:17     INFO -  "CONSOLE_MESSAGE: (info) SearchEngineSelector fetchEngineConfiguration default:en-US:nightly-autoland::null:xpcshell:42
[task 2020-03-27T18:45:17.455Z] 18:45:17     INFO -  "
[task 2020-03-27T18:45:17.455Z] 18:45:17     INFO -  "CONSOLE_MESSAGE: (info) SearchEngineSelector fetchEngineConfiguration: engine1@search.mozilla.org,engine2@search.mozilla.org
[task 2020-03-27T18:45:17.456Z] 18:45:17     INFO -  "
[task 2020-03-27T18:45:17.456Z] 18:45:17     INFO -  "CONSOLE_MESSAGE: (info) _loadEngines: loading from cache directories"
[task 2020-03-27T18:45:17.456Z] 18:45:17     INFO -  "CONSOLE_MESSAGE: (info) _loadEnginesFromConfig"
[task 2020-03-27T18:45:17.456Z] 18:45:17     INFO -  "CONSOLE_MESSAGE: (info) makeEngineFromConfig: {"webExtension":{"id":"engine1@search.mozilla.org","locale":"default"},"orderHint":10000,"default":"yes"}"
[task 2020-03-27T18:45:17.456Z] 18:45:17     INFO -  "CONSOLE_MESSAGE: (info) _setIcon: Setting icon url "moz-extension://2952becb-de9a-8049-84b7-de69ac8fd794/favicon.ico" for engine "engine1"."
[task 2020-03-27T18:45:17.456Z] 18:45:17     INFO -  "CONSOLE_MESSAGE: (info) makeEngineFromConfig: {"webExtension":{"id":"engine2@search.mozilla.org","locale":"default"},"orderHint":7000,"default":"no"}"
[task 2020-03-27T18:45:17.457Z] 18:45:17     INFO -  "CONSOLE_MESSAGE: (info) _setIcon: Setting icon url "moz-extension://4c9a036f-4a03-6140-8211-3120efd5a33f/favicon.ico" for engine "engine2"."
[task 2020-03-27T18:45:17.457Z] 18:45:17     INFO -  "CONSOLE_MESSAGE: (info) _addEngineToStore: Adding engine: "engine1""
[task 2020-03-27T18:45:17.458Z] 18:45:17     INFO -  "CONSOLE_MESSAGE: (info) _addEngineToStore: Adding engine: "engine2""
[task 2020-03-27T18:45:17.458Z] 18:45:17     INFO -  "CONSOLE_MESSAGE: (info) _loadEnginesFromCache: Loading 3 engines from cache"
[task 2020-03-27T18:45:17.458Z] 18:45:17     INFO -  "CONSOLE_MESSAGE: (info) _addEngineToStore: Adding engine: "Test search engine""
[task 2020-03-27T18:45:17.458Z] 18:45:17     INFO -  "CONSOLE_MESSAGE: (info) _loadEnginesFromCache: skipped 2 built-in engines."
[task 2020-03-27T18:45:17.458Z] 18:45:17     INFO -  "CONSOLE_MESSAGE: (info) _loadEnginesMetadataFromCache, transfering metadata for engine1"
[task 2020-03-27T18:45:17.458Z] 18:45:17     INFO -  "CONSOLE_MESSAGE: (info) _loadEnginesMetadataFromCache, transfering metadata for engine2"
[task 2020-03-27T18:45:17.458Z] 18:45:17     INFO -  "CONSOLE_MESSAGE: (info) _loadEnginesMetadataFromCache, transfering metadata for Test search engine"
[task 2020-03-27T18:45:17.458Z] 18:45:17     INFO -  "CONSOLE_MESSAGE: (info) _loadEngines: done using existing cache"
[task 2020-03-27T18:45:17.458Z] 18:45:17     INFO -  "CONSOLE_MESSAGE: (info) _init: engines loaded, writing cache"
[task 2020-03-27T18:45:17.459Z] 18:45:17     INFO -  "CONSOLE_MESSAGE: (info) _buildCache: Writing to cache file."
[task 2020-03-27T18:45:17.459Z] 18:45:17     INFO -  "CONSOLE_MESSAGE: (info) _init: Completed _init"
[task 2020-03-27T18:45:17.459Z] 18:45:17     INFO -  (xpcshell/head.js) | test run_next_test 8 finished (1)
[task 2020-03-27T18:45:17.459Z] 18:45:17     INFO -  exiting test
[task 2020-03-27T18:45:17.459Z] 18:45:17     INFO -  "CONSOLE_MESSAGE: (info) _buildCache: cache file written to disk."
[task 2020-03-27T18:45:17.459Z] 18:45:17     INFO -  PID 5208 | WARNING: A blocker encountered an error while we were waiting.
[task 2020-03-27T18:45:17.459Z] 18:45:17     INFO -  PID 5208 |           Blocker:  RemoteSettingsClient - finish IDB access.
[task 2020-03-27T18:45:17.459Z] 18:45:17     INFO -  PID 5208 |           Phase: profile-before-change
[task 2020-03-27T18:45:17.460Z] 18:45:17     INFO -  PID 5208 |           State: [{"method":"getMetadata","identifier":"main/hijack-blocklists"}]
[task 2020-03-27T18:45:17.460Z] 18:45:17     INFO -  PID 5208 | WARNING: InvalidStateError: A mutation operation was attempted on a database that did not allow mutations.
[task 2020-03-27T18:45:17.460Z] 18:45:17     INFO -  PID 5208 | WARNING: ensureShutdownBlocker/<@resource://services-settings/Database.jsm:534:21
[task 2020-03-27T18:45:17.460Z] 18:45:17     INFO -  PID 5208 | trigger@resource://gre/modules/AsyncShutdown.jsm:726:23
[task 2020-03-27T18:45:17.460Z] 18:45:17     INFO -  PID 5208 | _wait@resource://gre/modules/AsyncShutdown.jsm:878:15
[task 2020-03-27T18:45:17.460Z] 18:45:17     INFO -  PID 5208 | wait@resource://gre/modules/AsyncShutdown.jsm:859:34
[task 2020-03-27T18:45:17.460Z] 18:45:17     INFO -  PID 5208 | observe@resource://gre/modules/AsyncShutdown.jsm:536:10
[task 2020-03-27T18:45:17.460Z] 18:45:17     INFO -  PID 5208 | _execute_test@/Users/cltbld/tasks/task_1585333186/build/tests/xpcshell/head.js:660:19
[task 2020-03-27T18:45:17.460Z] 18:45:17     INFO -  PID 5208 | @-e:1:1
[task 2020-03-27T18:45:17.460Z] 18:45:17     INFO -  "CONSOLE_MESSAGE: (error) [JavaScript Error: "NetworkError when attempting to fetch resource." {file: "resource://services-common/kinto-http-client.js" line: 2899}]
[task 2020-03-27T18:45:17.461Z] 18:45:17     INFO -  [13]</timedFetch/<@resource://services-common/kinto-http-client.js:2899:12
[task 2020-03-27T18:45:17.461Z] 18:45:17     INFO -  timedFetch@resource://services-common/kinto-http-client.js:2869:12
[task 2020-03-27T18:45:17.461Z] 18:45:17     INFO -  request@resource://services-common/kinto-http-client.js:2980:33
[task 2020-03-27T18:45:17.461Z] 18:45:17     INFO -  execute@resource://services-common/kinto-http-client.js:813:36
[task 2020-03-27T18:45:17.461Z] 18:45:17     INFO -  getData@resource://services-common/kinto-http-client.js:2065:27
[task 2020-03-27T18:45:17.461Z] 18:45:17     INFO -  get@resource://services-settings/RemoteSettingsClient.jsm:353:46
[task 2020-03-27T18:45:17.461Z] 18:45:17     INFO -  async*_getIgnoreListSettings@resource://gre/modules/IgnoreLists.jsm:75:47
[task 2020-03-27T18:45:17.461Z] 18:45:17     INFO -  _getIgnoreList@resource://gre/modules/IgnoreLists.jsm:51:61
[task 2020-03-27T18:45:17.462Z] 18:45:17     INFO -  getAndSubscribe@resource://gre/modules/IgnoreLists.jsm:30:33
[task 2020-03-27T18:45:17.462Z] 18:45:17     INFO -  async*_setupRemoteSettings@resource://gre/modules/SearchService.jsm:793:39
[task 2020-03-27T18:45:17.462Z] 18:45:17     INFO -  _init@resource://gre/modules/SearchService.jsm:732:12
[task 2020-03-27T18:45:17.462Z] 18:45:17     INFO -  async*init@resource://gre/modules/SearchService.jsm:2366:18
[task 2020-03-27T18:45:17.462Z] 18:45:17     INFO -  test_fallback_kept_after_restart@/Users/cltbld/tasks/task_1585333186/build/tests/xpcshell/tests/toolkit/components/search/tests/xpcshell/test_selectedEngine.js:170:25
[task 2020-03-27T18:45:17.462Z] 18:45:17     INFO -  async*_run_next_test/<@/Users/cltbld/tasks/task_1585333186/build/tests/xpcshell/head.js:1567:22
[task 2020-03-27T18:45:17.462Z] 18:45:17     INFO -  _run_next_test@/Users/cltbld/tasks/task_1585333186/build/tests/xpcshell/head.js:1567:38
[task 2020-03-27T18:45:17.462Z] 18:45:17     INFO -  run@/Users/cltbld/tasks/task_1585333186/build/tests/xpcshell/head.js:735:9
[task 2020-03-27T18:45:17.463Z] 18:45:17     INFO -  _do_main@/Users/cltbld/tasks/task_1585333186/build/tests/xpcshell/head.js:246:6
[task 2020-03-27T18:45:17.463Z] 18:45:17     INFO -  _execute_test@/Users/cltbld/tasks/task_1585333186/build/tests/xpcshell/head.js:573:5
[task 2020-03-27T18:45:17.463Z] 18:45:17     INFO -  @-e:1:1
[task 2020-03-27T18:45:17.463Z] 18:45:17     INFO -  "
[task 2020-03-27T18:45:17.463Z] 18:45:17     INFO -  "CONSOLE_MESSAGE: (info) _handleIgnoreListUpdated"
[task 2020-03-27T18:45:17.465Z] 18:45:17     INFO -  PID 5208 | JavaScript error: resource://services-settings/Database.jsm, line 534: InvalidStateError: A mutation operation was attempted on a database that did not allow mutations.
[task 2020-03-27T18:45:17.466Z] 18:45:17     INFO -  "CONSOLE_MESSAGE: (error) [JavaScript Error: "InvalidStateError: A mutation operation was attempted on a database that did not allow mutations." {file: "resource://services-settings/Database.jsm" line: 534}]"
[task 2020-03-27T18:45:17.466Z] 18:45:17  WARNING -  TEST-UNEXPECTED-FAIL | xpcshell.ini:toolkit/components/search/tests/xpcshell/test_selectedEngine.js | test_fallback_kept_after_restart - [test_fallback_kept_after_restart : 265] A promise chain failed to handle a rejection: A mutation operation was attempted on a database that did not allow mutations. - stack: ensureShutdownBlocker/<@resource://services-settings/Database.jsm:534:21
[task 2020-03-27T18:45:17.466Z] 18:45:17     INFO -  trigger@resource://gre/modules/AsyncShutdown.jsm:726:23
[task 2020-03-27T18:45:17.466Z] 18:45:17     INFO -  _wait@resource://gre/modules/AsyncShutdown.jsm:878:15
[task 2020-03-27T18:45:17.466Z] 18:45:17     INFO -  wait@resource://gre/modules/AsyncShutdown.jsm:859:34
[task 2020-03-27T18:45:17.466Z] 18:45:17     INFO -  observe@resource://gre/modules/AsyncShutdown.jsm:536:10
[task 2020-03-27T18:45:17.466Z] 18:45:17     INFO -  _execute_test@/Users/cltbld/tasks/task_1585333186/build/tests/xpcshell/head.js:660:19
[task 2020-03-27T18:45:17.466Z] 18:45:17     INFO -  @-e:1:1
[task 2020-03-27T18:45:17.466Z] 18:45:17     INFO -  Rejection date: Fri Mar 27 2020 18:45:17 GMT+0000 (Greenwich Mean Time) - false == true
[task 2020-03-27T18:45:17.466Z] 18:45:17     INFO -  resource://testing-common/PromiseTestUtils.jsm:assertNoUncaughtRejections:265
[task 2020-03-27T18:45:17.467Z] 18:45:17     INFO -  /Users/cltbld/tasks/task_1585333186/build/tests/xpcshell/head.js:_execute_test:668
[task 2020-03-27T18:45:17.467Z] 18:45:17     INFO -  -e:null:1
[task 2020-03-27T18:45:17.467Z] 18:45:17     INFO -  exiting test
[task 2020-03-27T18:45:17.467Z] 18:45:17     INFO -  PID 5208 | JavaScript error: /Users/cltbld/tasks/task_1585333186/build/tests/xpcshell/head.js, line 791: NS_ERROR_ABORT:
[task 2020-03-27T18:45:17.467Z] 18:45:17     INFO -  <<<<<<<
```