Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Chrome version must be between 71 and 75 error after updating to ChromeDriver 2.46

After update of chromedriver to version 2.46 my tasts fail to initialize. I got message like this:

Starting ChromeDriver 2.46.628402 (536cd7adbad73a3783fdc2cab92ab2ba7ec361e1) on port 44269
Only local connections are allowed.
Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code.
Failed to invoke configuration method com.personal.CustomTest.initTests not created: Chrome version must be between 71 and 75
  (Driver info: chromedriver=2.46.628402,platform=Windows NT 10.0.16299 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 1.58 seconds
Build info: version: '2.53.1'

It is clearly saying that my browser version is not valid. But I am using Chrome 72.0.3626.119 so it is between 71 and 75. Selenium version is 2.53.1. And I am running test through console command with the help of testNG.

Any idea? Every ideas that I found was about changing selenium version but I cant do it.

like image 408
Suule Avatar asked Mar 01 '19 08:03

Suule


People also ask

How do I fix session not created this version of ChromeDriver only supports Chrome version 80?

Solution 1: Use same ChromeDriver and Chrome Browser Version You need to Use the same ChromeDriver and Chrome Browser Version This Error Only Occurs Cause Of Dirrenece between Your Chrome and Your WebDriver Version Mismatch. Please Make Sure Your ChromeDriver is up to date with ChromeDriver v102 in this version.

Does ChromeDriver need to match Chrome version?

ChromeDriver is only compatible with Chrome version 12.0. 712.0 or newer. If you need to test an older version of Chrome, use Selenium RC and a Selenium-backed WebDriver instance.


3 Answers

For me to resolve this problem :

On Windows

cd C:\Users\[myname]\AppData\Roaming\npm\node_modules\protractor
npm i webdriver-manager@latest
webdriver-manager update
webdriver-manager start &

On Cent-OS (I used Cent-OS 7.4.* and it worked fine.)

cd /usr/lib/node_modules/protractor/
sudo npm i webdriver-manager@latest
sudo webdriver-manager update
sudo webdriver-manager start &

I hope this helps you in any way.

like image 148
jissay Avatar answered Oct 23 '22 13:10

jissay


This error message...

Starting ChromeDriver 2.46.628402 (536cd7adbad73a3783fdc2cab92ab2ba7ec361e1) on port 44269
Only local connections are allowed.
Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code.
Failed to invoke configuration method com.personal.CustomTest.initTests not created: Chrome version must be between 71 and 75

...implies that the ChromeDriver v2.46 is not compatible with the Chrome Browser version which is being accessed by your program/webdriver.

Your main issue is the incompatibility between the version of the binaries you are using as follows:

  • You are using chromedriver=2.46
  • Release Notes of chromedriver=2.46 clearly mentions the following :

Supports Chrome v71-73

  • Though you mentioned you are using Chrome 72.0.3626.119 possibly there are multiple instances of Chrome Browser installed within your system and your program by default is accessing the Chrome Browser whose version is not between v71.x and v75.x

  • You are using chrome=67.0

  • Release Notes of ChromeDriver v2.38 clearly mentions the following :

Supports Chrome v65-67


Solution

  • Keep JDK upgraded to recent levels JDK 8u201.
  • Uninstall all the instances of Chrome Browser (you can opt to use Revo Uninstaller).
  • Upgrade ChromeDriver to current ChromeDriver v2.46 level.
  • Keep Chrome version between Chrome v71-73 levels. (as per ChromeDriver v2.46 release notes)
like image 35
undetected Selenium Avatar answered Oct 23 '22 14:10

undetected Selenium


For me, I had to update my chrome driver in my project to match the version of Chrome on my local machine.

yarn add [email protected] -D

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

like image 1
C_Sutt Avatar answered Oct 23 '22 13:10

C_Sutt