Open Bug 1459414 Opened 2 years ago Updated 1 year ago

marionette.enabled in user pref does not start Marionette on startup

Categories

(Testing :: Marionette, defect, P5)

defect

Tracking

(Not tracked)

People

(Reporter: ato, Unassigned)

Details

maja_zf made me aware of some odd behaviour with regards to starting
the Marionette server.  When the marionette.enabled preference is
set to true in the user prefs file, the Marionette server does not
initialise on starting Firefox/Fennec.

If you on the other hand navigate to about:config and flip the
boolean value manually, the server does start.  To start Marionette
on Firefox/Fennec the -marionette flag or MOZ_MARIONETTE environment
variable is required.
Priority: -- → P5
Flags: needinfo?(mjzffr)
Perhaps this is expected behaviour, but I’m conflicted.  All three
methods would entail control of the local system, but it can perhaps
be argued that there is slight security risk involved in having a
third, unique way of enabling the behaviour.
To reduce confusion we could remove the pref and keep the enabled state only internally in the Marionette component. That way the command line argument or the env variable could be used to start Marionette. Note that this would only work for startup, but not within a user session which IMO should be fine.
We can’t remove the preference because the WebIDL interface
navigator.webdriver depends on it.  I also think there is value in
being able to start and stop the server at runtime.  A flag starts
Marionette for the lifetime duration of the process, but as we’ve
discussed in the past with regards to the atomicity of port
allocations, there are reasons this might not be ideal.
I suppose this is not a priority to address.
Flags: needinfo?(mjzffr)
I didn't see a specific question in your n-i, which makes me less likely to respond. :) 

Anyway, I don't see this behaviour as a problem, I just thought it was surprising. It's documented and it does what we need.
You need to log in before you can comment on or make changes to this bug.