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

Firefox driver in 2.53.4 not working with Firefox 48 #2559

Closed
lencioni opened this Issue Aug 2, 2016 · 30 comments

Comments

Projects
None yet
@lencioni
Contributor

lencioni commented Aug 2, 2016

Meta -

OS: OSX

Selenium Version: 2.53.4

Browser: Firefox

Browser Version: 48

Expected Behavior -

Firefox starts and is able to be controlled via Selenium

Actual Behavior -

Firefox starts, but does nothing. After waiting long enough, I see an error like: "`connect_until_stable': unable to obtain stable firefox connection in 60 seconds".

Steps to reproduce -

Selenium::WebDriver.for :firefox

Downgrading to Firefox 47.0.1 resolves this issue for me.

@lukeis

This comment has been minimized.

Show comment
Hide comment
@lukeis

lukeis Aug 2, 2016

Member

Can't fix.

In Firefox 48, Mozilla requires extensions to be signed. They have refused to sign Selenium's Firefox driver extension (webdriver.xpi). Feel free to contact them and/or log an issue for them at https://bugzilla.mozilla.org

The way forward now is to use GeckoDriver. Which is now the default implementation used in 3.0-beta

This issue has been known as a long time coming, I highly recommend pinning your automation to use Firefox 45 ESR until a release of using GeckoDriver/marionette is stable enough for your tests.

Member

lukeis commented Aug 2, 2016

Can't fix.

In Firefox 48, Mozilla requires extensions to be signed. They have refused to sign Selenium's Firefox driver extension (webdriver.xpi). Feel free to contact them and/or log an issue for them at https://bugzilla.mozilla.org

The way forward now is to use GeckoDriver. Which is now the default implementation used in 3.0-beta

This issue has been known as a long time coming, I highly recommend pinning your automation to use Firefox 45 ESR until a release of using GeckoDriver/marionette is stable enough for your tests.

@lukeis lukeis closed this Aug 2, 2016

@lencioni

This comment has been minimized.

Show comment
Hide comment
@lencioni

lencioni Aug 2, 2016

Contributor

Thanks for the speedy response!

Contributor

lencioni commented Aug 2, 2016

Thanks for the speedy response!

lencioni added a commit to Galooshi/happo that referenced this issue Aug 3, 2016

Fix for Firefox 48+
Firefox 48 was released today, causing Happo to stop working. When
running Happo locally, Firefox would open but it would just sit there
doing nothing until it timed out.

We determined that this was broken due to the new version of Firefox
that came out today and filed an issue on the Selenium WebDriver
project:

  SeleniumHQ/selenium#2559

> Can't fix.
>
> In Firefox 48, Mozilla requires extensions to be signed. They have
> refused to sign Selenium's Firefox driver extension (webdriver.xpi).
> Feel free to contact them and/or log an issue for them at
> https://bugzilla.mozilla.org
>
> The way forward now is to use GeckoDriver. Which is now the default
> implementation used in 3.0-beta
>
> This issue has been known as a long time coming, I highly recommend
> pinning your automation to use Firefox 45 ESR until a release of using
> GeckoDriver/marionette is stable enough for your tests.

We might want to try to detect the Firefox version and only apply this
option when the version is 48+, require folks to opt in to the option,
or allow folks to opt out of the option, but I'm not really sure if any
of that is important or not yet. The simplest thing is to require
Firefox 48+ and geckodriver to be installed.

More info about geckodriver can be found at:

- https://github.com/mozilla/geckodriver
- https://developer.mozilla.org/en-US/docs/Mozilla/QA/Marionette/WebDriver

It looks like the right way to tell Travis to use Firefox 48 is via the
`addons` option, which I've done here to keep our builds running.

  https://docs.travis-ci.com/user/firefox/

lencioni added a commit to Galooshi/happo that referenced this issue Aug 3, 2016

Fix for Firefox 48+
Firefox 48 was released today, causing Happo to stop working. When
running Happo locally, Firefox would open but it would just sit there
doing nothing until it timed out.

We determined that this was broken due to the new version of Firefox
that came out today and filed an issue on the Selenium WebDriver
project:

  SeleniumHQ/selenium#2559

