I am using Protractor for Angular E2E Tests + Puppeteer for a consistent Chrome Version in all CI-Servers.
Lately I am getting SessionNotCreatedError: session not
This has been an issue for a few months now. There are several threads on their github repo around it. The workaround for me has been to navigate to ~/node_modules/protractor
and manually install webdriver-manager@latest
. You should see webdriver-manager@12.1.7 installed.
> cd node_modules\protractor
> npm i webdriver-manager@latest
I had a similar problem to this, however my issue was with Chrome 81.
E/launcher - session not created: This version of ChromeDriver only supports Chrome version 81
My solution was the below two steps:
1) Dont let Angular install the latest available webdriver for you when running ng e2e
, by using the --webdriverUpdate
flag and setting it to false
.
2) Use the webdriver-manager
from protractor and manually specify which webdriver to use:
node_modules/protractor/bin/webdriver-manager update --versions.chrome=80.0.3987.106 --gecko false --standalone false
3) add this to the "pree2e" step as to be automatically executed before the e2e step:
"pree2e": "node_modules/protractor/bin/webdriver-manager update --versions.chrome=80.0.3987.106 --gecko false --standalone false"
To see which webdrivers are installed, use node_modules/protractor/bin/webdriver-manager status
.
https://github.com/angular/webdriver-manager/blob/legacy/docs/versions.md#download-a-specific-version
https://angular.io/cli/e2e#options
versions used:
"protractor": "5.4.3"
"puppeteer": "2.1.1"
Angular CLI: 9.1.0
Node: 12.2.0
OS: linux x64