3

I have this issue that comes up every time Chrome releases an update.

Here is the scenario:

  • All browsers are on Chrome 83
  • Chrome announces that Chrome 84 is about to come out, but it is not released yet.
  • ChromeDriver 84 is created and protractor pulls latest version of ChromeDriver which is now 84
  • Error is thrown the ChromeDriver 84 is only supposed to work on Chrome 84 (which is not even released yet).
  • I run webdriver-manager update to download ChromeDriver 83 and set Protractor to use ChromeDriver 83

It is extremely annoying that ChromeDriver 84 is not backwards compatible, has anyone figured out a solution to this scenario?

Kevin Sar
  • 320
  • 1
  • 3
  • 13
  • If your chrome browser not update automatically or it's no update frequently, why you not specify a fix value for chromedriver version when execute `webdriver-manage update --versions.chrome=<>` – yong Jul 27 '20 at 12:54
  • We run our code through pipelines which have multiple agents and some of those agents seem to be on chrome 83 and others are on 84 so there's a mismatch there at all times. I was hoping for a way to automatically specify a version to download and use by detecting which chrome version was installed or something. But also, when a new chrome version gets released I have to go back in and specify a new version again which is not ideal. – Kevin Sar Jul 28 '20 at 17:19

2 Answers2

2

I am dealing with the same issue and it is extremely annoying. I haven't done this solution but I think this solution will be good for you.

https://www.npmjs.com/package/chromedriver

Scroll down to Detect ChromeDriver Version on that page I linked. You can detect the version of ChromeDriver to install based on your local version of Chrome through npmrc or an Environment variable.

AliF50
  • 16,947
  • 1
  • 21
  • 37
  • 1
    An issue I am having is that when my code goes through our azure pipelines, there are multiple agents that it can potentially run on and annoyingly, they seem to have different versions of chrome installed. It looks like someone is having a similar issue to this and left an issue on the project you mentioned, hopefully there will be a fix! https://github.com/giggio/node-chromedriver/issues/256 – Kevin Sar Jul 28 '20 at 17:22
1

Okay so this is my very annoying solution so far if anyone else has this issue...

  1. In my pipelines, I run a powershell script to get the currently installed chrome version...
  2. I then take that chrome version and remove the minor version
  3. I hit this endpoint provided by ChromeDriver https://chromedriver.storage.googleapis.com/LATEST_RELEASE_[chrome version, minus minor version] see this guide: https://chromedriver.chromium.org/downloads/version-selection
  4. I read the contents on this endpoint, which is just a string telling you what chrome driver version you should use.
  5. I take this version and i do a variable replacement in my protractor and package.json file, replacing my webdriver-update call and my protractor chromedriver version config
  6. I run webdriver-manager update --versions.chrome [chrome version i just received from api call]

THAT works, but that is admittedly annoying and if anyone else has a better solution I would still love to hear it.

Kevin Sar
  • 320
  • 1
  • 3
  • 13