Bug: Intermittent browser/components/sessionstore/test/marionette/test_restore_windows_after_close_last_tabs.py TestSessionStoreEnabledAllWindows.test_close_tabs | marionette_driver.errors.InvalidSessionIdException: Please start a session
Status: RESOLVED
Priority: P5
Resolution: INCOMPLETE
Created: 2022-08-16 00:55:51+00:00
Resolved: 2022-09-13 17:00:12+00:00

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

---
```
[task 2022-08-16T00:19:45.585Z] 00:19:45     INFO -  DEBUG: Completed blocker places.sqlite#1: PlacesUIUtils: maybeAddImportButton (17) for phase places.sqlite#1: waiting for clients
[task 2022-08-16T00:19:45.594Z] 00:19:45     INFO -  DEBUG: Completed blocker places.sqlite#1: GuidHelper.getItemId (18) for phase places.sqlite#1: waiting for clients
[task 2022-08-16T00:19:45.606Z] 00:19:45     INFO -  DEBUG: Adding blocker ContentParent: id=14ef9000 for phase xpcom-will-shutdown
[task 2022-08-16T00:19:45.607Z] 00:19:45     INFO -  DEBUG: Adding blocker ContentParent: id=14ef9000 for phase profile-before-change
[task 2022-08-16T00:19:45.608Z] 00:19:45     INFO -  DEBUG: Adding blocker ContentParent: id=14ef9000 for phase quit-application-granted
[task 2022-08-16T00:19:45.609Z] 00:19:45     INFO -  DEBUG: Adding blocker ContentParent: id=1c52d700 for phase xpcom-will-shutdown
[task 2022-08-16T00:19:45.609Z] 00:19:45     INFO -  DEBUG: Adding blocker ContentParent: id=1c52d700 for phase profile-before-change
[task 2022-08-16T00:19:45.610Z] 00:19:45     INFO -  DEBUG: Adding blocker ContentParent: id=1c52d700 for phase quit-application-granted
[task 2022-08-16T00:19:45.625Z] 00:19:45     INFO -  DEBUG: Adding blocker OS.File: flush pending requests, warn about unclosed files, shut down service. for phase xpcom-will-shutdown
[task 2022-08-16T00:19:45.626Z] 00:19:45     INFO -  DEBUG: Adding blocker OS.File: flush I/O queued before profileBeforeChange for phase profile-before-change
[task 2022-08-16T00:19:45.633Z] 00:19:45     INFO -  DEBUG: Adding blocker ContentParent: id=17084700 for phase xpcom-will-shutdown
[task 2022-08-16T00:19:45.634Z] 00:19:45     INFO -  DEBUG: Adding blocker ContentParent: id=17084700 for phase profile-before-change
[task 2022-08-16T00:19:45.635Z] 00:19:45     INFO -  DEBUG: Adding blocker ContentParent: id=17084700 for phase quit-application-granted
[task 2022-08-16T00:19:45.640Z] 00:19:45     INFO -  DEBUG: Adding blocker DownloadAutoSaveView: writing data for phase profile-before-change
[task 2022-08-16T00:25:43.934Z] 00:25:43     INFO -  JavaScript error: chrome://remote/content/marionette/driver.js, line 2270: NS_ERROR_ILLEGAL_VALUE: Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIObserverService.removeObserver]
[task 2022-08-16T00:26:55.589Z] 00:26:55    ERROR -  TEST-UNEXPECTED-ERROR | browser/components/sessionstore/test/marionette/test_restore_windows_after_close_last_tabs.py TestSessionStoreEnabledAllWindows.test_close_tabs | marionette_driver.errors.InvalidSessionIdException: Please start a session
[task 2022-08-16T00:26:55.593Z] 00:26:55     INFO -  Traceback (most recent call last):
[task 2022-08-16T00:26:55.593Z] 00:26:55     INFO -    File "Z:\task_166060179177015\build\venv\lib\site-packages\marionette_harness\marionette_test\testcases.py", line 235, in run
[task 2022-08-16T00:26:55.594Z] 00:26:55     INFO -      self.tearDown()
[task 2022-08-16T00:26:55.594Z] 00:26:55     INFO -    File "Z:\task_166060179177015\build\tests\marionette\tests\browser\components\sessionstore\test\marionette\session_store_test_case.py", line 94, in tearDown
[task 2022-08-16T00:26:55.594Z] 00:26:55     INFO -      super(SessionStoreTestCase, self).tearDown()
[task 2022-08-16T00:26:55.594Z] 00:26:55     INFO -    File "Z:\task_166060179177015\build\venv\lib\site-packages\marionette_harness\runner\mixins\window_manager.py", line 24, in tearDown
[task 2022-08-16T00:26:55.595Z] 00:26:55     INFO -      if len(self.marionette.chrome_window_handles) > len(self.start_windows):
[task 2022-08-16T00:26:55.595Z] 00:26:55     INFO -    File "Z:\task_166060179177015\build\venv\lib\site-packages\marionette_driver\marionette.py", line 1393, in chrome_window_handles
[task 2022-08-16T00:26:55.595Z] 00:26:55     INFO -      with self.using_context("chrome"):
[task 2022-08-16T00:26:55.595Z] 00:26:55     INFO -    File "c:\mozilla-build\python3\lib\contextlib.py", line 117, in __enter__
[task 2022-08-16T00:26:55.596Z] 00:26:55     INFO -      return next(self.gen)
[task 2022-08-16T00:26:55.596Z] 00:26:55     INFO -    File "Z:\task_166060179177015\build\venv\lib\site-packages\marionette_driver\marionette.py", line 1462, in using_context
[task 2022-08-16T00:26:55.596Z] 00:26:55     INFO -      scope = self._send_message("Marionette:GetContext", key="value")
[task 2022-08-16T00:26:55.597Z] 00:26:55     INFO -    File "Z:\task_166060179177015\build\venv\lib\site-packages\marionette_driver\decorators.py", line 27, in _
[task 2022-08-16T00:26:55.597Z] 00:26:55     INFO -      return func(*args, **kwargs)
[task 2022-08-16T00:26:55.597Z] 00:26:55     INFO -    File "Z:\task_166060179177015\build\venv\lib\site-packages\marionette_driver\marionette.py", line 656, in _send_message
[task 2022-08-16T00:26:55.597Z] 00:26:55     INFO -      raise errors.InvalidSessionIdException("Please start a session")
[task 2022-08-16T00:26:55.598Z] 00:26:55     INFO -  TEST-INFO took 439596ms
```