Skip to content
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

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

Open
jmbaravykas opened this issue Jul 24, 2020 · 22 comments

Comments

@jmbaravykas
Copy link

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)
@Fuun347
Copy link

Fuun347 commented Jul 24, 2020

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.

@herrld
Copy link

herrld commented Jul 24, 2020

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.

@Fuun347
Copy link

Fuun347 commented Jul 24, 2020

@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

@herrld
Copy link

herrld commented Jul 24, 2020

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

@Fuun347
Copy link

Fuun347 commented Jul 24, 2020

In what way are you launching your selenium server?

@herrld
Copy link

herrld commented Jul 24, 2020

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

@Fuun347
Copy link

Fuun347 commented Jul 24, 2020

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

@herrld
Copy link

herrld commented Jul 24, 2020

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

@Fuun347
Copy link

Fuun347 commented Jul 24, 2020

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.

@TylerNielsen
Copy link

There is discussion in webdriver-manager issue 376 related to this: angular/webdriver-manager#376.

@Fuun347
Copy link

Fuun347 commented Jul 24, 2020

@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

@sergiybuch
Copy link

webdriver-manager start --versions.chrome=84.0.4147.30

Appreciate that! it works - you saved my day!

@sooraj19
Copy link

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

@m4m4m4
Copy link

m4m4m4 commented Aug 27, 2020

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
Copy link

m4m4m4 commented Aug 27, 2020

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

@sooraj19
Copy link

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?

@Fuun347
Copy link

Fuun347 commented Aug 27, 2020

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.

@meroware
Copy link

meroware commented Aug 30, 2020

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.

@jeroenheijmans
Copy link

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?

@ambicaagarwal
Copy link

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.

@gizm0bill
Copy link

gizm0bill commented Dec 14, 2020

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?

@noranuko13
Copy link

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

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

No branches or pull requests