1

When trying to run e2e tests in a new Angular application created today:

Error: SessionNotCreatedError: session not created: This version of ChromeDriver only supports Chrome version 90

chromedriver=90.0.4430.24 appears to be requiring Google Chrome V90.

Unfortunately, this version of Google Chrome is still in beta.

Anyone know any way to resolve this?

  • install a different version of chromedriver, one that matches your current version of Chrome – JD2775 Apr 13 '21 at 18:48

2 Answers2

0

what you actually need to do is to match a version of your local chrome to the version of chromedriver (the driver is the layer that controls your browser, so it's important to make them correspond to each other). So

First, find out what your version of chrome is. For example, it is 86.0.4240.111

Then, find out what chromedriver version can be used. Take the major version of the browser (first 3 numbers, 86.0.4240 in this case) and find the corresponding version of the driver by going to this url https://chromedriver.storage.googleapis.com/LATEST_RELEASE_${CHROME_VERSION} (put the major browser version instead of ${CHROME_VERSION}). You'll see the chromedriver you're looking for is 86.0.4240.22

This is where the trickiest part begins. There are 2 installation of protractor usually:

  • local
  • global

I won't go over how to find which one you use, you can look it up. But when you find it, make sure you're updating the right one

When you know which protractor you're updating, go to it's folder and from that folder run npm i webdriver-manager@latest and then node ./bin/webdriver-manager update --gecko=false

when you updated the right webdriver, install the right chromedriver like so

node ./bin/webdriver-manager update --gecko=false --versions.chrome $VERSION

Make sure to put 86.0.4240.22 instead of $VERSION

  • Thanks for the info. This is a workaround. I don't want to mess around with my node-modules folder and should not have to. I should be able to use the latest version of the selenium driver and the latest version of Chrome. A released selenium driver should not require a beta version of the browser. I am using the latest released Chrome which is 89, and the latest selenium which is 90. I am using everything locally (i.e.) node-modules. – Devin Ellingson Apr 13 '21 at 22:56
  • this is not a worksaround. This is what people do. Yes, coincidentally the layer that connects protractor to the browser (chromedriver) sits under node_modules. If you want to change it you have modify it from there. Another option is to start a local selenium server and specify a custom path to any chromedriver – Sergey Pleshakov Apr 14 '21 at 16:12
  • Note, what was suggested in the comment to your question, this answer and another answer suggest you to do the same thing for a reason. I second that recommendation – Sergey Pleshakov Apr 14 '21 at 16:14
0

UPDATE (4/14)

This should be resolved now for protractor. See this thread in the angular/webdriver-manager repo: https://github.com/angular/webdriver-manager/issues/491.

TL;DR

There is an endpoint to say which version of chromedriver is latest (https://chromedriver.storage.googleapis.com/LATEST_RELEASE) . All webdriver-manager does is check the version using this endpoint and installs it (unless you provide a specific version). The endpoint was returning version 90.* as of this morning (4/14), but chrome never released version 90, so there was a mismatch. Whoever manages that api reverted it to 89, so webdriver-manager should now install a compatible version of chromedriver.

Original answer

This happened last summer too. I have a workaround to get it working again, but it's really a temporary workaround that should be removed once 90 is actually promoted to stable.

Here is the original workaround post: https://stackoverflow.com/a/63077623/3400143

And here are the steps for reference:

  1. We have webdriver-manager installed as project dependency (npm install --save-dev webdriver-manager)

  2. we call webdriver-manager update --versions.chrome 89.0.4389.23 prior to running our tests. This will install the 89 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_89.0.4389.23.exe"

Protractor still installs chromedriver 90, but it will use the 89 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"
Tyler Nielsen
  • 605
  • 1
  • 7
  • 21