> Can't fix.
>
> In Firefox 48, Mozilla requires extensions to be signed. They have
> refused to sign Selenium's Firefox driver extension (webdriver.xpi).
> Feel free to contact them and/or log an issue for them at
> https://bugzilla.mozilla.org
>
> The way forward now is to use GeckoDriver. Which is now the default
> implementation used in 3.0-beta
>
> This issue has been known as a long time coming, I highly recommend
> pinning your automation to use Firefox 45 ESR until a release of using
> GeckoDriver/marionette is stable enough for your tests.

We might want to try to detect the Firefox version and only apply this
option when the version is 48+, require folks to opt in to the option,
or allow folks to opt out of the option, but I'm not really sure if any
of that is important or not yet. The simplest thing is to require
Firefox 48+ and geckodriver to be installed.

More info about geckodriver can be found at:

- https://github.com/mozilla/geckodriver
- https://developer.mozilla.org/en-US/docs/Mozilla/QA/Marionette/WebDriver

It looks like the right way to tell Travis to use Firefox 48 is via the
`addons` option, which I've done here to keep our builds running.

  https://docs.travis-ci.com/user/firefox/

lencioni added a commit to Galooshi/happo that referenced this issue Aug 3, 2016

Fix for Firefox 48+
Firefox 48 was released today, causing Happo to stop working. When
running Happo locally, Firefox would open but it would just sit there
doing nothing until it timed out.

We determined that this was broken due to the new version of Firefox
that came out today and filed an issue on the Selenium WebDriver
project:

  SeleniumHQ/selenium#2559

> Can't fix.
>
> In Firefox 48, Mozilla requires extensions to be signed. They have
> refused to sign Selenium's Firefox driver extension (webdriver.xpi).
> Feel free to contact them and/or log an issue for them at
> https://bugzilla.mozilla.org
>
> The way forward now is to use GeckoDriver. Which is now the default
> implementation used in 3.0-beta
>
> This issue has been known as a long time coming, I highly recommend
> pinning your automation to use Firefox 45 ESR until a release of using
> GeckoDriver/marionette is stable enough for your tests.

We might want to try to detect the Firefox version and only apply this
option when the version is 48+, require folks to opt in to the option,
or allow folks to opt out of the option, but I'm not really sure if any
of that is important or not yet. The simplest thing is to require
Firefox 48+ and geckodriver to be installed.

More info about geckodriver can be found at:

- https://github.com/mozilla/geckodriver
- https://developer.mozilla.org/en-US/docs/Mozilla/QA/Marionette/WebDriver

It looks like the right way to tell Travis to use Firefox 48 is via the
`addons` option, which I've done here to keep our builds running.

  https://docs.travis-ci.com/user/firefox/
@liapretorius

This comment has been minimized.

Show comment
Hide comment
@liapretorius

liapretorius Aug 28, 2016

Thank you @lukeis
I don't love that this is the solution currently, but you're correct and I appreciate you tremendously right now :)

liapretorius commented Aug 28, 2016

Thank you @lukeis
I don't love that this is the solution currently, but you're correct and I appreciate you tremendously right now :)

@HackToday

This comment has been minimized.

Show comment
Hide comment
@HackToday

HackToday Sep 12, 2016

I still not sure if selenium 2.53.* support geckodriver. As I found Firefox need to use

https://developer.mozilla.org/en-US/docs/Mozilla/QA/Marionette/WebDriver

Hi @lukeis Do you know which selenium version work with Geckodriver ?

HackToday commented Sep 12, 2016

I still not sure if selenium 2.53.* support geckodriver. As I found Firefox need to use

https://developer.mozilla.org/en-US/docs/Mozilla/QA/Marionette/WebDriver

Hi @lukeis Do you know which selenium version work with Geckodriver ?

@dougprogrammer

This comment has been minimized.

Show comment
Hide comment
@dougprogrammer

dougprogrammer Sep 12, 2016

Thanks for answer.

dougprogrammer commented Sep 12, 2016

Thanks for answer.

@hashar

This comment has been minimized.

Show comment
Hide comment
@hashar

