Use a custom exit code in "Services.appstartup.quit()" when Marionette or RemoteAgent fail to start their server
Categories
(Remote Protocol :: Agent, task, P3)
Tracking
(firefox156 fixed)
| Tracking | Status | |
|---|---|---|
| firefox156 | --- | fixed |
People
(Reporter: whimboo, Assigned: khalid.alhaddad98, Mentored)
Details
(Whiteboard: [webdriver:m21][webdriver:external][lang=js][webdriver:relnote])
Attachments
(1 external file)
Both components currently call Services.appstartup.quit() without a custom error code. As such the process quits with an exit code of 0 which is inappropriate. We should use 69 similar to geckodriver when the port is not available.
| Reporter | ||
Updated•5 months ago
|
| Assignee | ||
Updated•5 months ago
|
| Assignee | ||
Comment 1•4 months ago
|
||
| Reporter | ||
Comment 2•4 months ago
|
||
Hi Khalid. Sorry for the delay in my response but the bug notification got under the wire due to the massive amount of bug mail I receive per day. And sadly pushing to Phabricator with WIP set, doesn't send out emails as well. :( So if you don't get a reply within 2 days please feel free to set needinfo for me in the future.
I have taken a look at the patch now and I can see the problem. The second instance of Marionette will fail on the same port because there is already an active session. I think what we need to do here is actually the following:
- Use
mozrunnerdirectly or a new instance ofGeckoInstancepurely to create a new Firefox process. It should use Marionette on a fixed host/port. - Create a new
Marionetteinstance for the same host/port configuration, and let it launch its own Firefox process. Given that this is using the same port, Firefox should terminate itself because it cannot create the server. - Marionette should detect that the Firefox process shutdown and we need to check the exit code.
Let me know if you need further assistance, but based on your earlier message on Matrix you might be fine in playing with the above steps.
| Assignee | ||
Comment 3•4 months ago
|
||
Hi whimboo, no worries, and sure I will send a needinfo in the future. I will also have a look at using either the mozrunner or a new instance of GeckoInstance, but I will let you know as usual if I have any questions.
Updated•4 months ago
|
Updated•3 months ago
|
Comment 5•2 months ago
|
||
| bugherder | ||
| Reporter | ||
Updated•2 months ago
|
Updated•2 months ago
|
| Reporter | ||
Comment 6•2 months ago
|
||
Thank you Khalid for getting this bug fixed! I meanwhile as well fixed the Windows issue so that the newly added test now also works on that platform.
I wonder if you might be interested to work on bug 2044153 next. It's more JS but it would be good to see aligned between Marionette and BiDi. Also let me know if you need help when pushing a patch to try for verification. Thanks!
| Assignee | ||
Comment 7•2 months ago
|
||
That is good to hear, and yes, I'd be happy to work on bug 2044153, and as always will let you know if I run into any issues with my try push.
Thanks in advance.
Updated•2 months ago
|
Description
•