Bug: Intermittent browser/components/sessionstore/test/marionette/test_restore_windows_after_restart_and_quit.py TestSessionStoreEnabledAllWindows.test_with_variety | marionette_driver.errors.InvalidSessionIdException: Please start a session
Status: RESOLVED
Priority: P5
Resolution: INCOMPLETE
Created: 2022-12-23 12:37:23+00:00
Resolved: 2023-04-04 17:06:05+00:00

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

---
```
[task 2022-12-23T11:54:14.056Z] 11:54:14     INFO -  Application command: Z:\task_167179173970105\build\application\firefox\firefox.exe -no-remote -marionette --wait-for-browser -profile C:\Users\task_167179173970105\AppData\Local\Temp\tmp5l4ixvw7.mozrunner
[task 2022-12-23T11:54:14.223Z] 11:54:14     INFO -  DEBUG: Adding blocker AddonManager: shutting down. for phase profile-before-change
[task 2022-12-23T11:54:14.236Z] 11:54:14     INFO -  DEBUG: Adding blocker IOUtils Blocker (profile-before-change) for phase profile-before-change
[task 2022-12-23T11:54:14.251Z] 11:54:14     INFO -  DEBUG: Adding blocker IOUtils Blocker (profile-before-change-telemetry) for phase profile-before-change-telemetry
[task 2022-12-23T11:54:14.251Z] 11:54:14     INFO -  DEBUG: Adding blocker IOUtils Blocker (profile-before-change) for phase IOUtils: waiting for sendTelemetry IO to complete
[task 2022-12-23T11:54:14.251Z] 11:54:14     INFO -  DEBUG: Adding blocker IOUtils Blocker (xpcom-will-shutdown) for phase xpcom-will-shutdown
[task 2022-12-23T11:54:14.252Z] 11:54:14     INFO -  DEBUG: Adding blocker IOUtils Blocker (profile-before-change-telemetry) for phase IOUtils: waiting for xpcomWillShutdown IO to complete
[task 2022-12-23T11:54:14.279Z] 11:54:14     INFO -  DEBUG: Adding blocker Flush WebExtension StartupCache for phase IOUtils: waiting for profileBeforeChange IO to complete
[task 2022-12-23T11:54:14.359Z] 11:54:14     INFO -  DEBUG: Adding blocker JSON store: writing data for 'addonStartup' for phase AddonManager: Waiting for providers to shut down.
[task 2022-12-23T11:54:14.370Z] 11:54:14     INFO -  DEBUG: Adding blocker Update add-on blocklist state into add-on DB for phase AddonManager: Waiting to start provider shutdown.
[task 2022-12-23T11:54:14.374Z] 11:54:14     INFO -  DEBUG: Adding blocker XPIProvider shutdown for phase quit-application-granted
[task 2022-12-23T11:54:14.375Z] 11:54:14     INFO -  DEBUG: Adding blocker XPIProvider for phase AddonManager: Waiting for providers to shut down.
[task 2022-12-23T11:54:14.376Z] 11:54:14     INFO -  DEBUG: Adding blocker ServiceWorkerRegistrar: Flushing data for phase profile-before-change
[task 2022-12-23T11:54:14.377Z] 11:54:14     INFO -  DEBUG: Adding blocker CrashMonitor: Writing notifications to file after receiving profile-before-change and awaiting all checkpoints written for phase IOUtils: waiting for profileBeforeChange IO to complete
[task 2022-12-23T11:54:14.389Z] 11:54:14     INFO -  DEBUG: Adding blocker TelemetryController: shutting down for phase profile-before-change-telemetry
[task 2022-12-23T11:54:14.420Z] 11:54:14     INFO -  DEBUG: Adding blocker EnvironmentAddonBuilder for phase AddonManager: Waiting to start provider shutdown.
[task 2022-12-23T11:54:14.432Z] 11:54:14     INFO -  DEBUG: Adding blocker RemoteSettingsClient - finish IDB access. for phase profile-before-change
[task 2022-12-23T11:54:14.434Z] 11:54:14     INFO -  DEBUG: Adding blocker TerminatoryTelemetry: Waiting to submit telemetry for phase IOUtils: waiting for sendTelemetry IO to complete
[task 2022-12-23T11:54:14.436Z] 11:54:14     INFO -  1671796454436	Marionette	INFO	Marionette enabled
[task 2022-12-23T11:54:14.438Z] 11:54:14     INFO -  1671796454438	Marionette	TRACE	Received observer notification final-ui-startup
[task 2022-12-23T11:54:14.439Z] 11:54:14     INFO -  1671796454439	Marionette	INFO	Listening on port 2828
[task 2022-12-23T11:54:14.439Z] 11:54:14     INFO -  1671796454439	Marionette	DEBUG	Marionette is listening
[task 2022-12-23T11:57:26.321Z] 11:57:26    ERROR -  TEST-UNEXPECTED-ERROR | browser/components/sessionstore/test/marionette/test_restore_windows_after_restart_and_quit.py TestSessionStoreEnabledAllWindows.test_with_variety | marionette_driver.errors.InvalidSessionIdException: Please start a session
[task 2022-12-23T11:57:26.321Z] 11:57:26     INFO -  Traceback (most recent call last):
[task 2022-12-23T11:57:26.323Z] 11:57:26     INFO -    File "Z:\task_167179173970105\build\venv\lib\site-packages\marionette_harness\marionette_test\testcases.py", line 231, in run
[task 2022-12-23T11:57:26.324Z] 11:57:26     INFO -      self.tearDown()
[task 2022-12-23T11:57:26.324Z] 11:57:26     INFO -    File "Z:\task_167179173970105\build\tests\marionette\tests\browser\components\sessionstore\test\marionette\session_store_test_case.py", line 94, in tearDown
[task 2022-12-23T11:57:26.324Z] 11:57:26     INFO -      super(SessionStoreTestCase, self).tearDown()
[task 2022-12-23T11:57:26.324Z] 11:57:26     INFO -    File "Z:\task_167179173970105\build\venv\lib\site-packages\marionette_harness\runner\mixins\window_manager.py", line 22, in tearDown
[task 2022-12-23T11:57:26.325Z] 11:57:26     INFO -      if len(self.marionette.chrome_window_handles) > len(self.start_windows):
[task 2022-12-23T11:57:26.325Z] 11:57:26     INFO -    File "Z:\task_167179173970105\build\venv\lib\site-packages\marionette_driver\marionette.py", line 1413, in chrome_window_handles
[task 2022-12-23T11:57:26.325Z] 11:57:26     INFO -      with self.using_context("chrome"):
[task 2022-12-23T11:57:26.325Z] 11:57:26     INFO -    File "c:\mozilla-build\python3\lib\contextlib.py", line 117, in __enter__
[task 2022-12-23T11:57:26.325Z] 11:57:26     INFO -      return next(self.gen)
[task 2022-12-23T11:57:26.326Z] 11:57:26     INFO -    File "Z:\task_167179173970105\build\venv\lib\site-packages\marionette_driver\marionette.py", line 1482, in using_context
[task 2022-12-23T11:57:26.326Z] 11:57:26     INFO -      scope = self._send_message("Marionette:GetContext", key="value")
[task 2022-12-23T11:57:26.326Z] 11:57:26     INFO -    File "Z:\task_167179173970105\build\venv\lib\site-packages\marionette_driver\decorators.py", line 24, in _
[task 2022-12-23T11:57:26.326Z] 11:57:26     INFO -      return func(*args, **kwargs)
[task 2022-12-23T11:57:26.327Z] 11:57:26     INFO -    File "Z:\task_167179173970105\build\venv\lib\site-packages\marionette_driver\marionette.py", line 653, in _send_message
[task 2022-12-23T11:57:26.327Z] 11:57:26     INFO -      raise errors.InvalidSessionIdException("Please start a session")
[task 2022-12-23T11:57:26.327Z] 11:57:26     INFO -  TEST-INFO took 199556ms
```