selenium-standalone icon indicating copy to clipboard operation
selenium-standalone copied to clipboard

firefox driver install fails, incorrect path to geckodriver

Open paul-haine opened this issue 10 years ago • 13 comments

After selenium-standalone install

Could not request headers from https://github.com/mozilla/geckodriver/releases/download/v0.10.0/geckodriver-v0.10.0-mac.tar.gz

Correct URL appears to be https://github.com/mozilla/geckodriver/releases/download/v0.10.0/geckodriver-v0.10.0-macos.tar.gz

paul-haine avatar Aug 23 '16 14:08 paul-haine

Yeah to fix that for now, you can change the line number 85 on lib/compute-download-urls.js to platform = 'macos';

Goye avatar Aug 23 '16 14:08 Goye

Relative solution is discussed in https://github.com/vvo/selenium-standalone/issues/205

monolithed avatar Aug 23 '16 16:08 monolithed

+1

qrpike avatar Aug 23 '16 17:08 qrpike

I created a PR #208 with the fix suggested by @Goye

gstroup avatar Aug 23 '16 21:08 gstroup

Just changing the platform value when we construct the download URL may not be the best way. Especially if someone wants to install v0.9.0, then we would run into the reverse problem where geckodriver-v0.9.0-macos.tar.gz is not found.

Don't have an immediate solution, but https://github.com/mozilla/geckodriver/issues/193 is open to hopefully get more consistent naming of the releases.

stephenash avatar Aug 23 '16 22:08 stephenash

Currently the default install is broken. Can we at least get a fix so vanilla selenium-standalone install isn't broken? Perhaps getFirefoxDriverArchitecture could have the version passed in and make a decision based off of that information?

ckedwards avatar Aug 23 '16 22:08 ckedwards

I just published [email protected] that will have the correct url for just the v0.10 driver. Will keep this issue open to track the file name inconsistencies.

stephenash avatar Aug 23 '16 23:08 stephenash

FWIW, I need to use geckodriver v0.9.0 for compatibility reasons (it's the only version I can get to work with nightwatch) so I have to put this super fun hack in my package.json:

"scripts": {
    "fix-geckodriver-version": "if [[ $(node -e \"console.log(process.platform);\") == \"darwin\" ]]; then rm -rf node_modules/selenium-standalone/.selenium/geckodriver/0.10.* && curl -Ls https://github.com/mozilla/geckodriver/releases/download/v0.9.0/geckodriver-v0.9.0-mac.tar.gz | tar -xf - && mv geckodriver node_modules/selenium-standalone/.selenium/geckodriver/0.9.0-x64-geckodriver && echo 'Changed geckodriver version to 0.9.0 for compatibility.'; fi"
}

Maybe that atrocity will be useful to others...

IceCreamYou avatar Sep 07 '16 03:09 IceCreamYou

Legacy fun! We cannot handle every case for very recent projects that move release downloads like geckodriver unfortunately.

vvo avatar Sep 08 '16 08:09 vvo

Geckodriver 0.9.0 is not legacy. It's a supported version of the driver. It's the latest release that works with Selenium 2 according to the release notes (the 0.10.0 release notes say "Only upgrade to this version if you are using Selenium 3 beta releases"), and Selenium 2 is still the supported version of Selenium (and the one installed by default by selenium-standalone).

@vvo If I submit a PR to fix this, will you accept it?

IceCreamYou avatar Sep 08 '16 18:09 IceCreamYou

Yep @IceCreamYou :) submit

vvo avatar Sep 08 '16 19:09 vvo

Done! #217 😀

IceCreamYou avatar Sep 09 '16 03:09 IceCreamYou

now released, GG @IceCreamYou

vvo avatar Sep 09 '16 07:09 vvo