ChromeDriver only supports Chrome version 89

Issue

Using Azure DevOps, somehow the pipeline just stop working and I can’t get the test done when I run ng lint && ng e2e && ng test --watch=false. This it’s working when running local.

[16:43:25] I/launcher - Running 1 instances of WebDriver
[16:43:25] I/direct - Using ChromeDriver directly...
[16:43:27] E/launcher - session not created: This version of ChromeDriver only supports Chrome version 89
Current browser version is 88.0.4298.0 with binary path D:\a\1\s\node_modules\puppeteer\.local-chromium\win64-818858\chrome-win\chrome.exe
  (Driver info: chromedriver=89.0.4389.23 (61b08ee2c50024bab004e48d2b1b083cdbdac579-refs/branch-heads/4389@{#294}),platform=Windows NT 10.0.17763 x86_64)
[16:43:27] E/launcher - SessionNotCreatedError: session not created: This version of ChromeDriver only supports Chrome version 89
Current browser version is 88.0.4298.0 with binary path D:\a\1\s\node_modules\puppeteer\.local-chromium\win64-818858\chrome-win\chrome.exe
  (Driver info: chromedriver=89.0.4389.23 (61b08ee2c50024bab004e48d2b1b083cdbdac579-refs/branch-heads/4389@{#294}),platform=Windows NT 10.0.17763 x86_64)
    at Object.checkLegacyResponse (D:\a\1\s\node_modules\selenium-webdriver\lib\error.js:546:15)
    at parseHttpResponse (D:\a\1\s\node_modules\selenium-webdriver\lib\http.js:509:13)
    at D:\a\1\s\node_modules\selenium-webdriver\lib\http.js:441:30
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
From: Task: WebDriver.createSession()
    at Function.createSession (D:\a\1\s\node_modules\selenium-webdriver\lib\webdriver.js:769:24)
    at Function.createSession (D:\a\1\s\node_modules\selenium-webdriver\chrome.js:761:15)
    at Direct.getNewDriver (D:\a\1\s\node_modules\protractor\built\driverProviders\direct.js:77:33)
    at Runner.createBrowser (D:\a\1\s\node_modules\protractor\built\runner.js:195:43)
    at D:\a\1\s\node_modules\protractor\built\runner.js:339:29
    at _fulfilled (D:\a\1\s\node_modules\protractor\node_modules\q\q.js:834:54)
    at D:\a\1\s\node_modules\protractor\node_modules\q\q.js:863:30
    at Promise.promise.promiseDispatch (D:\a\1\s\node_modules\protractor\node_modules\q\q.js:796:13)
    at D:\a\1\s\node_modules\protractor\node_modules\q\q.js:556:49
    at runSingle (D:\a\1\s\node_modules\protractor\node_modules\q\q.js:137:13)
[16:43:27] E/launcher - Process exited with error code 199
##[error]Cmd.exe exited with code '1'.

This is how I set the pipeline task

puppeteer

cd node_modules/puppeteer
npm install
npm install webdriver-manager@latest
> puppeteer@5.5.0 install D:\a\1\s\node_modules\puppeteer
> node install.js

Chromium is already in D:\a\1\s\node_modules\puppeteer\.local-chromium\win64-818858; skipping download.

> puppeteer@5.5.0 prepare D:\a\1\s\node_modules\puppeteer
> node typescript-if-required.js

added 848 packages from 915 contributors and audited 860 packages in 43.745s

96 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

Finishing: npm install puppeteer

ng test

ng lint && ng e2e && ng test --watch=false

Solution

According the doc: Microsoft Windows Server 2019 Datacenter and Ubuntu 20.04.2 LTS. We find there is only ChromeDriver 88.0.4324.96 on our hosted agent.

So we have two suggestions:

  1. We noticed that the test is working well on your local machine, so we can try to install a self-agent in your local machine and use the new agent to try again.

  2. We can add a bash task and use the below the script to install latest version of the ChromeDriver first.

    npm install chromedriver –chromedriver_cdnurl=https://chromedriver.storage.googleapis.com/89.0.4389.23/chromedriver_win32.zip

enter image description here

Answered By – Felix

Answer Checked By – Jay B. (AngularFixing Admin)

Leave a Reply

Your email address will not be published.