Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

assign marionette_port to each service instance #2286

Closed
wants to merge 1 commit into from

Conversation

twalpole
Copy link
Contributor

If a unique marionette_port option isn't passed to geckodriver it uses 2828 - This means that multiple instances of geckodriver all end up talking to the same instance of firefox even though they each launch their own. The end result of this when using selenium is strange behavior in the first session created once multiple sessions are created (double actions, random errors, etc) and other sessions not actually being independent.

This change assigns a unique marionette_port option and keeps track of whats been assigned since the port isn't actually taken until geckodriver starts up its firefox instance.

@twalpole
Copy link
Contributor Author

twalpole commented Jun 14, 2016

@lukeis Sure -- any idea how that is possible without modifying .travis.yml ?

@lukeis
Copy link
Member

lukeis commented Jun 14, 2016

@twalpole you should disable it for your whole fork. You should be able to execute the same things locally and when you make pull requests they will run in travis here

@lukeis lukeis added the C-rb label Jun 14, 2016
@twalpole
Copy link
Contributor Author

twalpole commented Jun 14, 2016

@lukeis ok -- just to point out there is a way for the selenium project to fix this in the travis.yml by encrypting the channel name - travis-ci/travis-ci#1094 (comment)

@lukeis
Copy link
Member

lukeis commented Jun 14, 2016

@twalpole that only works because mozilla is in charge of the irc server it seems... we are not (freenode)... also i can't find anything about that "secure" config they use.

@titusfortner
Copy link
Member

So, I'm pretty sure that this is a workaround for this Marionette bug, so I'm not sure we want to implement it.

This does pass for local Ruby bindings, but it won't solve the issues with running it on a remote server.

@p0deje - what do you think?

@twalpole
Copy link
Contributor Author

twalpole commented Jun 15, 2016

@titusfortner that bug report seems to be about a session being shut down and not able to start another - this allows to run multiple sessions simultaneously - i think they're different, although this may workaround the other issue - but fixing that issue in geckodriver would still not let selenium run multiple instances

@twalpole
Copy link
Contributor Author

@lukeis it has nothing to do with Mozilla running the irc server - it uses Travis encrypted variables - https://docs.travis-ci.com/user/environment-variables/#Encrypted-Variables - which makes them only accessible to the repo that encrypts them and not to forks

@lukeis
Copy link
Member

lukeis commented Jun 15, 2016

@twalpole doesn't look like that will help us:
"Encrypted environment variables are not available to pull requests from forks due to the security risk of exposing such information to unknown code."

we only use travis for pull requests

@twalpole
Copy link
Contributor Author

twalpole commented Jun 15, 2016

@lukeis The notification channel setting isn't an environment variable though -- I believe it will work, willing to be proven wrong though - This is probably a better link - https://docs.travis-ci.com/user/encryption-keys/

@p0deje
Copy link
Member

p0deje commented Jun 20, 2016

I'm not sure we should address this issue in client bindings. I believe that geckodriver (just like chromedriver) should pick up some random port for Marionette when starting Firefox. It looks like internal property of geckodriver-Firefox, not part of client's responsibility.

I believe it would be better to create an issue for that in geckodriver bug tracker and wait for them to fix it. At the same time, there is no workaround available in Ruby but we might want to allow passing --marionette-port when starting Firefox driver.

@twalpole
Copy link
Contributor Author

geckodriver has implemented random port assignment in mozilla/geckodriver@4d9e5b3 so this fix is not needed once the next geckodriver release happens. - Closing

@twalpole twalpole closed this Jun 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants