Bug: Intermittent browser/components/migration/tests/marionette/test_refresh_firefox.py | single tracking bug
Status: REOPENED
Priority: P5
Created: 2024-09-05 01:38:28+00:00
Resolved: 2025-02-17 07:15:59+00:00

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

---
```
[task 2024-09-04T23:16:32.742Z] 23:16:32     INFO - TEST-START | browser/components/migration/tests/marionette/test_refresh_firefox.py TestFirefoxRefresh.testFxANoSync
[task 2024-09-04T23:16:32.742Z] 23:16:32     INFO -  1725491792742	Marionette	DEBUG	Accepted connection 2 from 127.0.0.1:51799
[task 2024-09-04T23:16:32.743Z] 23:16:32     INFO -  1725491792743	Marionette	DEBUG	2 -> [0,1,"WebDriver:NewSession",{"strictFileInteractability":true}]
[task 2024-09-04T23:16:32.744Z] 23:16:32     INFO -  1725491792743	Marionette	DEBUG	Waiting for initial application window
[task 2024-09-04T23:16:32.745Z] 23:16:32     INFO -  1725491792744	RemoteAgent	TRACE	[10] ProgressListener Start: expectNavigation=false resolveWhenStarted=false unloadTimeout=5000 waitForExplicitStart=false
[task 2024-09-04T23:16:32.745Z] 23:16:32     INFO -  1725491792744	RemoteAgent	TRACE	[10] ProgressListener Setting unload timer (5000ms)
[task 2024-09-04T23:16:32.746Z] 23:16:32     INFO -  1725491792744	RemoteAgent	TRACE	[10] Wait for initial navigation: isInitial=false, isLoadingDocument=false
[task 2024-09-04T23:16:32.746Z] 23:16:32     INFO -  1725491792744	RemoteAgent	TRACE	[10] Document already finished loading: about:blank
[task 2024-09-04T23:16:32.746Z] 23:16:32     INFO -  1725491792744	RemoteAgent	TRACE	[10] ProgressListener Stop: has error=false url=about:blank
[task 2024-09-04T23:16:32.748Z] 23:16:32     INFO -  1725491792746	Marionette	DEBUG	2 <- [1,1,null,{"sessionId":"25cb8997-ef8b-49e3-a1b9-8e570bf8505c","capabilities":{"acceptInsecureCerts":false,"browserName":"firefox","browserVersion":"132.0a1","platformName":"mac","unhandledPromptBehavior":"dismiss and notify","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:132.0) Gecko/20100101 Firefox/132.0","moz:buildID":"20240904222133","moz:headless":false,"moz:platformVersion":"19.6.0","moz:processID":2174,"moz:profile":"/var/folders/wz/18gfs3nd6_dbm6bvr31x0514000014/T/tmp2jt_w2r4.mozrunner","moz:shutdownTimeout":60000,"pageLoadStrategy":"normal","timeouts":{"implicit":0,"pageLoad":300000,"script":30000},"setWindowRect":true,"strictFileInteractability":true,"moz:accessibilityChecks":false,"moz:webdriverClick":true,"moz:windowless":false,"proxy":{}}}]
[task 2024-09-04T23:16:32.748Z] 23:16:32     INFO -  1725491792748	Marionette	DEBUG	2 -> [0,2,"WebDriver:SetTimeouts",{"script":30000}]
[task 2024-09-04T23:16:32.749Z] 23:16:32     INFO -  1725491792748	Marionette	DEBUG	2 <- [1,2,null,{"value":null}]
[task 2024-09-04T23:16:32.749Z] 23:16:32     INFO -  1725491792749	Marionette	DEBUG	2 -> [0,3,"WebDriver:SetTimeouts",{"pageLoad":300000}]
[task 2024-09-04T23:16:32.750Z] 23:16:32     INFO -  1725491792749	Marionette	DEBUG	2 <- [1,3,null,{"value":null}]
[task 2024-09-04T23:16:32.750Z] 23:16:32     INFO -  1725491792750	Marionette	DEBUG	2 -> [0,4,"WebDriver:SetTimeouts",{"implicit":0}]
[task 2024-09-04T23:16:32.751Z] 23:16:32     INFO -  1725491792750	Marionette	DEBUG	2 <- [1,4,null,{"value":null}]
[task 2024-09-04T23:16:32.752Z] 23:16:32     INFO -  1725491792751	Marionette	DEBUG	2 -> [0,5,"Marionette:SetContext",{"value":"chrome"}]
[task 2024-09-04T23:16:32.752Z] 23:16:32     INFO -  1725491792752	Marionette	DEBUG	2 <- [1,5,null,{"value":null}]
[task 2024-09-04T23:16:32.755Z] 23:16:32     INFO -  1725491792754	Marionette	DEBUG	2 -> [0,6,"WebDriver:ExecuteScript",{"script":"window.global = {};\n          global.LoginInfo = Components.Constructor(\"@mozilla.org/login-manager/loginInfo;1\", \"nsILoginIn ... l.FormHistory = ChromeUtils.importESModule(\n            \"resource://gre/modules/FormHistory.sys.mjs\"\n          ).FormHistory;","args":[],"newSandbox":false,"sandbox":"firefox-refresh","line":550,"filename":"tests/browser/components/migration/tests/marionette/test_refresh_firefox.py"}]
[task 2024-09-04T23:16:32.755Z] 23:16:32     INFO -  1725491792754	RemoteAgent	TRACE	WebDriverProcessData actor created for PID 2174
[task 2024-09-04T23:16:32.755Z] 23:16:32     INFO -  1725491792755	Marionette	TRACE	[2] MarionetteCommands actor created for window id 4
[task 2024-09-04T23:16:32.760Z] 23:16:32     INFO -  1725491792759	Marionette	DEBUG	2 <- [1,6,null,{"value":null}]
[task 2024-09-04T23:16:32.762Z] 23:16:32     INFO -  1725491792761	Marionette	DEBUG	2 -> [0,7,"WebDriver:ExecuteScript",{"script":"try {\n            global.formAutofillStorage = ChromeUtils.importESModule(\n              \"resource://formautofill/FormAutofil ... s.mjs\"\n            ).formAutofillStorage;\n          } catch(e) {\n            return false;\n          }\n          return true;","args":[],"newSandbox":false,"sandbox":"firefox-refresh","line":550,"filename":"tests/browser/components/migration/tests/marionette/test_refresh_firefox.py"}]
[task 2024-09-04T23:16:32.764Z] 23:16:32     INFO -  1725491792764	Marionette	DEBUG	2 <- [1,7,null,{"value":false}]
[task 2024-09-04T23:16:32.766Z] 23:16:32     INFO -  1725491792765	Marionette	DEBUG	2 -> [0,8,"WebDriver:ExecuteAsyncScript",{"script":"let resolve = arguments[arguments.length - 1];\n          let { FxAccountsStorageManager } = ChromeUtils.importESModule(\n      ... m\", uid: \"uid\", keyFetchToken: \"top-secret\"};\n          storage.initialize(data);\n          storage.finalize().then(resolve);","args":[],"newSandbox":false,"sandbox":"firefox-refresh","scriptTimeout":null,"line":555,"filename":"tests/browser/components/migration/tests/marionette/test_refresh_firefox.py"}]
[task 2024-09-04T23:16:32.782Z] 23:16:32     INFO -  1725491792779	Marionette	DEBUG	2 <- [1,8,null,{"value":null}]
[task 2024-09-04T23:16:32.784Z] 23:16:32     INFO -  1725491792782	Marionette	DEBUG	2 -> [0,9,"WebDriver:ExecuteAsyncScript",{"script":"let { FxAccountsStorageManager } = ChromeUtils.importESModule(\n            \"resource://gre/modules/FxAccountsStorage.sys.mjs\" ...   }).then(() => {\n            resolve(result);\n          }).catch(err => {\n            resolve(err.toString());\n          });","args":[],"newSandbox":false,"sandbox":"firefox-refresh","scriptTimeout":null,"line":555,"filename":"tests/browser/components/migration/tests/marionette/test_refresh_firefox.py"}]
[task 2024-09-04T23:16:32.790Z] 23:16:32     INFO -  1725491792789	Marionette	DEBUG	2 <- [1,9,null,{"value":{"accountData":{"email":"test@test.com","uid":"uid","keyFetchToken":"top-secret"}}}]
[task 2024-09-04T23:16:32.791Z] 23:16:32     INFO -  1725491792790	Marionette	DEBUG	2 -> [0,10,"WebDriver:ExecuteScript",{"script":"return Services.prefs.getStringPref(\"services.sync.username\", null);","args":[],"newSandbox":true,"sandbox":"default","line":476,"filename":"tests/browser/components/migration/tests/marionette/test_refresh_firefox.py"}]
[task 2024-09-04T23:16:32.793Z] 23:16:32     INFO -  1725491792793	Marionette	DEBUG	2 <- [1,10,null,{"value":null}]
[task 2024-09-04T23:16:32.796Z] 23:16:32     INFO -  1725491792794	Marionette	DEBUG	2 -> [0,11,"WebDriver:ExecuteScript",{"script":"// Ensure the current (temporary) profile is in profiles.ini:\n          let profD = Services.dirsvc.get(\"ProfD\", Ci.nsIFile); ... ;\n          Services.env.set(\"MOZ_RESET_PROFILE_RESTART\", \"1\");\n          Services.env.set(\"XRE_PROFILE_PATH\", arguments[0]);","args":["/var/folders/wz/18gfs3nd6_dbm6bvr31x0514000014/T/tmp2jt_w2r4.mozrunner","marionette-test-profile-1725491792793"],"newSandbox":false,"sandbox":"firefox-refresh","line":550,"filename":"tests/browser/components/migration/tests/marionette/test_refresh_firefox.py"}]
[task 2024-09-04T23:16:32.802Z] 23:16:32     INFO -  1725491792802	Marionette	DEBUG	2 <- [1,11,null,{"value":null}]
[task 2024-09-04T23:16:32.803Z] 23:16:32     INFO -  1725491792803	Marionette	DEBUG	2 -> [0,12,"Marionette:GetContext",{}]
[task 2024-09-04T23:16:32.804Z] 23:16:32     INFO -  1725491792803	Marionette	DEBUG	2 <- [1,12,null,{"value":"chrome"}]
[task 2024-09-04T23:16:32.805Z] 23:16:32     INFO -  1725491792804	Marionette	DEBUG	2 -> [0,13,"Marionette:AcceptConnections",{"value":false}]
[task 2024-09-04T23:16:32.805Z] 23:16:32     INFO -  1725491792804	Marionette	INFO	Stopped listening on port 2828
[task 2024-09-04T23:16:32.805Z] 23:16:32     INFO -  1725491792804	Marionette	DEBUG	2 <- [1,13,null,{"value":null}]
[task 2024-09-04T23:16:32.806Z] 23:16:32     INFO -  1725491792805	Marionette	DEBUG	2 -> [0,14,"Marionette:Quit",{"flags":["eRestart"]}]
[task 2024-09-04T23:16:32.818Z] 23:16:32     INFO -  1725491792813	Marionette	TRACE	[2] MarionetteCommands actor destroyed for window id 4
[task 2024-09-04T23:16:33.398Z] 23:16:33     INFO -  1725491793397	Marionette	TRACE	Received observer notification quit-application
[task 2024-09-04T23:16:33.399Z] 23:16:33     INFO -  1725491793399	Marionette	TRACE	Received observer notification quit-application
[task 2024-09-04T23:16:33.401Z] 23:16:33     INFO -  1725491793401	Marionette	DEBUG	Marionette stopped listening
[task 2024-09-04T23:16:33.401Z] 23:16:33     INFO -  1725491793401	Marionette	DEBUG	2 <- [1,14,null,{"cause":"restart","forced":false,"in_app":true}]
[task 2024-09-04T23:16:33.415Z] 23:16:33     INFO -  1725491793415	Marionette	DEBUG	Closed connection 2
[task 2024-09-04T23:19:43.607Z] 23:19:43     INFO - TEST-UNEXPECTED-ERROR | browser/components/migration/tests/marionette/test_refresh_firefox.py TestFirefoxRefresh.testFxANoSync | TimeoutError: Process unexpectedly quit without restarting (exit code: 0)
[task 2024-09-04T23:19:43.607Z] 23:19:43     INFO - Traceback (most recent call last):
[task 2024-09-04T23:19:43.607Z] 23:19:43     INFO -   File "/opt/worker/tasks/task_172549105985710/build/venv/lib/python3.11/site-packages/marionette_harness/marionette_test/testcases.py", line 198, in run
[task 2024-09-04T23:19:43.607Z] 23:19:43     INFO -     testMethod()
[task 2024-09-04T23:19:43.607Z] 23:19:43     INFO -   File "/opt/worker/tasks/task_172549105985710/build/tests/marionette/tests/browser/components/migration/tests/marionette/test_refresh_firefox.py", line 699, in testFxANoSync
[task 2024-09-04T23:19:43.607Z] 23:19:43     INFO -     this_cleanup = self.doReset()
[task 2024-09-04T23:19:43.607Z] 23:19:43     INFO -                    ^^^^^^^^^^^^^^
[task 2024-09-04T23:19:43.608Z] 23:19:43     INFO -   File "/opt/worker/tasks/task_172549105985710/build/tests/marionette/tests/browser/components/migration/tests/marionette/test_refresh_firefox.py", line 639, in doReset
[task 2024-09-04T23:19:43.608Z] 23:19:43     INFO -     self.marionette.restart(clean=False, in_app=True)
[task 2024-09-04T23:19:43.608Z] 23:19:43     INFO -   File "/opt/worker/tasks/task_172549105985710/build/venv/lib/python3.11/site-packages/marionette_driver/decorators.py", line 24, in _
[task 2024-09-04T23:19:43.608Z] 23:19:43     INFO -     return func(*args, **kwargs)
[task 2024-09-04T23:19:43.608Z] 23:19:43     INFO -            ^^^^^^^^^^^^^^^^^^^^^
[task 2024-09-04T23:19:43.608Z] 23:19:43     INFO -   File "/opt/worker/tasks/task_172549105985710/build/venv/lib/python3.11/site-packages/marionette_driver/marionette.py", line 1290, in restart
[task 2024-09-04T23:19:43.608Z] 23:19:43     INFO -     reraise(
[task 2024-09-04T23:19:43.608Z] 23:19:43     INFO -   File "/opt/worker/tasks/task_172549105985710/build/venv/lib/python3.11/site-packages/six.py", line 718, in reraise
[task 2024-09-04T23:19:43.608Z] 23:19:43     INFO -     raise value.with_traceback(tb)
[task 2024-09-04T23:19:43.608Z] 23:19:43     INFO -   File "/opt/worker/tasks/task_172549105985710/build/venv/lib/python3.11/site-packages/marionette_driver/marionette.py", line 1271, in restart
[task 2024-09-04T23:19:43.608Z] 23:19:43     INFO -     self.raise_for_port(timeout=timeout_restart, check_process_status=False)
[task 2024-09-04T23:19:43.608Z] 23:19:43     INFO -   File "/opt/worker/tasks/task_172549105985710/build/venv/lib/python3.11/site-packages/marionette_driver/marionette.py", line 744, in raise_for_port
[task 2024-09-04T23:19:43.608Z] 23:19:43     INFO -     raise socket.timeout(
[task 2024-09-04T23:19:43.608Z] 23:19:43     INFO - TEST-INFO took 190864ms
[task 2024-09-04T23:19:43.610Z] 23:19:43    ERROR - test_end for browser/components/migration/tests/marionette/test_refresh_firefox.py TestFirefoxRefresh.testFxANoSync logged while not in progress. Logged with data: {"message": "marionette_driver.errors.InvalidSessionIdException: Please start a session", "expected": "PASS", "stack": "Traceback (most recent call last):\n  File \"/opt/worker/tasks/task_172549105985710/build/venv/lib/python3.11/site-packages/marionette_harness/marionette_test/testcases.py\", line 231, in run\n    self.tearDown()\n  File \"/opt/worker/tasks/task_172549105985710/build/tests/marionette/tests/browser/components/migration/tests/marionette/test_refresh_firefox.py\", line 569, in tearDown\n    self.marionette.restart(in_app=False, clean=True)\n  File \"/opt/worker/tasks/task_172549105985710/build/venv/lib/python3.11/site-packages/marionette_driver/decorators.py\", line 24, in _\n    return func(*args, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^\n  File \"/opt/worker/tasks/task_172549105985710/build/venv/lib/python3.11/site-packages/marionette_driver/marionette.py\", line 1220, in restart\n    context = self._send_message(\"Marionette:GetContext\", key=\"value\")\n              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/opt/worker/tasks/task_172549105985710/build/venv/lib/python3.11/site-packages/marionette_driver/decorators.py\", line 24, in _\n    return func(*args, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^\n  File \"/opt/worker/tasks/task_172549105985710/build/venv/lib/python3.11/site-packages/marionette_driver/marionette.py\", line 766, in _send_message\n    raise errors.InvalidSessionIdException(\"Please start a session\")\n", "extra": {"class_name": "test_refresh_firefox.TestFirefoxRefresh", "method_name": "testFxANoSync"}, "test": "browser/components/migration/tests/marionette/test_refresh_firefox.py TestFirefoxRefresh.testFxANoSync", "status": "ERROR"}
[task 2024-09-04T23:19:43.610Z] 23:19:43     INFO - TEST-START | browser/components/migration/tests/marionette/test_refresh_firefox.py TestFirefoxRefresh.testResetEverything
```