Fix: “This version of ChromeDriver only supports Chrome version 102” Error

I was using VS code and Anaconda3, and trying to install the “ChromeDriver_Binary” library, I got the below error:

selenium.common.exceptions.SessionNotCreatedException: Message: session not created: 
This version of ChromeDriver only supports Chrome version 102
Current browser version is 100.0.4896.127 with binary path C:\Program Files (x86)\Google\Chrome\Application\chrome.exe

In this article, we will explain how you can fix the error “This version of ChromeDriver only supports Chrome version 102 step by step.

Why “This version of ChromeDriver only supports Chrome version 102” Error Occurred?

“This version of ChromeDriver only supports Chrome version 102” Error is seen because of incompatibility issue between ChromeDriver_binary library and Chrome/Chromium version you are using right now.

How to Fix “This version of ChromeDriver only supports Chrome version 102” Error?

There are multiple methods to fix the error “This version of ChromeDriver only supports Chrome version 102”, below are the the all ways to fix the error:

Solution 1: Use ChromeDriver Auto-Installer

If you try to use the ChromeDriver Auto-Installer, it would automatically download and install the supported ChromeDriver version that is compatible with Chrome version.

Below is the link for ChromeDriver Auto-Installer:

https://github.com/yeongbin-jo/python-chromedriver-autoinstaller

Use the below command for ChromeDriver Auto-Installer:

pip install chromedriver-autoinstaller

Example:

Below is the example how to use ChromeDriver Auto-Installer:

from selenium import webdriver
import chromedriver_autoinstaller


chromedriver_autoinstaller.install()  # Check if the current version of chromedriver exists
                                      # and if it doesn't exist, download it automatically,
                                      # then add chromedriver to path

Solution 2: Use “ChromeDriver-binary-auto” Installer

Second method to fix the error is to use the chromedriver-binary-auto installer, it would help to detect the required latest chromedriver version for installed Chrome/Chromium browser.

Use below code for installing Chromedriver-Binary-auto Installer:

pip install chromedriver-binary

Conclusion

“This version of ChromeDriver only supports Chrome version 102” Error is seen because of version compatibility issue between used chromedriver library and Chrome/Chromium version.

To fix the issue, either use ChromeDriver Auto-Installer, that would autiomatically detect the chrome version and download/install the supported chromedriver version.

Second solution is to use the “ChromeDriver-binary-auto” Installer, it would help to detect the chromedriver version required for installed Chrome/Chromium version.