Reputation: 273
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! [email protected] e2e: `ng e2e`
Configuration is:
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.
Upvotes: 3
Views: 4065
Reputation: 76
The reason for me was that chromedriver was installed globally. Need just do npm i chromedriver -g
Upvotes: 0
Reputation: 4116
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.
Upvotes: 0
Reputation: 193108
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
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
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 webdriver-manager 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
Upvotes: 2