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

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)

About this issue

  • Original URL
  • State: open
  • Created 4 years ago
  • Reactions: 1
  • Comments: 22

Most upvoted comments

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.

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

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?

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

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.

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