3

I'm trying to run "ng e2e" command with octopus with following configuration but getting below error all the time:

[07:20:37] E/launcher - session not created: This version of ChromeDriver only supports Chrome version 79
  (Driver info: chromedriver=79.0.3945.16 (93fcc21110c10dbbd49bbff8f472335360e31d05-refs/branch-heads/3945@{#262}),platform=Windows NT 10.0.14393 x86_64)
[07:20:37] E/launcher - SessionNotCreatedError: session not created: This version of ChromeDriver only supports Chrome version 79
  (Driver info: chromedriver=79.0.3945.16 (93fcc21110c10dbbd49bbff8f472335360e31d05-refs/branch-heads/3945@{#262}),platform=Windows NT 10.0.14393 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)
[07:20:37] E/launcher - Process exited with error code 199
An unexpected error occurred: undefined
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! rebar-spa-v2-template@0.0.3 e2e: `ng e2e`

Configuration is:

  • user-agent = "npm/6.12.1 node/v12.13.1 win32 x64"

Protractor.conf.js:

capabilities: {
    'browserName': 'chrome',
    chromeOptions: {
      args: ['--headless', '--disable-gpu', '--window-size=800,600']
    }
  },

Package.json: tried with both of solution

postinstall: webdriver-manager update --versions.chrome 79.0.3945.36

or

postinstall: cd ./node_modules/protractor && npm i webdriver-manager@latest

Any help will be appreciated.

undetected Selenium
  • 183,867
  • 41
  • 278
  • 352
Arun Singh
  • 263
  • 8
  • 19

3 Answers3

2

This error message...

session not created: This version of ChromeDriver only supports Chrome version 79 (Driver info: chromedriver=79.0.3945.16 (93fcc21110c10dbbd49bbff8f472335360e31d05-refs/branch-heads/3945@{#262}),platform=Windows NT 10.0.14393 x86_64)

...implies that the ChromeDriver was unable to initiate/spawn a new Browsing Context i.e. Chrome Browser session.

Your main issue is the incompatibility between the version of the binaries you are using as follows:

Supports Chrome v79

  • Presumably you are using a Chrome with a version other then chrome= 79.0
  • Possibly the following command fails:

    webdriver-manager update --versions.chrome 79.0.3945.36
    

So there is a clear mismatch between the ChromeDriver v79.0 and your current Chrome Browser


Solution

Ensure the following mentioned steps will solve the issue:

  • You may need to clean up once:

    webdriver-manager clean
    
  • You have the latest version of and you can install the same using the command:

    webdriver-manager@latest --save
    
  • Execute the following command will solve your issue:

    webdriver-manager update
    
  • Upgrade Chrome to the latest stable release:

    webdriver-manager update --versions.chrome 79.0.3945.88
    
undetected Selenium
  • 183,867
  • 41
  • 278
  • 352
  • Above solution is working fine on localhost but with octopus is not working – Arun Singh Dec 27 '19 at 05:17
  • I have used above steps like below but still not working; It seems webdriver-manager not updating anyhow. "scripts": { "postinstall": "webdriver-manager clean && npm install webdriver-manager@latest && webdriver-manager update && webdriver-manager update --versions.chrome 79.0.3945.88" }, – Arun Singh Dec 27 '19 at 11:04
  • Try using an older version of chrome `--chrome --versions.chrome=78.0.3904.97` – Sankalan Parajuli Dec 30 '19 at 06:05
0

I got this message when my system downloaded Chrome 90 in the background, even though my browser still said 89 (to be fair it was prompting me to update). I tried a few things but in the end I just ran npm uninstall chromedriver and then npm install chromedriver and everything started working again. Not ideal but I'm happy my tests are able to run.

EDIT:

I noticed that running the above commands updated my package.json file so it now said "chromedriver": "^90.0.0" in it. I'm guessing I could have made that version change myself and run npm install chromedriver to download the updated driver file. I'll try that next time.

Trev14
  • 3,626
  • 2
  • 31
  • 40
0

The reason for me was that chromedriver was installed globally. Need just do npm i chromedriver -g