Skip to content

webdriver-manager update downloads an incompatible version of chromedriver #376

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

Closed
arobinson opened this issue Apr 29, 2019 · 37 comments
Closed

Comments

@arobinson
Copy link

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

@macroking
Copy link
Contributor

Update protractor/webdriver-manager to the latest version.

@cnishina
Copy link
Contributor

I'll have a hot fix out in the next few days for this. Latest webdriver-manager does work BUT:

  • It is not the version Protractor 5.4.2 uses. Installing the latest does not work with driverProviders/direct or dirverProviders/local.
  • We have a fix for backward compatibility for webdriver-manager 13 but that would also require releasing a new version of Protractor

@cnishina
Copy link
Contributor

Here is the proposed fix: #377

Neat that my few days estimate is actually 30 minutes.

@cnishina
Copy link
Contributor

With the release of Chrome 74 and webdriver-manager 12.1.2 not supporting this is now an official bug.

@cnishina
Copy link
Contributor

And 12.1.3 has been released! This should resolve the ChromeDriver issue.

How to get it?

  • do a fresh install of your node modules directory (remove node_modules folder and do a npm install)
  • do a forced install npm install -f

@cnishina
Copy link
Contributor

More info on the StackOverflow post: https://stackoverflow.com/questions/55910242/when-using-protractor-5-4-2-webdriver-manager-downloads-2-46-which-is-not-compa/55911176#55911176

@vsravuri
Copy link

vsravuri commented Apr 29, 2019

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

@arobinson
Copy link
Author

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

@cnishina
Copy link
Contributor

Yup I can duplicate this on my machine.... 😞

@scooper91
Copy link

scooper91 commented Apr 30, 2019

@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

@xiaofuh
Copy link

xiaofuh commented Apr 30, 2019

Having the exact same issue. as scooper91.
Is there any workaround to install chrome driver 74.X.xxxxx without using webdriver-manager?

@cnishina cnishina changed the title webdriver-manager does not allow 74.0.3729.6 to download webdriver-manager update downloads an incompatible version of chromedriver Apr 30, 2019
@cnishina
Copy link
Contributor

Proposed fixes for downloading specific versions, starting specific versions, status, and preventing 75 from being downloaded.

#376

@arawinters
Copy link

yup. exact same issue here. latest installs 75, chrome version is 74, trying to do a webdriver-manager update --versions.chrome 74.0.3729.6 results in the issue described above.

@cnishina
Copy link
Contributor

cnishina commented Apr 30, 2019

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

@xiaofuh
Copy link

xiaofuh commented Apr 30, 2019

It worked for me. Thanks

@vsravuri
Copy link

vsravuri commented Apr 30, 2019

@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.

@macroking
Copy link
Contributor

macroking commented Apr 30, 2019

@cnishina I'll spend some time to add tests around this functionality to prevent incidents like this from happening in future.

@cnishina
Copy link
Contributor

@macroking This is the legacy branch that I want to be off of. Problem here is that I already wrote these fixes for the master branch and the reason for the new master branch was to have more testing.

@cnishina
Copy link
Contributor

@jthimmavajjhala
Copy link

@cnishina : Hello, i tried the step you have mentioned and i also see that the chrome version is pointing out to 74xx but when i run this in the docker , i am running into the same issue :
[03:01:38] I/config_source - curl -o/app/angular/node_modules/webdriver-manager/selenium/chrome-response.xml https://chromedriver.storage.googleapis.com/
ℹ 「wdm」: Compiled successfully.
[03:01:40] I/downloader - curl -o/app/angular/node_modules/webdriver-manager/selenium/chromedriver_74.0.3729.6.zip https://chromedriver.storage.googleapis.com/74.0.3729.6/chromedriver_linux64.zip
[03:01:44] I/update - chromedriver: unzipping chromedriver_74.0.3729.6.zip
[03:01:45] I/update - chromedriver: setting permissions to 0755 for /app/angular/node_modules/webdriver-manager/selenium/chromedriver_74.0.3729.6
[03:01:45] I/launcher - Running 1 instances of WebDriver
[03:01:45] I/direct - Using ChromeDriver directly...
[03:01:46] E/launcher - session not created: This version of ChromeDriver only supports Chrome version 74
(Driver info: chromedriver=74.0.3729.6 (255758eccf3d244491b8a1317aa76e1ce10d57e9-refs/branch-heads/3729@{#29}),platform=Linux 4.9.60-linuxkit-aufs x86_64)
[03:01:46] E/launcher - SessionNotCreatedError: session not created: This version of ChromeDriver only supports Chrome version 74
(Driver info: chromedriver=74.0.3729.6 (255758eccf3d244491b8a1317aa76e1ce10d57e9-refs/branch-heads/3729@{#29}),platform=Linux 4.9.60-linuxkit-aufs x86_64)
at Object.checkLegacyResponse (/app/angular/node_modules/selenium-webdriver/lib/error.js:546:15)
at parseHttpResponse (/app/angular/node_modules/selenium-webdriver/lib/http.js:509:13)
at doSend.then.response (/app/angular/node_modules/selenium-webdriver/lib/http.js:441:30)
at process._tickCallback (internal/process/next_tick.js:68:7)
From: Task: WebDriver.createSession()
at Function.createSession (/app/angular/node_modules/selenium-webdriver/lib/webdriver.js:769:24)
at Function.createSession (/app/angular/node_modules/selenium-webdriver/chrome.js:761:15)
at Direct.getNewDriver (/app/angular/node_modules/protractor/built/driverProviders/direct.js:77:33)
at Runner.createBrowser (/app/angular/node_modules/protractor/built/runner.js:195:43)
at q.then.then (/app/angular/node_modules/protractor/built/runner.js:339:29)
at _fulfilled (/app/angular/node_modules/q/q.js:834:54)
at /app/angular/node_modules/q/q.js:863:30
at Promise.promise.promiseDispatch (/app/angular/node_modules/q/q.js:796:13)
at /app/angular/node_modules/q/q.js:556:49
at runSingle (/app/angular/node_modules/q/q.js:137:13)
[03:01:46] E/launcher - Process exited with error code 199
An unexpected error occurred: undefined

@cnishina cnishina self-assigned this May 8, 2019
@cnishina
Copy link
Contributor

cnishina commented May 8, 2019

Wow that's weird. So do you have Chrome 74 and Chromedriver 74? What version of Chrome are you using in this docker file? In my circleci config, I check the chrome version to make sure I know what I'm dealing with. https://github.com/angular/protractor/blob/master/.circleci/config.yml#L13

@cnishina
Copy link
Contributor

@jthimmavajjhala I created an example test https://github.com/cnishina/protractor542-chrome74 with my output from my desktop. This is using direct connect and I was able to create a session. Is this docker file available to review?

@cnishina
Copy link
Contributor

cnishina commented Jun 4, 2019

Closing this issue.

@cnishina cnishina closed this as completed Jun 4, 2019
gregmagolan added a commit to bazel-contrib/rules_nodejs that referenced this issue Jun 25, 2019
* build: fix in check_deps.sh

* feat(builtin): change default node version to 10.16.0

Also update CircleCI image to 10.16.0 as well as the CHROMEDRIVER_VERSION_ARG env. Lock needed updating to get the latest webdriver-manager that can handle the latest chromedriver archives. See angular/webdriver-manager#376.
@VladimirSolovyev
Copy link

VladimirSolovyev commented Oct 23, 2019

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

@sheucm
Copy link

sheucm commented Nov 13, 2019

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

@MaxMex007
Copy link

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.

@lazydeveloper
Copy link

installing all the packages globally including chromdriver and making changes to the config.json file of webdriver worked for me :)

@Suruchi-Garg
Copy link

Suruchi-Garg commented May 26, 2020

WebDrivermanager 4.0.0 not supporting chrome 83. By launching browser through selenium, getting "data:," in url. Please suggest any solution..

@sergiybuch
Copy link

sergiybuch commented Jul 24, 2020

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

@defremovSFX
Copy link

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

@jgomesmv
Copy link

We are also facing the same issue. Chrome is on version 84 (stable version) but protractor uses chromedriver 85 (latest version)

@Thaval
Copy link

Thaval commented Jul 24, 2020

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.

@MayurSinghTaunk
Copy link

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.

Thanks!!! this works for me

@TylerNielsen
Copy link

TylerNielsen commented Jul 24, 2020

The following worked for us:

  1. We have webdriver-manager installed as project dependency.

  2. we call webdriver-manager update --versions.chrome 84.0.4147.30 prior to running our tests. This will install the 84 chromedriver version in ./node_modules/webdriver-manager/selenium/. (We just made this as a npm script in our package.json)

  3. We then update the protractor.conf file to have this line in the root of exports.config: chromeDriver:"./node_modules/webdriver-manager/selenium/chromedriver_84.0.4147.30.exe"**

Protractor still installs chromedriverr 85, but it will use the 84 version.

** In our case, we run our protractor tests in docker, but develop mostly on windows. So I updated the protractor.conf to have this line so that it works in either:
chromeDriver: process.platform === "win32" ? "./node_modules/webdriver-manager/selenium/chromedriver_84.0.4147.30.exe" : "./node_modules/webdriver-manager/selenium/chromedriver_84.0.4147.30"

@TylerNielsen
Copy link

Should this be a new issue thread since this one has already been caused? We don't know if it has the same root cause as the past similar issues.

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

No branches or pull requests