Bug: Intermittent browser/components/search/test/marionette/test_engines_on_restart.py TestEnginesOnRestart.test_engines | marionette_driver.errors.ScriptTimeoutException: Timed out after 30000 ms
Status: RESOLVED
Priority: P5
Resolution: INCOMPLETE
Created: 2023-01-12 19:05:30+00:00
Resolved: 2024-09-09 12:01:21+00:00

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

---
```
[task 2023-01-12T17:10:37.093Z] 17:10:37     INFO -  DEBUG: Adding blocker DownloadAutoSaveView: writing data for phase profile-before-change
[task 2023-01-12T17:10:37.174Z] 17:10:37     INFO -  1673543437178	Marionette	TRACE	Received observer notification browser-idle-startup-tasks-finished
[task 2023-01-12T17:10:37.179Z] 17:10:37     INFO -  DEBUG: Adding blocker ScriptPreloader: Saving bytecode cache for phase xpcom-will-shutdown
[task 2023-01-12T17:10:37.194Z] 17:10:37     INFO -  1673543437199	RemoteAgent	TRACE	[9] ProgressListener Start: expectNavigation=false resolveWhenStarted=false unloadTimeout=1600 waitForExplicitStart=false
[task 2023-01-12T17:10:37.200Z] 17:10:37     INFO -  1673543437200	RemoteAgent	TRACE	[9] ProgressListener Setting unload timer (1600ms)
[task 2023-01-12T17:10:37.201Z] 17:10:37     INFO -  1673543437201	RemoteAgent	TRACE	[9] Document already finished loading: about:blank
[task 2023-01-12T17:10:37.201Z] 17:10:37     INFO -  1673543437201	RemoteAgent	TRACE	[9] ProgressListener Stop: has error=false
[task 2023-01-12T17:10:37.222Z] 17:10:37     INFO -  console.debug: SearchService: "init"
[task 2023-01-12T17:10:37.245Z] 17:10:37     INFO -  1673543437246	Marionette	DEBUG	2 <- [1,1,null,{"sessionId":"e960770a-ebfa-4b18-9e61-e239101d2192","capabilities":{"browserName":"firefox","browserVersion":"110.0a1","platformName":"windows","acceptInsecureCerts":false,"pageLoadStrategy":"normal","setWindowRect":true,"timeouts":{"implicit":0,"pageLoad":300000,"script":30000},"strictFileInteractability":true,"unhandledPromptBehavior":"dismiss and notify","moz:accessibilityChecks":false,"moz:buildID":"20230112154321","moz:headless":false,"moz:platformVersion":"10.0","moz:processID":7088,"moz:profile":"C:\\Users\\task_167353636516080\\AppData\\Local\\Temp\\tmpum8nb8xi.mozrunner","moz:shutdownTimeout":300000,"moz:useNonSpecCompliantPointerOrigin":false,"moz:webdriverClick":true,"moz:windowless":false,"proxy":{}}}]
[task 2023-01-12T17:10:37.265Z] 17:10:37     INFO -  1673543437271	Marionette	DEBUG	2 -> [0,2,"Marionette:SetContext",{"value":"content"}]
[task 2023-01-12T17:10:37.273Z] 17:10:37     INFO -  1673543437272	Marionette	DEBUG	2 <- [1,2,null,{"value":null}]
[task 2023-01-12T17:10:37.274Z] 17:10:37     INFO -  1673543437274	Marionette	DEBUG	2 -> [0,3,"Marionette:GetContext",{}]
[task 2023-01-12T17:10:37.274Z] 17:10:37     INFO -  1673543437274	Marionette	DEBUG	2 <- [1,3,null,{"value":"content"}]
[task 2023-01-12T17:10:37.275Z] 17:10:37     INFO -  1673543437275	Marionette	DEBUG	2 -> [0,4,"Marionette:SetContext",{"value":"chrome"}]
[task 2023-01-12T17:10:37.276Z] 17:10:37     INFO -  1673543437276	Marionette	DEBUG	2 <- [1,4,null,{"value":null}]
[task 2023-01-12T17:10:37.278Z] 17:10:37     INFO -  1673543437278	Marionette	DEBUG	2 -> [0,5,"WebDriver:ExecuteAsyncScript",{"script":"let [resolve] = arguments;\nlet searchService = Components.classes[\n        \"@mozilla.org/browser/search-service;1\"]\n    .getS ... aces.nsISearchService);\nreturn searchService.init().then(function () {\n  resolve(searchService.defaultEngine.identifier);\n});","args":[],"newSandbox":true,"sandbox":"default","scriptTimeout":null,"line":34,"filename":"Z:\\task_167353636516080\\build\\tests\\marionette\\tests\\browser\\components\\search\\test\\marionette\\test_engines_on_restart.py"}]
[task 2023-01-12T17:10:37.290Z] 17:10:37     INFO -  1673543437292	RemoteAgent	TRACE	WebDriverProcessData actor created for PID 7088
[task 2023-01-12T17:10:37.297Z] 17:10:37     INFO -  1673543437296	Marionette	TRACE	[1] MarionetteCommands actor created for window id 2
[task 2023-01-12T17:10:37.304Z] 17:10:37     INFO -  console.debug: SearchService: "init"
[task 2023-01-12T17:10:37.769Z] 17:10:37     INFO -  console.debug: SearchService: "init"
[task 2023-01-12T17:10:39.139Z] 17:10:39     INFO -  console.debug: SearchService: "#handleIgnoreListUpdated"
[task 2023-01-12T17:10:44.068Z] 17:10:44     INFO -  DEBUG: Adding blocker SessionFile: Finish writing Session Restore data for phase IOUtils: waiting for profileBeforeChange IO to complete
[task 2023-01-12T17:10:44.072Z] 17:10:44     INFO -  DEBUG: Completed blocker SessionFile: Finish writing Session Restore data for phase IOUtils: waiting for profileBeforeChange IO to complete
[task 2023-01-12T17:10:47.736Z] 17:10:47     INFO -  DEBUG: Adding blocker JSON store: writing data for 'broadcastlisteners' for phase IOUtils: waiting for profileBeforeChange IO to complete
[task 2023-01-12T17:10:47.774Z] 17:10:47     INFO -  console.debug: SearchService: "init"
[task 2023-01-12T17:10:59.080Z] 17:10:59     INFO -  DEBUG: Adding blocker SessionFile: Finish writing Session Restore data for phase IOUtils: waiting for profileBeforeChange IO to complete
[task 2023-01-12T17:11:07.320Z] 17:11:07     INFO -  1673543467321	Marionette	DEBUG	2 <- [1,5,{"error":"script timeout","message":"Timed out after 30000 ms","stacktrace":"RemoteError@chrome://remote/content/shared/RemoteError.sys.mjs:8:8\nWebDriverError@chrome://remote/content/shared/webdriver/Er ... scriptTimeoutID<@chrome://remote/content/marionette/evaluate.sys.mjs:95:11\nnotify@resource://gre/modules/Timer.sys.mjs:49:17\n"},null]
[task 2023-01-12T17:11:07.324Z] 17:11:07     INFO -  1673543467324	Marionette	DEBUG	2 -> [0,6,"Marionette:SetContext",{"value":"content"}]
[task 2023-01-12T17:11:07.324Z] 17:11:07     INFO -  1673543467324	Marionette	DEBUG	2 <- [1,6,null,{"value":null}]
[task 2023-01-12T17:11:07.326Z] 17:11:07     INFO -  1673543467326	Marionette	DEBUG	2 -> [0,7,"Marionette:GetContext",{}]
[task 2023-01-12T17:11:07.326Z] 17:11:07     INFO -  1673543467326	Marionette	DEBUG	2 <- [1,7,null,{"value":"content"}]
[task 2023-01-12T17:11:07.328Z] 17:11:07     INFO -  1673543467328	Marionette	DEBUG	2 -> [0,8,"Marionette:SetContext",{"value":"chrome"}]
[task 2023-01-12T17:11:07.328Z] 17:11:07     INFO -  1673543467328	Marionette	DEBUG	2 <- [1,8,null,{"value":null}]
[task 2023-01-12T17:11:07.330Z] 17:11:07     INFO -  1673543467330	Marionette	DEBUG	2 -> [0,9,"WebDriver:TakeScreenshot",{"id":null,"full":true,"hash":false,"scroll":true}]
[task 2023-01-12T17:11:07.400Z] 17:11:07     INFO -  1673543467407	Marionette	DEBUG	2 <- [1,9,null,{"value":"iVBORw0KGgoAAAANSUhEUgAABQAAAAP/CAYAAACf8GEBAAAgAElEQVR4XuzdC7RkVXkn8H1vv188GwRpGlRaNAIiKhBBR43OImYNklETE0lGUccoE1/jc9YaQ5JZ4 ... AAAECBAgQIECAAAECBAgQIPAgIAA+fMmNBAgQIECAAAECBAgQIECAAAECBKKAABjhzAgQIECAAAECBAgQIECAAAECBAg8CAzjkBc8thfyfwAAAABJRU5ErkJggg=="}]
[task 2023-01-12T17:11:07.411Z] 17:11:07     INFO -  1673543467411	Marionette	DEBUG	2 -> [0,10,"Marionette:SetContext",{"value":"content"}]
[task 2023-01-12T17:11:07.412Z] 17:11:07     INFO -  1673543467412	Marionette	DEBUG	2 <- [1,10,null,{"value":null}]
[task 2023-01-12T17:11:07.414Z] 17:11:07     INFO -  1673543467414	Marionette	DEBUG	2 -> [0,11,"Marionette:GetContext",{}]
[task 2023-01-12T17:11:07.415Z] 17:11:07     INFO -  1673543467414	Marionette	DEBUG	2 <- [1,11,null,{"value":"content"}]
[task 2023-01-12T17:11:07.416Z] 17:11:07     INFO -  1673543467415	Marionette	DEBUG	2 -> [0,12,"Marionette:SetContext",{"value":"content"}]
[task 2023-01-12T17:11:07.416Z] 17:11:07     INFO -  1673543467416	Marionette	DEBUG	2 <- [1,12,null,{"value":null}]
[task 2023-01-12T17:11:07.417Z] 17:11:07     INFO -  1673543467417	Marionette	DEBUG	2 -> [0,13,"WebDriver:GetPageSource",{}]
[task 2023-01-12T17:11:07.431Z] 17:11:07     INFO -  1673543467433	RemoteAgent	TRACE	WebDriverProcessData actor created for PID 1836
[task 2023-01-12T17:11:07.439Z] 17:11:07     INFO -  1673543467439	Marionette	TRACE	[9] MarionetteCommands actor created for window id 4294967297
[task 2023-01-12T17:11:07.445Z] 17:11:07     INFO -  1673543467445	Marionette	DEBUG	2 <- [1,13,null,{"value":"<html><head></head><body></body></html>"}]
[task 2023-01-12T17:11:07.446Z] 17:11:07     INFO -  1673543467446	Marionette	DEBUG	2 -> [0,14,"Marionette:SetContext",{"value":"content"}]
[task 2023-01-12T17:11:07.447Z] 17:11:07     INFO -  1673543467446	Marionette	DEBUG	2 <- [1,14,null,{"value":null}]
[task 2023-01-12T17:11:07.452Z] 17:11:07    ERROR -  TEST-UNEXPECTED-ERROR | browser/components/search/test/marionette/test_engines_on_restart.py TestEnginesOnRestart.test_engines | marionette_driver.errors.ScriptTimeoutException: Timed out after 30000 ms
[task 2023-01-12T17:11:07.452Z] 17:11:07     INFO -  stacktrace:
[task 2023-01-12T17:11:07.453Z] 17:11:07     INFO -  	RemoteError@chrome://remote/content/shared/RemoteError.sys.mjs:8:8
[task 2023-01-12T17:11:07.453Z] 17:11:07     INFO -  	WebDriverError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:180:5
[task 2023-01-12T17:11:07.453Z] 17:11:07     INFO -  	ScriptTimeoutError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:442:5
[task 2023-01-12T17:11:07.453Z] 17:11:07     INFO -  	evaluate.sandbox/timeoutPromise</scriptTimeoutID<@chrome://remote/content/marionette/evaluate.sys.mjs:95:11
[task 2023-01-12T17:11:07.453Z] 17:11:07     INFO -  	notify@resource://gre/modules/Timer.sys.mjs:49:17
[task 2023-01-12T17:11:07.454Z] 17:11:07     INFO -  Traceback (most recent call last):
[task 2023-01-12T17:11:07.454Z] 17:11:07     INFO -    File "Z:\task_167353636516080\build\venv\lib\site-packages\marionette_harness\marionette_test\testcases.py", line 198, in run
[task 2023-01-12T17:11:07.454Z] 17:11:07     INFO -      testMethod()
[task 2023-01-12T17:11:07.454Z] 17:11:07     INFO -    File "Z:\task_167353636516080\build\tests\marionette\tests\browser\components\search\test\marionette\test_engines_on_restart.py", line 37, in test_engines
[task 2023-01-12T17:11:07.455Z] 17:11:07     INFO -      self.assertTrue(self.get_default_search_engine().startswith("google"))
[task 2023-01-12T17:11:07.455Z] 17:11:07     INFO -    File "Z:\task_167353636516080\build\tests\marionette\tests\browser\components\search\test\marionette\test_engines_on_restart.py", line 34, in get_default_search_engine
[task 2023-01-12T17:11:07.455Z] 17:11:07     INFO -      return self.marionette.execute_async_script(textwrap.dedent(script))
[task 2023-01-12T17:11:07.455Z] 17:11:07     INFO -    File "Z:\task_167353636516080\build\venv\lib\site-packages\marionette_driver\marionette.py", line 1806, in execute_async_script
[task 2023-01-12T17:11:07.456Z] 17:11:07     INFO -      rv = self._send_message("WebDriver:ExecuteAsyncScript", body, key="value")
[task 2023-01-12T17:11:07.456Z] 17:11:07     INFO -    File "Z:\task_167353636516080\build\venv\lib\site-packages\marionette_driver\decorators.py", line 24, in _
[task 2023-01-12T17:11:07.456Z] 17:11:07     INFO -      return func(*args, **kwargs)
[task 2023-01-12T17:11:07.457Z] 17:11:07     INFO -    File "Z:\task_167353636516080\build\venv\lib\site-packages\marionette_driver\marionette.py", line 663, in _send_message
[task 2023-01-12T17:11:07.457Z] 17:11:07     INFO -      self._handle_error(err)
[task 2023-01-12T17:11:07.457Z] 17:11:07     INFO -    File "Z:\task_167353636516080\build\venv\lib\site-packages\marionette_driver\marionette.py", line 675, in _handle_error
[task 2023-01-12T17:11:07.457Z] 17:11:07     INFO -      raise errors.lookup(error)(message, stacktrace=stacktrace)
[task 2023-01-12T17:11:07.458Z] 17:11:07     INFO -  TEST-INFO took 44165ms
[task 2023-01-12T17:11:07.458Z] 17:11:07     INFO -  1673543467453	Marionette	DEBUG	2 -> [0,15,"WebDriver:DeleteSession",{}]
[task 2023-01-12T17:11:07.458Z] 17:11:07     INFO -  1673543467454	Marionette	TRACE	[1] MarionetteCommands actor destroyed for window id 2
[task 2023-01-12T17:11:07.458Z] 17:11:07     INFO -  1673543467454	Marionette	TRACE	[9] MarionetteCommands actor destroyed for window id 4294967297
[task 2023-01-12T17:11:07.461Z] 17:11:07     INFO -  1673543467460	Marionette	DEBUG	2 <- [1,15,null,{"value":null}]
[task 2023-01-12T17:11:07.462Z] 17:11:07     INFO -  1673543467461	Marionette	DEBUG	Closed connection 2
[task 2023-01-12T17:11:07.694Z] 17:11:07     INFO -  DEBUG: Completed blocker SessionFile: Finish writing Session Restore data for phase IOUtils: waiting for profileBeforeChange IO to complete
[task 2023-01-12T17:11:07.698Z] 17:11:07     INFO -  TEST-START | browser/components/sessionstore/test/marionette/test_restore_windows_after_restart_and_quit.py TestSessionStoreDisabled.test_no_restore_with_quit
```