Daniel Habenicht
Daniel Habenicht

Reputation: 2243

How to make protractor run with puppeteer and chrome 78?

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 created: This version of ChromeDriver only supports Chrome version 78 Errors.

Although the installed versions of puppeteer (1.20.0 -> Chromium 78.0.3882.0) and webdriver-manager are matching.

Any ideas on how to solve this? For more information from the build you can see the CI log here and the project here

Upvotes: 3

Views: 1806

Answers (2)

Olof Nord
Olof Nord

Reputation: 264

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

Upvotes: 3

tehbeardedone
tehbeardedone

Reputation: 2858

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 [email protected] installed.

> cd node_modules\protractor
> npm i webdriver-manager@latest

Upvotes: 2

Related Questions