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
Conversation
@lukeis Sure -- any idea how that is possible without modifying .travis.yml ? |
@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 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) |
@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. |
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? |
@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 |
@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 |
@twalpole doesn't look like that will help us: we only use travis for pull requests |
@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/ |
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 |
geckodriver has implemented random port assignment in mozilla/geckodriver@4d9e5b3 so this fix is not needed once the next geckodriver release happens. - Closing |
X
in the preceding checkbox, I verify that I have signed the Contributor License AgreementIf 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.