hashar Sep 29, 2016

From our experience GeckoDriver / Marionette does not mach the capabilities of SeleniumDriver. So either:

  • stick to Firefox 47.0x
  • migrate your tests to gecko driver with bunch of rewriting
  • stop caring about Firefox (less than 8% of web traffic) :-(

hashar commented Sep 29, 2016

From our experience GeckoDriver / Marionette does not mach the capabilities of SeleniumDriver. So either:

  • stick to Firefox 47.0x
  • migrate your tests to gecko driver with bunch of rewriting
  • stop caring about Firefox (less than 8% of web traffic) :-(
@liapretorius

This comment has been minimized.

Show comment
Hide comment
@liapretorius

liapretorius Sep 29, 2016

Only Selenium 3 works with GeckoDriver. According to https://developer.mozilla.org/en-US/docs/Mozilla/QA/Marionette/WebDriver you should be able to download geckodriver and point to it in Selenium 2.53 but I'm not able to do that using Selenium 2.53 with Capybara and Ruby. Capybara doesn't support it and I'm not sure when/if they will. I'm experimenting with Selenium 3 right now. It's working with gecko in that FF browsers are firing up and tests are running. But I have to figure out why all the errors.

liapretorius commented Sep 29, 2016

Only Selenium 3 works with GeckoDriver. According to https://developer.mozilla.org/en-US/docs/Mozilla/QA/Marionette/WebDriver you should be able to download geckodriver and point to it in Selenium 2.53 but I'm not able to do that using Selenium 2.53 with Capybara and Ruby. Capybara doesn't support it and I'm not sure when/if they will. I'm experimenting with Selenium 3 right now. It's working with gecko in that FF browsers are firing up and tests are running. But I have to figure out why all the errors.

@twalpole

This comment has been minimized.

Show comment
Hide comment
@twalpole

twalpole Sep 29, 2016

Contributor

@liapretorius Capybara will support selenium with geckodriver when they're feature complete enough to pass Capybaras tests. You can see the current status of those tests using the latest versions of selenium, geckodriver and firefox here - https://travis-ci.org/jnicklas/capybara/jobs/163764567 . All of the failures are caused by currently lacking functionality in the combo of latest selenium, geckodriver, and marionette (No actions API, modal prompt issues, send_keys functionality limitations)

Contributor

twalpole commented Sep 29, 2016

@liapretorius Capybara will support selenium with geckodriver when they're feature complete enough to pass Capybaras tests. You can see the current status of those tests using the latest versions of selenium, geckodriver and firefox here - https://travis-ci.org/jnicklas/capybara/jobs/163764567 . All of the failures are caused by currently lacking functionality in the combo of latest selenium, geckodriver, and marionette (No actions API, modal prompt issues, send_keys functionality limitations)

@skintigh

This comment has been minimized.

Show comment
Hide comment
@skintigh

skintigh Oct 4, 2016

Is their a solution to the fact Selenium crashes instead of detecting or catching the version mismatch? Or do you just have to live with it?

My current solution is I print a note to the user warning them that my software may freeze for a minute and then crash... Try/except does not catch this failure.

skintigh commented Oct 4, 2016

Is their a solution to the fact Selenium crashes instead of detecting or catching the version mismatch? Or do you just have to live with it?

My current solution is I print a note to the user warning them that my software may freeze for a minute and then crash... Try/except does not catch this failure.

@lukeis

This comment has been minimized.

Show comment
Hide comment
@lukeis

lukeis Oct 4, 2016

Member

i wanted to put in a check for the mismatch... but on windows firefox doesn't appear to support a command line switch to quickly get the version information. so... we have no good cross platform way to detect it.

Member

lukeis commented Oct 4, 2016

i wanted to put in a check for the mismatch... but on windows firefox doesn't appear to support a command line switch to quickly get the version information. so... we have no good cross platform way to detect it.

@skintigh

This comment has been minimized.

Show comment
Hide comment
@skintigh

skintigh Oct 4, 2016

Supposedly you can fix it with geckodriver on windows. They don't bother to mention it in the instructions, but you have to rename it wires.exe or nothing works. They also don't bother to mention it, but you have to install the latest selenium, or nothing works.

I tried to update selenium with pip from local files since my work proxy is stupid. Oops I need rdflib. Try to install that. Oops I need htmllib5. Try to install that. Oops I need newer easy_install. Try to install that. Oops I need newer setuptools. Try to install that. Oops I need ez_setup. Try to run that. Oops it needs something but it's a secret. Probably "easy_setup_wicked_ez_much_simple..."

Maybe random crashes are just the price you pay for using selenium.

skintigh commented Oct 4, 2016

Supposedly you can fix it with geckodriver on windows. They don't bother to mention it in the instructions, but you have to rename it wires.exe or nothing works. They also don't bother to mention it, but you have to install the latest selenium, or nothing works.

I tried to update selenium with pip from local files since my work proxy is stupid. Oops I need rdflib. Try to install that. Oops I need htmllib5. Try to install that. Oops I need newer easy_install. Try to install that. Oops I need newer setuptools. Try to install that. Oops I need ez_setup. Try to run that. Oops it needs something but it's a secret. Probably "easy_setup_wicked_ez_much_simple..."

Maybe random crashes are just the price you pay for using selenium.

@andreicristianpetcu

This comment has been minimized.

Show comment
Hide comment
@andreicristianpetcu

andreicristianpetcu commented Oct 12, 2016

This is the Mozilla Bguzilla issue tracking the migration to Marionette.

@jschwartzenberg

This comment has been minimized.

Show comment
Hide comment
@jschwartzenberg

jschwartzenberg Jun 8, 2017

There is a special Mozilla Firefox Developer Edition now. This edition allows running unsigned extensions and works fine with the classic Selenium Firefox driver. Even the Selenium RC runner works without problems in the latest version of this Firefox version (54).

You can find it here: https://www.mozilla.org/en-US/firefox/developer/

jschwartzenberg commented Jun 8, 2017

There is a special Mozilla Firefox Developer Edition now. This edition allows running unsigned extensions and works fine with the classic Selenium Firefox driver. Even the Selenium RC runner works without problems in the latest version of this Firefox version (54).

You can find it here: https://www.mozilla.org/en-US/firefox/developer/

@andreicristianpetcu

This comment has been minimized.

Show comment
Hide comment
@andreicristianpetcu

andreicristianpetcu Jun 8, 2017

The problem never was addon signing. I signed a ton of addions, even WebDriver. The problem is that Selenium devs do not want to invest time in Firefox. I really am sorry they do not have time to work on this :(

andreicristianpetcu commented Jun 8, 2017

The problem never was addon signing. I signed a ton of addions, even WebDriver. The problem is that Selenium devs do not want to invest time in Firefox. I really am sorry they do not have time to work on this :(

@jschwartzenberg

This comment has been minimized.

Show comment
Hide comment
@jschwartzenberg

jschwartzenberg Jun 16, 2017

Note that there are some version dependencies when using the same Firefox installation also with the new Gecko driver. The classic driver should work with any version that doesn't check for a Mozilla signature, but a newer version of Firefox will require newer version of the Gecko driver as well. This is especially true with the Firefox Developer versions. Newer versions of the Gecko driver also require a newer Selenium version.

I've created a repository for RHEL/CentOS 7 builds of Firefox 52 ESR without the Mozilla signature checking:
https://copr.fedorainfracloud.org/coprs/jschwart/firefox-allext/

This build has been verified to work with:
Selenium RC (2.53)
Classic driver (3.0, 3.4)
Gecko driver, 0.14.0 (which will work with at least Selenium 3.0) and also with 0.16.1 (which will work with Selenium 3.4)

I expect that this build is compatible with pretty much any Selenium driver/version combination.

jschwartzenberg commented Jun 16, 2017

Note that there are some version dependencies when using the same Firefox installation also with the new Gecko driver. The classic driver should work with any version that doesn't check for a Mozilla signature, but a newer version of Firefox will require newer version of the Gecko driver as well. This is especially true with the Firefox Developer versions. Newer versions of the Gecko driver also require a newer Selenium version.

I've created a repository for RHEL/CentOS 7 builds of Firefox 52 ESR without the Mozilla signature checking:
https://copr.fedorainfracloud.org/coprs/jschwart/firefox-allext/

This build has been verified to work with:
Selenium RC (2.53)
Classic driver (3.0, 3.4)
Gecko driver, 0.14.0 (which will work with at least Selenium 3.0) and also with 0.16.1 (which will work with Selenium 3.4)

I expect that this build is compatible with pretty much any Selenium driver/version combination.

@andreicristianpetcu

This comment has been minimized.

Show comment
Hide comment
@andreicristianpetcu

andreicristianpetcu Jun 16, 2017

@jschwartzenberg do you think you can set a specific version of WebDriver instead of the one by default? Can you set the path to it somehow. I tried but Selenium always sets a brand new profile with a new webdriver. I want to trick Selenium into using my signed WebDriver instead of the unsigned one.

andreicristianpetcu commented Jun 16, 2017

@jschwartzenberg do you think you can set a specific version of WebDriver instead of the one by default? Can you set the path to it somehow. I tried but Selenium always sets a brand new profile with a new webdriver. I want to trick Selenium into using my signed WebDriver instead of the unsigned one.

@jschwartzenberg

This comment has been minimized.

Show comment
Hide comment
@jschwartzenberg

jschwartzenberg Jun 16, 2017

@andreicristianpetcu I've looked into overriding the Firefox extension initially. There is an option to specify a Firefox profile which Selenium then uses as a template for its new profile. I don't know what would happen if you put your signed extension into this template profile. Another option would be to rebuild the Selenium package.
Is there a specific reason you have to run your tests against a general release build of Firefox?

jschwartzenberg commented Jun 16, 2017

@andreicristianpetcu I've looked into overriding the Firefox extension initially. There is an option to specify a Firefox profile which Selenium then uses as a template for its new profile. I don't know what would happen if you put your signed extension into this template profile. Another option would be to rebuild the Selenium package.
Is there a specific reason you have to run your tests against a general release build of Firefox?

@andreicristianpetcu

This comment has been minimized.

Show comment
Hide comment
@andreicristianpetcu

andreicristianpetcu Aug 18, 2017

We tried to give Firefox+GeckoDriver another chance since a lot of stuff landed in Firefox recently and now we run our Protractor tests with Firefox 55 in headless mode. No extension. Pretty sweet!

I would advice anybody following this ticket who still runs an old Firefox version with WebDriver or stopped running tests against Firefox at all to try again. Especially since headless mode landed!

You can either set the MOZ_HEADLESS=1 or run with the --headless parameter. I think v55 only works on GNU/Linux in headless mode but so does our Jenkins :)

andreicristianpetcu commented Aug 18, 2017

We tried to give Firefox+GeckoDriver another chance since a lot of stuff landed in Firefox recently and now we run our Protractor tests with Firefox 55 in headless mode. No extension. Pretty sweet!

I would advice anybody following this ticket who still runs an old Firefox version with WebDriver or stopped running tests against Firefox at all to try again. Especially since headless mode landed!

You can either set the MOZ_HEADLESS=1 or run with the --headless parameter. I think v55 only works on GNU/Linux in headless mode but so does our Jenkins :)

@Juniorn1003

This comment has been minimized.

Show comment
Hide comment
@Juniorn1003

Juniorn1003 Jan 20, 2018

This error still occurs to me, even though I am at the newest version of geckodriver and selenium. Is there no other way than downgrading?

Juniorn1003 commented Jan 20, 2018

This error still occurs to me, even though I am at the newest version of geckodriver and selenium. Is there no other way than downgrading?

@luke-hill

This comment has been minimized.

Show comment
Hide comment
@luke-hill

luke-hill Jan 22, 2018

Contributor

☝️ Could you perhaps open a new ticket. As this one is over a year old. Try to avoid commenting on old posts, and instead link to them (In Github if you type # then the issue number it should link to it)

Contributor

luke-hill commented Jan 22, 2018

☝️ Could you perhaps open a new ticket. As this one is over a year old. Try to avoid commenting on old posts, and instead link to them (In Github if you type # then the issue number it should link to it)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment