webdriver-manager: webdriver-manager update downloads an incompatible version of chromedriver

Now that Chrome 74 is the stable version, our unit tests are no longer working. Looking into the issue, we see that Chrome 74 is out, but webdriver-manager update is downloading 2.46 instead of the correct version of 74.0.3729.6.

Even if we run the command with the correct version, it is failing:

webdriver-manager update --versions.chrome=74.0.3729.6
webdriver-manager: using project version 12.1.2
[11:16:39] E/downloader - undefined
[11:16:39] I/update - chromedriver: file exists /Users/andrew/development/work/client/dev/client-source/node_modules/webdriver-manager/selenium/chromedriver_74.0.3729.6.zip
[11:16:39] I/update - chromedriver: unzipping chromedriver_74.0.3729.6.zip
(node:57948) UnhandledPromiseRejectionWarning: Invalid filename
(node:57948) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)

Opening the node_modules/webdriver-manager/selenium/update-config.json I can see that it is saying 2.46 is the latest instead of 74.0.3729.6

From http://chromedriver.chromium.org/:

Latest stable release: ChromeDriver 74.0.3729.6

This is blocking our ability to test our code. I’d appreciate any work-around if any is known in getting Chrome 74 working with webdriver-manager

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 9
  • Comments: 36 (15 by maintainers)

Commits related to this issue

Most upvoted comments

Update protractor/webdriver-manager to the latest version.

Looks to be working only if the default version is used. We always specify the version as our jenkins machines have a fixed chrome version and therefore we want to specify the webdriver version. This used to work, but now it is reporting errors in the console.

Command that is failing:

webdriver-manager update --versions.chrome=74.0.3729.6

Output

webdriver-manager: using local installed version 12.1.3
[16:15:48] I/config_source - curl -o/Users/andrew/development/work/client/dev/client-source/node_modules/webdriver-manager/selenium/standalone-response.xml https://selenium-release.storage.googleapis.com/
[16:15:48] I/config_source - curl -o/Users/andrew/development/work/client/dev/client-source/node_modules/webdriver-manager/selenium/chrome-response.xml https://chromedriver.storage.googleapis.com/
[16:15:48] I/config_source - curl -o/Users/andrew/development/work/client/dev/client-source/node_modules/webdriver-manager/selenium/gecko-response.json https://api.github.com/repos/mozilla/geckodriver/releases
[16:15:49] E/downloader - undefined
[16:15:49] I/update - chromedriver: file exists /Users/andrew/development/work/client/dev/client-source/node_modules/webdriver-manager/selenium/chromedriver_74.0.3729.6.zip
[16:15:49] I/update - chromedriver: unzipping chromedriver_74.0.3729.6.zip
(node:78021) UnhandledPromiseRejectionWarning: Invalid filename
(node:78021) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:78021) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
[16:15:49] I/downloader - curl -o/Users/andrew/development/work/client/dev/client-source/node_modules/webdriver-manager/selenium/selenium-server-standalone-3.141.59.jar https://selenium-release.storage.googleapis.com/3.141/selenium-server-standalone-3.141.59.jar
[16:15:49] I/downloader - curl -o/Users/andrew/development/work/client/dev/client-source/node_modules/webdriver-manager/selenium/geckodriver-v0.24.0.tar.gz https://github.com/mozilla/geckodriver/releases/download/v0.24.0/geckodriver-v0.24.0-macos.tar.gz
[16:15:51] I/update - geckodriver: unzipping geckodriver-v0.24.0.tar.gz
[16:15:51] I/update - geckodriver: setting permissions to 0755 for /Users/andrew/development/work/client/dev/client-source/node_modules/webdriver-manager/selenium/geckodriver-v0.24.0

Using this command does not report the errors:

webdriver-manager update

For us, stable chrome is still 84, but webriver manager downloads chromedriver 85 …

@cnishina Is there a workaround for this?

We’re installing stable google-chrome from https://dl.google.com/linux/chrome/deb (currently version 74).

> ./node_modules/.bin/webdriver-manager version
12.1.3

> google-chrome --version
Google Chrome 74.0.3729.108

When supplying versions.chrome, update fails with the following:

> ./node_modules/.bin/webdriver-manager update --versions.chrome=$(google-chrome --version | cut -d ' ' -f 3)
[16:32:13] E/downloader - undefined
[16:32:13] I/update - chromedriver: file exists /tests/node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_74.0.3729.108.zip
[16:32:13] I/update - chromedriver: unzipping chromedriver_74.0.3729.108.zip
(node:99) UnhandledPromiseRejectionWarning: Invalid filename
(node:99) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)

When not supplying versions.chrome, it installs chromedriver version 75:

> ./node_modules/.bin/webdriver-manager update
[16:44:54] I/update - chromedriver: file exists /tests/node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_75.0.3770.8.zip
[16:44:54] I/update - chromedriver: unzipping chromedriver_75.0.3770.8.zip
[16:44:54] I/update - chromedriver: setting permissions to 0755 for /tests/node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_75.0.3770.8
[16:44:54] I/update - chromedriver: chromedriver_75.0.3770.8 up to date

When trying to run tests in protractor, we then get the following error:

[chrome #01-14] [15:58:41] I/runnerCli - session not created: This version of ChromeDriver only supports Chrome version 75

This solution works for me.

  1. npm i webdriver-manager@latest
  2. npm i chromedriver --chromedriver_version=LATEST
  3. Reinstall protractor. npm uninstall protractor & npm install --save-dev protractor

For me LATEST downloaded chromedriver 85 and Official release of Chrome is 84…

Tried to update version of chromdriver but it’s still running wrong version

MacBookPro:~ sbuchovskyi_local$ webdriver-manager update --versions.chrome=84.0.4147.89
webdriver-manager: using local installed version 12.1.7
[23:12:18] I/update - chromedriver: file exists /Users/sbuchovskyi_local/node_modules/webdriver-manager/selenium/chromedriver_84.0.4147.89.zip
[23:12:18] I/update - chromedriver: unzipping chromedriver_84.0.4147.89.zip
[23:12:18] I/update - chromedriver: setting permissions to 0755 for /Users/sbuchovskyi_local/node_modules/webdriver-manager/selenium/**chromedriver_84.0.4147.89**
[23:12:18] I/update - chromedriver: chromedriver_84.0.4147.89 up to date
[23:12:18] I/update - selenium standalone: file exists /Users/sbuchovskyi_local/node_modules/webdriver-manager/selenium/selenium-server-standalone-3.141.59.jar
[23:12:18] I/update - selenium standalone: selenium-server-standalone-3.141.59.jar up to date
[23:12:19] I/update - geckodriver: file exists /Users/sbuchovskyi_local/node_modules/webdriver-manager/selenium/geckodriver-v0.26.0.tar.gz
[23:12:19] I/update - geckodriver: unzipping geckodriver-v0.26.0.tar.gz
[23:12:19] I/update - geckodriver: setting permissions to 0755 for /Users/sbuchovskyi_local/node_modules/webdriver-manager/selenium/geckodriver-v0.26.0
[23:12:19] I/update - geckodriver: geckodriver-v0.26.0 up to date
MacBookPro:~ sbuchovskyi_local$ webdriver-manager start
webdriver-manager: using local installed version 12.1.7
[23:12:27] I/start - java -Dwebdriver.gecko.driver=/Users/sbuchovskyi_local/node_modules/webdriver-manager/selenium/geckodriver-v0.26.0 -Dwebdriver.chrome.driver=/Users/sbuchovskyi_local/node_modules/webdriver-manager/selenium/chromedriver_85.0.4183.38 -jar /Users/sbuchovskyi_local/node_modules/webdriver-manager/selenium/selenium-server-standalone-3.141.59.jar -port 4444
[23:12:27] I/start - seleniumProcess.pid: 42569
23:12:27.272 INFO [GridLauncherV3.parse] - Selenium server version: 3.141.59, revision: e82be7d358
23:12:27.340 INFO [GridLauncherV3.lambda$buildLaunchers$3] - Launching a standalone Selenium Server on port 4444
2020-07-23 23:12:27.389:INFO::main: Logging initialized @306ms to org.seleniumhq.jetty9.util.log.StdErrLog
23:12:27.597 INFO [WebDriverServlet.<init>] - Initialising WebDriverServlet
23:12:27.680 INFO [SeleniumServer.boot] - Selenium Server is up and running on port 4444

This issue is back 😦 now it’s happening with Chrome 79.0.3945, on AzureDevops it downloads 79.0.3945.36 but azure only supports 79.0.3945.16 and there’s NO way to force webdriver to use this exact version. it automatically downloads the LATEST on 79.0.3945.XXX and this is breaking my deployment.

I just released 12.1.4. This should fix the issues we are seeing with chromedriver 75 and chrome 74 mismatches. Also you should be able to download --versions.chrome 74.0.3729.6 with 12.1.4. This was broken in 12.1.3.

Could I get some verifiers that 12.1.4 is working for you? @arawinters @xiaofuh @scooper91 @vsravuri @arobinson @macroking

@cnishina

Verified both “webdriver-manager update” & “webdriver-manager update --versions.chrome 74.0.3729.6” with Protractor 5.4.2, ChromeDriver “chromedriver_74.0.3729.6.zip” is downloaded correctly.

Thanks again for fixing this issue.

@cnishina I have Chrome driver v75 problem again. It downloads it by default: image

Same here. How can webdriver use a chrome version that is not even published? Chrome tells me everything is up to date.

Edit: It worked yesterday. Started up the computer this morning and wanted to run the tests again, then the announced problem occured.

Edit2: In case someone is having trouble with ng e2e, protractor and webdriver (chrome). For Angular 9, the following solved the problem for me: Download the webdriver of chrome from https://chromedriver.chromium.org/downloads

Then copy and paste the downloaded driver to your desired destination (in my case, it’s the root of my angular app where protractor.conf.js is, I created a folder called “chromeDrivers” on the root level) and specify the path to the .exe in the protractor.conf.js file like this (notice the path is relative):

exports.config = { chromeDriver: ‘./chromeDrivers/chromedriver_win32_84.0.4147.30/chromedriver.exe’, //rest of config }

Then, back on the cmd, just run ng e2e --webdriverUpdate=false. This will prevent protractor from using webdriver-manager in node_modules and it will use your chromeDriver at the specified path after building your app. If you receive a spawn ENOENT error, you probably didn’t point to the exe but to a folder.

Hope it helps someone, although it’s not directly a webdriver-manager issue.

It worked for me. Thanks

@cnishina Thanks for resolving this issue. Verified 12.1.3 is downloading Chrome 74 with proper Selenium Jar file using Protractor 5.4.2