Bug: Intermittent [tier2] [NOT comm-central] TV toolkit/components/search/tests/xpcshell/test_notifications.js | test_addingEngine_webExtension - [test_addingEngine_webExtension : 372] Extension left running at test shutdown - "running" == "unloaded"
Status: RESOLVED
Priority: P5
Resolution: INCOMPLETE
Created: 2021-03-04 00:06:43+00:00
Resolved: 2021-05-11 17:01:28+00:00

**Filed by:** abutkovits [at] mozilla.com
**Parsed log:** https://treeherder.mozilla.org/logviewer?job_id=331961733&repo=autoland
**Full log:** https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/KfqJtit2QpCEw58AMdPq4A/runs/0/artifacts/public/logs/live_backing.log
**Reftest URL:** https://hg.mozilla.org/mozilla-central/raw-file/tip/layout/tools/reftest/reftest-analyzer.xhtml#logurl=https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/KfqJtit2QpCEw58AMdPq4A/runs/0/artifacts/public/logs/live_backing.log&only_show_unexpected=1

---
```
[task 2021-03-03T23:13:00.734Z] 23:13:00     INFO -  TEST-START | xpcshell.ini:toolkit/components/search/tests/xpcshell/test_notifications.js
[task 2021-03-03T23:13:10.985Z] 23:13:10  WARNING -  TEST-UNEXPECTED-FAIL | xpcshell.ini:toolkit/components/search/tests/xpcshell/test_notifications.js | xpcshell return code: 0
[task 2021-03-03T23:13:10.986Z] 23:13:10     INFO -  TEST-INFO took 10252ms
[task 2021-03-03T23:13:10.986Z] 23:13:10     INFO -  >>>>>>>
[task 2021-03-03T23:13:10.986Z] 23:13:10     INFO -  PID 2681 | *** You are running in chaos test mode. See ChaosMode.h. ***
[task 2021-03-03T23:13:10.986Z] 23:13:10     INFO -  (xpcshell/head.js) | test MAIN run_test pending (1)
[task 2021-03-03T23:13:10.986Z] 23:13:10     INFO -  (xpcshell/head.js) | test run_next_test 0 pending (2)
[task 2021-03-03T23:13:10.986Z] 23:13:10     INFO -  (xpcshell/head.js) | test MAIN run_test finished (2)
[task 2021-03-03T23:13:10.986Z] 23:13:10     INFO -  running event loop
[task 2021-03-03T23:13:10.986Z] 23:13:10     INFO -  xpcshell.ini:toolkit/components/search/tests/xpcshell/test_notifications.js | Starting setup
[task 2021-03-03T23:13:10.987Z] 23:13:10     INFO -  (xpcshell/head.js) | test setup pending (2)
[task 2021-03-03T23:13:10.987Z] 23:13:10     INFO -  (xpcshell/head.js) | test run_next_test 0 finished (2)
[task 2021-03-03T23:13:10.987Z] 23:13:10     INFO -  PID 2681 | console.debug: SearchService: "init"
[task 2021-03-03T23:13:10.987Z] 23:13:10     INFO -  PID 2681 | console.info: Region.jsm: "_getRegion called"
[task 2021-03-03T23:13:10.987Z] 23:13:10     INFO -  PID 2681 | console.info: Region.jsm: "_getRegion url is: " ""
[task 2021-03-03T23:13:10.987Z] 23:13:10     INFO -  PID 2681 | console.warn: SearchSettings: "get: No settings file exists, new profile?" (new Error("", "(unknown module)"))
[task 2021-03-03T23:13:10.987Z] 23:13:10     INFO -  PID 2681 | console.debug: SearchService: "_loadEngines: start"
[task 2021-03-03T23:13:10.987Z] 23:13:10     INFO -  PID 2681 | console.debug: SearchEngineSelector: "fetchEngineConfiguration en-US:default:default::false:xpcshell:42"
[task 2021-03-03T23:13:10.988Z] 23:13:10     INFO -  PID 2681 | console.debug: SearchEngineSelector: "fetchEngineConfiguration: google@search.mozilla.org,amazondotcom@search.mozilla.org,wikipedia@search.mozilla.org,bing@search.mozilla.org,ddg@search.mozilla.org"
[task 2021-03-03T23:13:10.988Z] 23:13:10     INFO -  PID 2681 | console.debug: SearchService: "_loadEnginesFromConfig"
[task 2021-03-03T23:13:10.988Z] 23:13:10     INFO -  PID 2681 | console.debug: SearchService: "makeEngineFromConfig:" ({params:{searchUrlGetParams:[{name:"client", value:"firefox-b-d"}, {name:"q", value:"{searchTerms}"}]}, schema:1605047692074, extraParams:[{name:"channel", pref:"google_channel_row", condition:"pref"}], telemetryId:"google-b-d", webExtension:{id:"google@search.mozilla.org", locale:"default"}, id:"cb8e7210-9f0b-48fa-8708-b9a03df79eea", last_modified:1605203142486, default:"yes-if-no-other"})
[task 2021-03-03T23:13:10.988Z] 23:13:10     INFO -  PID 2681 | console.debug: SearchService: "_handleIgnoreListUpdated"
[task 2021-03-03T23:13:10.988Z] 23:13:10     INFO -  PID 2681 | console.debug: SearchService: "addEnginesFromExtension: google@search.mozilla.org"
[task 2021-03-03T23:13:10.988Z] 23:13:10     INFO -  PID 2681 | console.debug: SearchService: "addEnginesFromExtension: Ignoring builtIn engine."
[task 2021-03-03T23:13:10.989Z] 23:13:10     INFO -  PID 2681 | console.debug: SearchEngine: "_setIcon: Setting icon url for" "Google" "to" "moz-extension://968c0b69-6c88-af4b-8286-c2ecbf4ed7cd/favicon.ico"
[task 2021-03-03T23:13:10.989Z] 23:13:10     INFO -  PID 2681 | console.debug: SearchService: "makeEngineFromConfig:" ({schema:1599421304249, telemetryId:"amazondotcom", webExtension:{id:"amazondotcom@search.mozilla.org", locale:"default"}, id:"071c671c-7c1b-469d-a771-ab16ff6e8beb", last_modified:1599574471320})
[task 2021-03-03T23:13:10.989Z] 23:13:10     INFO -  PID 2681 | console.debug: SearchService: "addEnginesFromExtension: amazondotcom@search.mozilla.org"
[task 2021-03-03T23:13:10.989Z] 23:13:10     INFO -  PID 2681 | console.debug: SearchService: "addEnginesFromExtension: Ignoring builtIn engine."
[task 2021-03-03T23:13:10.989Z] 23:13:10     INFO -  PID 2681 | console.debug: SearchEngine: "_setIcon: Setting icon url for" "Amazon.com" "to" "moz-extension://f772c716-10aa-8f47-b4d7-6d009da19b0d/favicon.ico"
[task 2021-03-03T23:13:10.992Z] 23:13:10     INFO -  PID 2681 | console.debug: SearchService: "makeEngineFromConfig:" ({schema:1613245306902, webExtension:{id:"wikipedia@search.mozilla.org", locale:"default"}, id:"3f3beb1d-e32e-40a4-b6ed-56741803e1d8", last_modified:1613587855064})
[task 2021-03-03T23:13:10.992Z] 23:13:10     INFO -  PID 2681 | console.debug: SearchService: "addEnginesFromExtension: wikipedia@search.mozilla.org"
[task 2021-03-03T23:13:10.992Z] 23:13:10     INFO -  PID 2681 | console.debug: SearchService: "addEnginesFromExtension: Ignoring builtIn engine."
[task 2021-03-03T23:13:10.992Z] 23:13:10     INFO -  PID 2681 | console.debug: SearchEngine: "_setIcon: Setting icon url for" "Wikipedia (en)" "to" "moz-extension://0c94c4ec-dfb1-1441-bec7-b2efba21aad4/favicon.ico"
[task 2021-03-03T23:13:10.992Z] 23:13:10     INFO -  PID 2681 | console.debug: SearchService: "makeEngineFromConfig:" ({params:{searchUrlGetParams:[{name:"pc", value:"MOZI"}, {name:"q", value:"{searchTerms}"}]}, schema:1592948527171, extraParams:[{name:"form", value:"MOZCON", purpose:"contextmenu", condition:"purpose"}, {name:"form", value:"MOZSBR", purpose:"searchbar", condition:"purpose"}, {name:"form", value:"MOZSPG", purpose:"homepage", condition:"purpose"}, {name:"form", value:"MOZLBR", purpose:"keyword", condition:"purpose"}, {name:"form", value:"MOZTSB", purpose:"newtab", condition:"purpose"}], webExtension:{id:"bing@search.mozilla.org", locale:"default"}, id:"7ec766f6-639a-4618-91bc-33eb3d4378c6", last_modified:1593025575021})
[task 2021-03-03T23:13:10.992Z] 23:13:10     INFO -  PID 2681 | console.debug: SearchService: "addEnginesFromExtension: bing@search.mozilla.org"
[task 2021-03-03T23:13:10.993Z] 23:13:10     INFO -  PID 2681 | console.debug: SearchService: "addEnginesFromExtension: Ignoring builtIn engine."
[task 2021-03-03T23:13:10.993Z] 23:13:10     INFO -  PID 2681 | console.debug: SearchEngine: "_setIcon: Setting icon url for" "Bing" "to" "moz-extension://90fcd3c6-5c2e-e648-a1c7-9073db4151d4/favicon.ico"
[task 2021-03-03T23:13:10.993Z] 23:13:10     INFO -  PID 2681 | console.debug: SearchService: "makeEngineFromConfig:" ({schema:1594312388385, extraParams:[{name:"t", value:"ffcm", purpose:"contextmenu", condition:"purpose"}, {name:"t", value:"ffab", purpose:"keyword", condition:"purpose"}, {name:"t", value:"ffsb", purpose:"searchbar", condition:"purpose"}, {name:"t", value:"ffhp", purpose:"homepage", condition:"purpose"}, {name:"t", value:"ffnt", purpose:"newtab", condition:"purpose"}], telemetryId:"ddg", webExtension:{id:"ddg@search.mozilla.org", locale:"default"}, id:"c0b26c0e-63e6-4235-b2ce-5f16b6a8bf87", last_modified:1595254832054})
[task 2021-03-03T23:13:10.993Z] 23:13:10     INFO -  PID 2681 | console.debug: SearchService: "addEnginesFromExtension: ddg@search.mozilla.org"
[task 2021-03-03T23:13:10.993Z] 23:13:10     INFO -  PID 2681 | console.debug: SearchService: "addEnginesFromExtension: Ignoring builtIn engine."
[task 2021-03-03T23:13:10.994Z] 23:13:10     INFO -  PID 2681 | console.debug: SearchEngine: "_setIcon: Setting icon url for" "DuckDuckGo" "to" "moz-extension://d6e39388-784f-7f4f-8e0f-0cf163d37912/favicon.ico"
[task 2021-03-03T23:13:10.994Z] 23:13:10     INFO -  PID 2681 | console.debug: SearchService: "_addEngineToStore: Adding engine:" "Google"
[task 2021-03-03T23:13:10.994Z] 23:13:10     INFO -  PID 2681 | console.debug: SearchService: "_addEngineToStore: Adding engine:" "Amazon.com"
[task 2021-03-03T23:13:10.994Z] 23:13:10     INFO -  PID 2681 | console.debug: SearchService: "_addEngineToStore: Adding engine:" "Wikipedia (en)"
[task 2021-03-03T23:13:10.994Z] 23:13:10     INFO -  PID 2681 | console.debug: SearchService: "_addEngineToStore: Adding engine:" "Bing"
[task 2021-03-03T23:13:10.994Z] 23:13:10     INFO -  PID 2681 | console.debug: SearchService: "_addEngineToStore: Adding engine:" "DuckDuckGo"
[task 2021-03-03T23:13:10.995Z] 23:13:10     INFO -  PID 2681 | console.debug: SearchService: "_loadEngines: loading" 0 "engines reported by AddonManager startup"
[task 2021-03-03T23:13:10.995Z] 23:13:10     INFO -  PID 2681 | console.debug: SearchService: "_loadEngines: done"
[task 2021-03-03T23:13:10.995Z] 23:13:10     INFO -  PID 2681 | console.debug: SearchService: "_init: engines loaded, writing settings"
[task 2021-03-03T23:13:10.995Z] 23:13:10     INFO -  PID 2681 | console.debug: SearchService: "Completed _init"
[task 2021-03-03T23:13:10.995Z] 23:13:10     INFO -  (xpcshell/head.js) | test run_next_test 1 pending (2)
[task 2021-03-03T23:13:10.995Z] 23:13:10     INFO -  (xpcshell/head.js) | test setup finished (2)
[task 2021-03-03T23:13:10.995Z] 23:13:10     INFO -  xpcshell.ini:toolkit/components/search/tests/xpcshell/test_notifications.js | Starting test_addingEngine_opensearch
[task 2021-03-03T23:13:10.996Z] 23:13:10     INFO -  (xpcshell/head.js) | test test_addingEngine_opensearch pending (2)
[task 2021-03-03T23:13:10.996Z] 23:13:10     INFO -  PID 2681 | console.debug: SearchService: "addEngine: Adding" "http://localhost:50145/data/engine.xml"
[task 2021-03-03T23:13:10.996Z] 23:13:10     INFO -  PID 2681 | console.debug: SearchService: "init"
[task 2021-03-03T23:13:10.996Z] 23:13:10     INFO -  (xpcshell/head.js) | test run_next_test 1 finished (2)
[task 2021-03-03T23:13:10.996Z] 23:13:10     INFO -  PID 2681 | console.debug: OpenSearchEngine: "_install: Downloading engine from:" "http://localhost:50145/data/engine.xml"
[task 2021-03-03T23:13:10.996Z] 23:13:10     INFO -  PID 2681 | console.debug: SearchUtils: "loadListener: Starting request:" "http://localhost:50145/data/engine.xml"
[task 2021-03-03T23:13:10.997Z] 23:13:10     INFO -  PID 2681 | console.debug: SearchUtils: "loadListener: Stopping request:" "http://localhost:50145/data/engine.xml"
[task 2021-03-03T23:13:10.997Z] 23:13:10     INFO -  PID 2681 | console.debug: OpenSearchEngine: "Initing search plugin from" "http://localhost:50145/data/engine.xml"
[task 2021-03-03T23:13:10.997Z] 23:13:10     INFO -  PID 2681 | console.debug: SearchEngine: "_setIcon: Setting icon url for" "Test search engine" "to" "data:image/png;base64,AAABAAEAEBAAAAEAGABoAwAAFgAAACgAAAAQAAAAIAAAAAEAGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADs9Pt8xetPtu9FsfFNtu%2BTzvb2%2B%..."
[task 2021-03-03T23:13:10.997Z] 23:13:10     INFO -  PID 2681 | console.debug: SearchUtils: "NOTIFY: Engine:" "Test search engine" "Verb:" "engine-loaded"
[task 2021-03-03T23:13:10.997Z] 23:13:10     INFO -  TEST-PASS | xpcshell.ini:toolkit/components/search/tests/xpcshell/test_notifications.js | test_addingEngine_opensearch - [test_addingEngine_opensearch : 206] Should be expecting a notification - 2 > 0
[task 2021-03-03T23:13:11.000Z] 23:13:11     INFO -  TEST-PASS | xpcshell.ini:toolkit/components/search/tests/xpcshell/test_notifications.js | test_addingEngine_opensearch - [test_addingEngine_opensearch : 206] Should have received the next expected notification - "engine-loaded" == "engine-loaded"
[task 2021-03-03T23:13:11.000Z] 23:13:11     INFO -  PID 2681 | console.debug: SearchService: "observe: Done installation of " "Test search engine"
[task 2021-03-03T23:13:11.000Z] 23:13:11     INFO -  PID 2681 | console.debug: SearchService: "_addEngineToStore: Adding engine:" "Test search engine"
[task 2021-03-03T23:13:11.001Z] 23:13:11     INFO -  PID 2681 | console.debug: SearchUtils: "NOTIFY: Engine:" "Test search engine" "Verb:" "engine-added"
[task 2021-03-03T23:13:11.001Z] 23:13:11     INFO -  TEST-PASS | xpcshell.ini:toolkit/components/search/tests/xpcshell/test_notifications.js | test_addingEngine_opensearch - [test_addingEngine_opensearch : 206] Should be expecting a notification - 1 > 0
[task 2021-03-03T23:13:11.001Z] 23:13:11     INFO -  TEST-PASS | xpcshell.ini:toolkit/components/search/tests/xpcshell/test_notifications.js | test_addingEngine_opensearch - [test_addingEngine_opensearch : 206] Should have received the next expected notification - "engine-added" == "engine-added"
[task 2021-03-03T23:13:11.001Z] 23:13:11     INFO -  TEST-PASS | xpcshell.ini:toolkit/components/search/tests/xpcshell/test_notifications.js | test_addingEngine_opensearch - [test_addingEngine_opensearch : 45] [object Object] == [object Object]
[task 2021-03-03T23:13:11.001Z] 23:13:11     INFO -  (xpcshell/head.js) | test run_next_test 2 pending (2)
[task 2021-03-03T23:13:11.001Z] 23:13:11     INFO -  (xpcshell/head.js) | test test_addingEngine_opensearch finished (2)
[task 2021-03-03T23:13:11.002Z] 23:13:11     INFO -  xpcshell.ini:toolkit/components/search/tests/xpcshell/test_notifications.js | Starting test_addingEngine_webExtension
[task 2021-03-03T23:13:11.002Z] 23:13:11     INFO -  (xpcshell/head.js) | test test_addingEngine_webExtension pending (2)
[task 2021-03-03T23:13:11.002Z] 23:13:11     INFO -  (xpcshell/head.js) | test run_next_test 2 finished (2)
[task 2021-03-03T23:13:11.002Z] 23:13:11     INFO -  PID 2681 | console.debug: SearchSettings: "batchTask: Invalidating engine settings"
[task 2021-03-03T23:13:11.002Z] 23:13:11     INFO -  PID 2681 | console.debug: SearchSettings: "_write: Writing to settings file."
[task 2021-03-03T23:13:11.002Z] 23:13:11     INFO -  PID 2681 | console.debug: SearchSettings: "_write: settings file written to disk."
[task 2021-03-03T23:13:11.002Z] 23:13:11     INFO -  PID 2681 | JavaScript error: /Users/cltbld/tasks/task_1614811525/build/tests/xpcshell/tests/toolkit/components/search/tests/xpcshell/head_search.js, line 417: Error: Waiting for Notifications timed out, only received: engine-added
[task 2021-03-03T23:13:11.003Z] 23:13:11     INFO -  "CONSOLE_MESSAGE: (error) [JavaScript Error: "Error: Waiting for Notifications timed out, only received: engine-added" {file: "/Users/cltbld/tasks/task_1614811525/build/tests/xpcshell/tests/toolkit/components/search/tests/xpcshell/head_search.js" line: 417}]"
[task 2021-03-03T23:13:11.003Z] 23:13:11     INFO -  "Extension attached"
[task 2021-03-03T23:13:11.003Z] 23:13:11     INFO -  PID 2681 | console.debug: SearchService: "addEnginesFromExtension: example@tests.mozilla.org"
[task 2021-03-03T23:13:11.003Z] 23:13:11     INFO -  PID 2681 | console.debug: SearchService: "installExtensionEngine:" "example@tests.mozilla.org"
[task 2021-03-03T23:13:11.003Z] 23:13:11     INFO -  PID 2681 | console.debug: SearchService: "addEnginesFromExtension: installing:" "example@tests.mozilla.org" ":" "default"
[task 2021-03-03T23:13:11.004Z] 23:13:11     INFO -  PID 2681 | console.debug: SearchService: "_createAndAddEngine: Adding" "Example Engine"
[task 2021-03-03T23:13:11.004Z] 23:13:11     INFO -  PID 2681 | console.debug: SearchService: "_addEngineToStore: Adding engine:" "Example Engine"
[task 2021-03-03T23:13:11.004Z] 23:13:11     INFO -  PID 2681 | console.debug: SearchUtils: "NOTIFY: Engine:" "Example Engine" "Verb:" "engine-added"
[task 2021-03-03T23:13:11.004Z] 23:13:11     INFO -  TEST-PASS | xpcshell.ini:toolkit/components/search/tests/xpcshell/test_notifications.js | test_addingEngine_webExtension - [test_addingEngine_webExtension : 206] Should be expecting a notification - 1 > 0
[task 2021-03-03T23:13:11.004Z] 23:13:11     INFO -  TEST-PASS | xpcshell.ini:toolkit/components/search/tests/xpcshell/test_notifications.js | test_addingEngine_webExtension - [test_addingEngine_webExtension : 206] Should have received the next expected notification - "engine-added" == "engine-added"
[task 2021-03-03T23:13:11.004Z] 23:13:11     INFO -  TEST-PASS | xpcshell.ini:toolkit/components/search/tests/xpcshell/test_notifications.js | test_addingEngine_webExtension - [test_addingEngine_webExtension : 1853] Search provider extension should be running - "running" == "running"
[task 2021-03-03T23:13:11.005Z] 23:13:11     INFO -  TEST-PASS | xpcshell.ini:toolkit/components/search/tests/xpcshell/test_notifications.js | test_addingEngine_webExtension - [test_addingEngine_webExtension : 1858] Extension ID of search provider should be set - "example@tests.mozilla.org" == true
[task 2021-03-03T23:13:11.005Z] 23:13:11     INFO -  Unexpected exception Error: Waiting for Notifications timed out, only received: engine-added at /Users/cltbld/tasks/task_1614811525/build/tests/xpcshell/tests/toolkit/components/search/tests/xpcshell/head_search.js:417
[task 2021-03-03T23:13:11.005Z] 23:13:11     INFO -  handleTimeout@/Users/cltbld/tasks/task_1614811525/build/tests/xpcshell/tests/toolkit/components/search/tests/xpcshell/head_search.js:417:7
[task 2021-03-03T23:13:11.005Z] 23:13:11     INFO -  notify@resource://gre/modules/Timer.jsm:62:17
[task 2021-03-03T23:13:11.005Z] 23:13:11     INFO -  _do_main@/Users/cltbld/tasks/task_1614811525/build/tests/xpcshell/head.js:239:6
[task 2021-03-03T23:13:11.005Z] 23:13:11     INFO -  _execute_test@/Users/cltbld/tasks/task_1614811525/build/tests/xpcshell/head.js:567:5
[task 2021-03-03T23:13:11.005Z] 23:13:11     INFO -  @-e:1:1
[task 2021-03-03T23:13:11.006Z] 23:13:11     INFO -  exiting test
[task 2021-03-03T23:13:11.006Z] 23:13:11  WARNING -  TEST-UNEXPECTED-FAIL | xpcshell.ini:toolkit/components/search/tests/xpcshell/test_notifications.js | test_addingEngine_webExtension - [test_addingEngine_webExtension : 372] Extension left running at test shutdown - "running" == "unloaded"```