UnknownException: NotSupportedError: ChromeUtils.registerWindowActor: 'MarionetteCommands' actor is already registered
Categories
(Remote Protocol :: Marionette, defect, P3)
Tracking
(Fission Milestone:M7, firefox85 fixed)
Tracking | Status | |
---|---|---|
firefox85 | --- | fixed |
People
(Reporter: whimboo, Assigned: whimboo)
References
Details
(Whiteboard: [marionette-fission-mvp])
Attachments
(1 file)
Aborting a current test job for Marionette with Ctrl+C the following error gets thrown:
UnknownException: NotSupportedError: ChromeUtils.registerWindowActor: 'MarionetteCommands' actor is already registered.
File "/Users/henrik/code/gecko/testing/marionette/mach_commands.py", line 112, in marionette_test
return run_marionette(tests, topsrcdir=self.topsrcdir, **kwargs)
File "/Users/henrik/code/gecko/testing/marionette/mach_commands.py", line 59, in run_marionette
failed = MarionetteHarness(MarionetteTestRunner, args=vars(args)).run()
File "/Users/henrik/code/gecko/testing/marionette/harness/marionette_harness/runtests.py", line 77, in run
runner.run_tests(tests)
File "/Users/henrik/code/gecko/testing/marionette/harness/marionette_harness/runner/base.py", line 1089, in run_tests
self.cleanup()
File "/Users/henrik/code/gecko/testing/marionette/harness/marionette_harness/runner/base.py", line 1300, in cleanup
self.marionette.start_session()
File "/Users/henrik/code/gecko/testing/marionette/client/marionette_driver/decorators.py", line 27, in _
return func(*args, **kwargs)
File "/Users/henrik/code/gecko/testing/marionette/client/marionette_driver/marionette.py", line 1186, in start_session
reraise(exc_type, exc_type(value.message), tb)
File "/Users/henrik/code/gecko/testing/marionette/client/marionette_driver/marionette.py", line 1179, in start_session
resp = self._send_message("WebDriver:NewSession", capabilities)
File "/Users/henrik/code/gecko/testing/marionette/client/marionette_driver/decorators.py", line 27, in _
return func(*args, **kwargs)
File "/Users/henrik/code/gecko/testing/marionette/client/marionette_driver/marionette.py", line 625, in _send_message
self._handle_error(err)
File "/Users/henrik/code/gecko/testing/marionette/client/marionette_driver/marionette.py", line 647, in _handle_error
raise errors.lookup(error)(message, stacktrace=stacktrace)
The problem here seems that we are trying to create a new session via WebDriver:NewSession
even a session is actually active. Actually we don't allow this code to run because we check this.sessionID
and return early in that command:
Not sure what that is not happening here.
Assignee | ||
Comment 1•4 years ago
|
||
Ok, so when the connection drops, and Marionette re-connects a new GeckoDriver instance is getting created, and as such the sessionID
is set to null
inside the constructor.
The easiest solution to fix this problem would be similar to what we do with MarionetteEventsActor
, and just ignore the error:
But I'm a bit worried that a GeckoDriver instance is left-behind. Or maybe it's getting destroyed, but the JS code misses to call into WebDriver:DeleteSession
firs.t
Assignee | ||
Comment 2•4 years ago
|
||
So we have a onclose
handler set:
https://searchfox.org/mozilla-central/rev/2efcda6dc74c63863fd8f04a6d9d7ac6b09c7eca/testing/marionette/server.js#195-200
But as it looks like the Marionette client never closes the actual connection when hitting Ctrl+C, and as such no clean-up takes place.
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 3•4 years ago
|
||
Comment 4•4 years ago
|
||
Tracking marionette-fission-mvp bugs for Fission Beta milestone (M7).
Pushed by hskupin@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d22dc65be538 [marionette] Hardening registration and unregistration of MarionetteCommands actor. r=marionette-reviewers,maja_zf
Comment 6•4 years ago
|
||
bugherder |
Updated•2 years ago
|
Description
•