bonigarcia/webdrivermanager

Error after upgrading Chrome Browser (122.0.6261.57) and WebDriver manager to 5.7.0

poorvika01mahesh opened this issue Β· 12 comments

I updated my Chrome browser today and also updated the webdrivermanager version in my POM. Now I am getting the below error

org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 500. Message: session not created: This version of ChromeDriver only supports Chrome version 114
Current browser version is 122.0.6261.57 with binary path /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
Host info: host: 'QT-US-MAC0004.lan', ip: '2603:6080:8cf0:4210:0:0:0:1eb3%en0'
Build info: version: '4.18.1', revision: 'b1d3319b48'
System info: os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '14.3', java.version: '19.0.1'
Driver info: org.openqa.selenium.chrome.ChromeDriver

Browser

  • Chrome
    Version
  • 122.0.6261.57

OS

  • macOS Sonoma Version 14.3 (23D56)

Architecture

  • x86_64

Selenium Version

  • 4.18.1

WebDriverManager version

  • 5.7.0
			WebDriverManager.chromedriver().setup();
			@SuppressWarnings("rawtypes")
			ChromeOptions chrome = new ChromeOptions();
			chrome.addArguments("--ignore-certificate-errors");
			chrome.addArguments("--test-type");
			chrome.addArguments("--disable-extensions");
			chrome.addArguments("--disable-infobars");
			chrome.addArguments("--disable-save-password-bubble");
			chrome.addArguments("--disable-gpu");
			chrome.addArguments("--enable-geolocation");
			chrome.addArguments("--start-maximized");
			chrome.addArguments("--disable-notifications");
			chrome.addArguments("--disable-component-update");
			chrome.addArguments("--remote-allow-origins=*");

			// option to prevent crash due to DevToolsActivePort
			chrome.addArguments("--no-sandbox");

			chrome.addArguments("--disable-dev-shm-usage");

			// suppress download pop-up
			chrome.addArguments("--safebrowsing-disable-download-protection");
			chrome.addArguments("--safebrowsing-disable-extension-blacklist");

			DesiredCapabilities capabilities = new DesiredCapabilities();
			capabilities.setCapability(ChromeOptions.CAPABILITY, chrome);
			chrome.merge(capabilities);

			driver = new ChromeDriver(chrome);

Attached the LOG report/TRACE
app.log

ERROR Stack trace

org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 500. Message: session not created: This version of ChromeDriver only supports Chrome version 114
Current browser version is 122.0.6261.69 with binary path /Applications/Google Chrome.app/Contents/MacOS/Google Chrome 
Host info: host: 'QT-US-MAC0004.lan', ip: '2603:6080:8cf0:4210:0:0:0:1eb3%en0'
Build info: version: '4.18.1', revision: 'b1d3319b48'
System info: os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '14.3', java.version: '19.0.1'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Command: [null, newSession {capabilities=[Capabilities {browserName: chrome, goog:chromeOptions: {args: [--ignore-certificate-errors, --test-type, --disable-extensions, --disable-infobars, --disable-save-password-bubble, --disable-gpu, --enable-geolocation, --start-maximized, --disable-notifications, --disable-component-update, --remote-allow-origins=*, --no-sandbox, --disable-dev-shm-usage, --safebrowsing-disable-down..., --safebrowsing-disable-exte...], extensions: []}}]}]
	at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:139)
	at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:95)
	at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:67)
	at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:162)
	at org.openqa.selenium.remote.service.DriverCommandExecutor.invokeExecute(DriverCommandExecutor.java:216)
	at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:174)
	at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:519)
	at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:233)
	at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:162)
	at org.openqa.selenium.chromium.ChromiumDriver.<init>(ChromiumDriver.java:114)
	at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:89)
	at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:84)
	at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:73)

I am also facing issue with chrome browser 122.0.6261.58 version with
webdrivermanager= 5.7.0 and selenium-java=4.18.0 version
Error = ERROR io.github.bonigarcia.wdm.WebDriverManager - There was an error managing chromedriver public (For input string: "public")

Different error issue with

chrome browser 122.0.6261.58 version
webdrivermanager= 5.7.0
selenium-java=4.9.0 version

Error = ERROR io.github.bonigarcia.wdm.WebDriverManager - There was an error managing chromedriver public (For input string: "public")

No driver is downloaded in ~/.cache/selenuim folder.

Latest stable version of chrome driver is 122.0.6261.69 on chrome site.

122.0.6261.57 is not available in the json from the below link. (This was available yesterday and WDM was able to download). I deleted the cached chrome driver (version 122.0.6261.57) today and started getting the same issue.

https://googlechromelabs.github.io/chrome-for-testing/last-known-good-versions-with-downloads.json

looks like new webdriver version is available on google chrome labs but on my machine latest version is not available (although it says it’s at latest version).

Fixed it by clearing cache

Used
WebDriverManager.chromedriver().clearDriverCache().setup();

Clearing cache is not working in my case, the cache folder is still empty.

I have the same issue. clearing cashe isnt worked for me.

I'm having the same issue from version 122.
121 works perfectly.

Apparently the link he is using to look for the chromedriver is this: https://chromedriver.storage.googleapis.com/ (Which only has drivers up to version 114)

In version 121 he used another link:
Maybe it would be this one: https://googlechromelabs.github.io/chrome-for-testing/last-known-good-versions-with-downloads.json

Update

Navigate to the ~/.cache/selenium directory. For Windows, it might be something like C:\Users\YourUsername.cache\selenium.
Remove the contents of the directory or the specific files mentioned (chromedriver and resolution.properties).

Make sure selenium & web-driver dependencies using latest version.

After removing this file run the project again. Worked perfectly.

Not working for me @sandula1999.
The same link error is happening.

I also saw this commit from boni:

ab9c4e8

it was commited last week

Hey, the problem is that on googleapis there is link for latest release and it has been stuck on version 114 (Google didn't update it, you can see it here).

The solution to the problem is to hardcode the driver version you want to pull when you setup the driver, ie :

WebDriverManager wdm = WebDriverManager.chromedriver().driverVersion("122");
wdm.setup();

This will call the correct URL to download the driver for version 122.

I don't like to hardcode things, but it might be the only way to solve this issue as of now.

@dgraca-ceptis did you delete those two files I have mentioned above ? and update selenium to latest version which 4.18.1 and bonigarcia to 5.7.0 ?

webdrivermanager 5.7.0
selenium-java 4.18.1
make sure to clean cache using this. WebDriverManager.chromedriver().clearDriverCache().setup();
my one worked after clean cache.

Using the latest WebDriverManager version (5.7.0 at the time of this writing) and clearing the cache (at least once) should fix this issue:

WebDriverManager.chromedriver().clearDriverCache().setup();

If not, please report your WebDriverManager traces. See: https://bonigarcia.dev/webdrivermanager/#troubleshooting