protractor icon indicating copy to clipboard operation
protractor copied to clipboard

Protractor 7.0.0 only supports chrome verison 85, while chrome version is 85 (error)

Open jmbaravykas opened this issue 5 years ago • 22 comments

Good day,

as of 07.24 after some updates to chrome we are getting the the following error

E/launcher - session not created: This version of ChromeDriver only supports Chrome version 85
(Driver info: chromedriver=85.0.4183.38 (9047dbc2c693f044042bbec5c91401c708c7c26a-refs/branch-heads/4183@{#779}),platform=Mac OS X 10.15.5 x86_64)

jmbaravykas avatar Jul 24 '20 10:07 jmbaravykas

This sounds like an issue with the chromedriver version you have. I think you might have gotten chromedriver version 85 which is why you are getting this error. In other words, the chromedriver and Chrome versions do not match. Most likely the chromedriver is version 85 and chrome is version 84.

Easily solution is either upgrade chrome to version 85 or downgrade the chromedriver to version 84. Currently version 85 is still in beta so I'd recommend downgrading to version 84.

Fuun347 avatar Jul 24 '20 11:07 Fuun347

is there away to configure protractor to not download the latest version of chrome driver? I tried removing 85 and it just re downloads it the next time i try to run protractor. The only thing i have found so far suggests i have to track down what version of protractor is only compatible up to version 84 and reinstall protractor to that version.

herrld avatar Jul 24 '20 13:07 herrld

@herrld the best way is to add version arguments to the webdriver-manager update and start commands. Updating and starting your webdriver with these commands will force the version to always be 84: webdriver-manager update --versions.chrome=84.0.4147.30 webdriver-manager start --versions.chrome=84.0.4147.30

Fuun347 avatar Jul 24 '20 13:07 Fuun347

OK so no way to set it in configuration. I will try and see if can force those commands with the tools that we are using. Thank you.

not sure if its feasible but if possible would like to make that a feature request to be able to control target version through protractor configuration

herrld avatar Jul 24 '20 13:07 herrld

In what way are you launching your selenium server?

Fuun347 avatar Jul 24 '20 13:07 Fuun347

through angular cli as an e2e setup using cucumberJS ng e2e --project=e2e-no-serve --specs=./src/service/

herrld avatar Jul 24 '20 13:07 herrld

Running ng e2e --project=e2e-no-serve --specs=./src/service/ --webdriverUpdate=false will stop the angular-cli from trying to update the webdriver. What I mean is that the webdriver will stay at the current version. Source: https://angular.io/cli/e2e

Fuun347 avatar Jul 24 '20 13:07 Fuun347

thank you very much. Was running down the rabbit hole of forcing specific version vs just skipping the update.

herrld avatar Jul 24 '20 14:07 herrld

I assume what webdriver-manager does is it pulls the latest version from here or a similar platform "https://chromedriver.storage.googleapis.com/". According to this the latest version is 85 even though it's still in beta. Seems like somebody has jumped the gun and updated the latest version before it has been released.

Fuun347 avatar Jul 24 '20 14:07 Fuun347

There is discussion in webdriver-manager issue 376 related to this: https://github.com/angular/webdriver-manager/issues/376.

TylerNielsen avatar Jul 24 '20 16:07 TylerNielsen

@sergiybuch try launching webdriver-manager with this command and it should work fine! webdriver-manager start --versions.chrome=84.0.4147.30 Currently you're launching it with webdriver-manager start

Fuun347 avatar Jul 24 '20 18:07 Fuun347

webdriver-manager start --versions.chrome=84.0.4147.30

Appreciate that! it works - you saved my day!

sergiybuch avatar Jul 24 '20 18:07 sergiybuch

While there is a work around for now, is there a fix been worked on?

sooraj19 avatar Aug 26 '20 20:08 sooraj19

How are you supposed to hard code the chrome version in CI environment? Querying the google api for the correct version is already what webdriver-manager is doing, how do you determine what version to use if latest keeps failing?

m4m4m4 avatar Aug 27 '20 07:08 m4m4m4

Oh I see, so the VM installed chrome version needs to match, in our case adding webdriver-manager update --versions.chrome=$(google-chrome --version | cut -d ' ' -f 3) solves this

m4m4m4 avatar Aug 27 '20 10:08 m4m4m4

Please correct me if I am wrong.. this is still a work around to the issue.. When I run npm install webdriver-manager is still downloading the chromedriver_85.0.4183.83.exe. And then when I use the webdriver-manager update --versions.chrome=84.x.xxxx.xx it additionally downloads the driver for v84. Is there a way skip the downloading of version 85 and instead download and use v84?

sooraj19 avatar Aug 27 '20 10:08 sooraj19

This is indeed a workaround until chromedriver v85 comes out. Then this issue will be fixed by itself. The issue comes up because for some reason v85 was labeled as current and latest (https://chromedriver.storage.googleapis.com/). Once v85 comes out officially it will for real become the latest version, thus the issue will disappear.

Edit: v85 has indeed come out of beta, so currently it is the latest version. Did not check before writing the comment.

Fuun347 avatar Aug 27 '20 11:08 Fuun347

In reviewing a stackoverflow question about this, I found that we can continue to keep parity by just getting the version during our build pipelines. It's a bit of a pain but at least it should always be in parity due to it being dynamic at figuring out the versions.

   apt-get install -y google-chrome-stable # Install latest version of chrome
   
   VERSION=`google-chrome --version | egrep -o '[0-9]+.[0-9]+' | head -1` # Get chrome version that we just installed by major and minor 
   
   npm i webdriver-manager@latest -D # Install webdriver manager locally as dev dependency
   
   npm i chromedriver --chromedriver_version=$VERSION -D # Install chrome driver to the version that we got from google chrome installation above

Here is the stack overflow response if curious https://stackoverflow.com/questions/63651059/angular-e2e-tests-failing-in-github-actions-because-of-chrome-vs-chromedriver-ve/63654014#63654014 It deals with fixing this problem during a github actions workflow but the overall snipped just provided above should help keep parity in any environment.

meroware avatar Aug 30 '20 04:08 meroware

I'm the one who asked the question @meroware refers to, and with his help I was able to update the GitHub CI Workflow as follows to fix things:

# See https://github.com/jeroenheijmans/sample-angular-oauth2-oidc-with-auth-guards/issues/57
- name: Update Chrome
  run: sudo apt-get update && sudo apt-get install google-chrome-stable

It's a shame I have to do this, because I would expect with angular, protractor, and webdriver-manager, that they'd

  • possibly be able to notice the right version of ChromeDriver already being available on the build server (if needed with me supplying a variable to the ng e2e command or via the angular.json or protractor.conf.js file)
  • otherwise at least not download the wrong version (85) of Chromedriver when the build server has only Chrome 84 installed

Or perhaps there is some feature flag that would help out?

jeroenheijmans avatar Aug 30 '20 14:08 jeroenheijmans

I am getting this error : E/launcher - session not created: This version of ChromeDriver only supports Chrome version 85 (Driver info: chromedriver=85.0.4183.38

as you suggested above: the best way is to add version arguments to the webdriver-manager update and start commands. Updating and starting your webdriver with these commands will force the version to always be 84: webdriver-manager update --versions.chrome=84.0.4147.30

Where do i add the above code? in conf.js or where do i add it? Please explain in detail.

ambicaagarwal avatar Nov 22 '20 05:11 ambicaagarwal

In jenkins:

./node_modules/protractor/bin/webdriver-manager start --versions.chrome=87.0.4280.88 && ng e2e
....
[10:57:50] I/launcher - Running 1 instances of WebDriver
[10:57:50] I/direct - Using ChromeDriver directly...
[10:57:50] E/launcher - session not created: This version of ChromeDriver only supports Chrome version 87
Current browser version is 89.0.4350.4 with binary path /usr/bin/google-chrome
  (Driver info: chromedriver=87.0.4280.88 (89e2380a3e36c3464b5dd1302349b1382549290d-refs/branch-heads/4280@{#1761}),platform=Linux 4.19.0-6-amd64 x86_64)

how do you do a e2e-no-serve configuration? doesn't protractor need to connect somewhere to an open browser app to do tests?

can someone please help?

gizm0bill avatar Dec 14 '20 11:12 gizm0bill

I apologize for the accidental link. I have the same problem.

noranuko13 avatar Sep 27 '21 14:09 noranuko13