Skip to content

Cannot use firefox as browser : unable to obtain browser driver #4397

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

Open
devnewton opened this issue Mar 24, 2025 · 2 comments
Open

Cannot use firefox as browser : unable to obtain browser driver #4397

devnewton opened this issue Mar 24, 2025 · 2 comments
Labels

Comments

@devnewton
Copy link

Description of the bug/issue

When I try to launch test with Firefox, nightwatch.js crash with:

   An error occurred while creating a new GeckoDriver session: [Error] Unable to obtain browser driver.
        For more information on how to install drivers see
        https://www.selenium.dev/documentation/webdriver/troubleshooting/errors/driver_location/. Error: Error executing command for /home/me/dev/mytests/node_modules/selenium-webdriver/bin/linux/selenium-manager with --browser,firefox,--language-binding,javascript,--output,json: Unsuccessful response (404 Not Found) for URL https://ftp.mozilla.org/pub/firefox/releases/136.0.2/linux-x86_64/en-US/firefox-136.0.2.tar.bz2

Steps to reproduce

  1. launch a test with npx nightwatch test.js
  2. see outputs

Sample test

Command to run

Verbose Output


Nightwatch Configuration

Nightwatch.js Version

3.12.1

Node Version

18.14.2

Browser

Firefox 136.0.2

Operating System

Ubuntu 24.04.2

Additional Information

No response

@ShreySinha02
Copy link
Contributor

i think the issue is with the installation of selenium driver try this npm install selenium-webdriver@latest and then install geckodriver npm install geckodriver@latest hope this will solve the problem

@debuglevel
Copy link

debuglevel commented Apr 10, 2025

Firefox changed their tarball from bz2 to xz in 135:

There's nothing wrong with xz, but no idea though why they just change that without providing both formats during a transition period. Some people just seem to love breaking changes.

nightwatch 3.12.1 uses selenium-webdriver 4.27.0 which is too old to handle the new URL.
Selenium fixed it in SeleniumHQ/selenium@3075a7d (by using another hard-coded URL with a version switch..)

So for now, override it like this in your package.json and run npm install

{
  "dependencies": {
    "nightwatch": "3.12.1"
  },
  "overrides": {
    "selenium-webdriver": "4.31.0"
  }
}

@garg3133 garg3133 added the p1 label Apr 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants