3

When I run ng e2e I get the following error:

[16:19:47] E/launcher - session not created: This version of ChromeDriver only supports Chrome version 74

(Driver info: chromedriver=74.0.3729.6 (255758eccf3d244491b8a1317aa76e1ce10d57e9-refs/branch-heads/3729@{#29}),platform=Mac OS X 10.14.6 x86_64)

[16:19:47] E/launcher - SessionNotCreatedError: session not created: This version of ChromeDriver only supports Chrome version 74

(Driver info: chromedriver=74.0.3729.6 (255758eccf3d244491b8a1317aa76e1ce10d57e9-refs/branch-heads/3729@{#29}),platform=Mac OS X 10.14.6 x86_64)

The version of Chrome I have installed is "Version 77.0.3865.75 (Official Build) (64-bit)". How can I force the Angular End to End tests to use the latest version of the ChromeDriver that supports the latest version of chrome?

Whatever I try, on running ng e2e it gets the same version

[16:19:22] I/update - chromedriver: file exists app-path/node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_74.0.3729.6.zip

[16:19:22] I/update - chromedriver: unzipping chromedriver_74.0.3729.6.zip

Edit

As a workaround, I can manually upgrade the version of webdriver-manager in the protractor package as per this answer. It's not a long term fix as the change will get wiped out every time I reinstall the node modules.

I don't think this is a duplicate of this question. That question is specifically about R and RSelenium, and the accepted answer is about generic mismatches with Selenium. My question is specifically about Angular. I haven't installed ChromeDriver or webdriver-manager manually and they are not in my package.json file so as far as I'm aware I can't manually select the version.

Can anyone help with solving this issue within an Angular project?

Community
  • 1
  • 1
Geraint Anderson
  • 3,234
  • 4
  • 28
  • 49
  • 1
    @DebanjanB This isn't a duplicate. That question has nothing to do with Angular, and given that all the packages mentioned in that answer are automatically added to the project I can't manually alter the versions as described. – Geraint Anderson Sep 19 '19 at 08:55
  • The error have nothing to do with angular. Plain and straight error _"session not created: This version of ChromeDriver only supports Chrome version 74"_. Did you have a look at the dup target at-least once? – undetected Selenium Sep 19 '19 at 09:24
  • 1
    I disagree, given that it works if I manually modify the node_modules it looks like the problem is contained within the project. I may be wrong on that, but I cannot see how the linked question helps. Given that I didn't install ChromeDriver, how can I "Downgrade ChromeDriver to ChromeDriver v73.0.3683.68 level." – Geraint Anderson Sep 19 '19 at 09:35
  • From Selenium perspective, the linked question points back to the fact that there is a mismatch regarding the version compatibility with the binaries you are using. How to address that would be a angular/framework specific question and have no relation with Selenium per se. – undetected Selenium Sep 19 '19 at 09:38
  • 1
    Agreed, so please re-open my question so someone can actually answer it! The title quite clearly asks 'How' using 'ng', which is the Angular CLI. – Geraint Anderson Sep 19 '19 at 09:40
  • That should be a angular based different question all together. – undetected Selenium Sep 19 '19 at 09:43
  • 1
    Angular command in the title, Angular output in the body, Angular tag. This is an Angular question. – Geraint Anderson Sep 19 '19 at 09:44
  • Your error is from Selenium _"session not created: This version of ChromeDriver only supports Chrome version 74"_ which I have addressed. Feel free to raise a new question as per your new requirement. – undetected Selenium Sep 19 '19 at 09:46
  • It's not a new requirement. I'll quote my title: 'How can I force `ng e2e` to use the latest ChromeDriver'. Have you answered that? No – Geraint Anderson Sep 19 '19 at 09:50
  • It has been answered recently, I remember the approach was to create a command in package.json to update the chromedriver. Look it up. And there is an answer on github – Sergey Pleshakov Sep 19 '19 at 14:00
  • For posterity, e2e now automatically updates web drivers, but it can be suppressed by `--webdriver-update=false`: https://stackoverflow.com/questions/49759537/setup-ng-e2e-in-protractor – Cedric Reichenbach May 21 '20 at 19:35

0 Answers0