Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

session not created: Chrome version must be between 71 and 75 - while running angular e2e in Concourse

While executing e2e test in concourse, I'm getting the below error, where it looks like the chromedriver is not getting updated. While similar problems were discussing about chrome version falling behind, in my case, the chrome stable version is getting downloaded as expected (76.0.3809.100). But the chromedriver version thats getting pulled by protractor's webmanager driver is stuck in 2.46.

I tried to manually update the chromedriver from 2.46 to 76.0.3809.12, but it was still falling back to 2.46 during execution.

#!/bin/bash

set -e -u -x

wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -

sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'

apt-get update && apt-get install -y google-chrome-stable

cd git-platformUI/ui

npm install

npm set progress=false && npm config set depth 0 && npm cache clean --force

$(npm bin)/ng e2e --configuration=$CONFIG

[07:33:13] E/launcher - session not created: Chrome version must be between 71 and 75 (Driver info: chromedriver=2.46.628388 (4a34a70827ac54148e092aafb70504c4ea7ae926),platform=Linux 4.15.0-36-generic x86_64) [07:33:13] E/launcher - SessionNotCreatedError: session not created: Chrome version must be between 71 and 75 (Driver info: chromedriver=2.46.628388 (4a34a70827ac54148e092aafb70504c4ea7ae926),platform=Linux 4.15.0-36-generic x86_64) at Object.checkLegacyResponse (/tmp/build/357f536d/git-platformUI/ui/node_modules/selenium-webdriver/lib/error.js:546:15) at parseHttpResponse (/tmp/build/357f536d/git-platformUI/ui/node_modules/selenium-webdriver/lib/http.js:509:13) at doSend.then.response (/tmp/build/357f536d/git-platformUI/ui/node_modules/selenium-webdriver/lib/http.js:441:30) at at process._tickCallback (internal/process/next_tick.js:188:7) From: Task: WebDriver.createSession() at Function.createSession (/tmp/build/357f536d/git-platformUI/ui/node_modules/selenium-webdriver/lib/webdriver.js:769:24) at Function.createSession (/tmp/build/357f536d/git-platformUI/ui/node_modules/selenium-webdriver/chrome.js:761:15) at Direct.getNewDriver (/tmp/build/357f536d/git-platformUI/ui/node_modules/protractor/built/driverProviders/direct.js:77:33) at Runner.createBrowser (/tmp/build/357f536d/git-platformUI/ui/node_modules/protractor/built/runner.js:195:43) at q.then.then (/tmp/build/357f536d/git-platformUI/ui/node_modules/protractor/built/runner.js:339:29) at _fulfilled (/tmp/build/357f536d/git-platformUI/ui/node_modules/q/q.js:834:54) at self.promiseDispatch.done (/tmp/build/357f536d/git-platformUI/ui/node_modules/q/q.js:863:30) at Promise.promise.promiseDispatch (/tmp/build/357f536d/git-platformUI/ui/node_modules/q/q.js:796:13) at /tmp/build/357f536d/git-platformUI/ui/node_modules/q/q.js:556:49 at runSingle (/tmp/build/357f536d/git-platformUI/ui/node_modules/q/q.js:137:13) [07:33:13] E/launcher - Process exited with error code 199

like image 625
Prasanth Mohan Avatar asked Aug 07 '19 08:08

Prasanth Mohan


3 Answers

Delete your node_modules folder, add the below script to your package.json file and npm install. As posted in the comments above and on GitHub

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

Update: The above script started breaking on me once the latest version started changed to [email protected] so I had to be explicit with the version and set it to 12.1.6:

"postinstall": "cd ./node_modules/protractor && npm i [email protected]",
like image 167
Matthew Harrison Avatar answered Oct 28 '22 19:10

Matthew Harrison


Try the below commands:

npm install [email protected] --save-dev
ng e2e

It will work and download the latest chrome driver chromedriver_78.0.3904.70.zip.

like image 6
Hemin Patel Avatar answered Oct 28 '22 20:10

Hemin Patel


Updated the protractor devDependency to latest (5.4.2) worked for me.

like image 2
pbachman Avatar answered Oct 28 '22 19:10

pbachman