Could not start a new session. Response code 500. Message: session not created: This version of ChromeDriver only supports Chrome version 114
Asked Answered
E

9

8

OS : Windows server

Language : Java

Chrome version : 116.0.5845.97

Chrome driver version : 116.0.5845.96

OUTPUT :

SLF4J: No SLF4J providers were found.
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See https://www.slf4j.org/codes.html#noProviders for further details.
Starting ChromeDriver 114.0.5735.90 (386bc09e8f4f2e025eddae123f36f6263096ae49-refs/branch-heads/5735@{#1052}) on port 10267
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
ChromeDriver was started successfully.
FAILED CONFIGURATION: @BeforeMethod StartDriver
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 116.0.5845.97 with binary path C:\Program Files\Google\Chrome\Application\chrome.exe 
Host info: host: 'WSAMZN-5U0L0QME', ip: '10.40.2.21'
Build info: version: '4.8.2', revision: '826dbfc730'
System info: os.name: 'Windows Server 2019', os.arch: 'amd64', os.version: '10.0', java.version: '17.0.2'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Command: [null, newSession {capabilities=[Capabilities {acceptInsecureCerts: true, browserName: chrome, goog:chromeOptions: {args: [--disable-notifications, ----disable-gpu, --disable-blink-features, --disable-blink-features=Au..., enable-automation, --no-sandbox, --disable-setuid-sandbox, --disable-infobars, --disable-dev-shm-usage, --disable-browser-side-navi..., --force-device-scale-factor=1, --remote-allow-origins=*, start-maximized, --safebrowsing-disable-down..., safebrowsing-disable-extens...], extensions: [], prefs: {download.default_directory: D:\SeleniumWebdriver\backlo..., download.extensions_to_open: application/exe, download.prompt_for_download: false, safebrowsing.enabled: true}}, pageLoadStrategy: none, unhandledPromptBehavior: accept}], desiredCapabilities=Capabilities {acceptInsecureCerts: true, browserName: chrome, goog:chromeOptions: {args: [--disable-notifications, ----disable-gpu, --disable-blink-features, --disable-blink-features=Au..., enable-automation, --no-sandbox, --disable-setuid-sandbox, --disable-infobars, --disable-dev-shm-usage, --disable-browser-side-navi..., --force-device-scale-factor=1, --remote-allow-origins=*, start-maximized, --safebrowsing-disable-down..., safebrowsing-disable-extens...], extensions: [], prefs: {download.default_directory: D:\SeleniumWebdriver\backlo..., download.extensions_to_open: application/exe, download.prompt_for_download: false, safebrowsing.enabled: true}}, pageLoadStrategy: none, unhandledPromptBehavior: accept}}]
    at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:148)
    at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:106)
    at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:67)
    at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:165)
    at org.openqa.selenium.remote.service.DriverCommandExecutor.invokeExecute(DriverCommandExecutor.java:183)
    at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:158)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:543)
    at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:229)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:157)
    at org.openqa.selenium.chromium.ChromiumDriver.<init>(ChromiumDriver.java:101)
    at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:88)
    at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:84)
    at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:73)
    at com.cgw.resources.Base.StartDriver(Base.java:151)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:568)
    at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:133)
    at org.testng.internal.MethodInvocationHelper.invokeMethodConsideringTimeout(MethodInvocationHelper.java:62)
    at org.testng.internal.ConfigInvoker.invokeConfigurationMethod(ConfigInvoker.java:385)
    at org.testng.internal.ConfigInvoker.invokeConfigurations(ConfigInvoker.java:321)
    at org.testng.internal.TestInvoker.runConfigMethods(TestInvoker.java:700)
    at org.testng.internal.TestInvoker.invokeMethod(TestInvoker.java:527)
    at org.testng.internal.TestInvoker.invokeTestMethod(TestInvoker.java:173)
    at org.testng.internal.MethodRunner.runInSequence(MethodRunner.java:46)
    at org.testng.internal.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:824)
    at org.testng.internal.TestInvoker.invokeTestMethods(TestInvoker.java:146)
    at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
    at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:128)
    at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
    at org.testng.TestRunner.privateRun(TestRunner.java:794)
    at org.testng.TestRunner.run(TestRunner.java:596)
    at org.testng.SuiteRunner.runTest(SuiteRunner.java:377)
    at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:371)
    at org.testng.SuiteRunner.privateRun(SuiteRunner.java:332)
    at org.testng.SuiteRunner.run(SuiteRunner.java:276)
    at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:53)
    at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:96)
    at org.testng.TestNG.runSuitesSequentially(TestNG.java:1212)
    at org.testng.TestNG.runSuitesLocally(TestNG.java:1134)
    at org.testng.TestNG.runSuites(TestNG.java:1063)
    at org.testng.TestNG.run(TestNG.java:1031)
    at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:115)
    at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:251)
    at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:77)
Elise answered 16/8, 2023 at 8:0 Comment(2)
Are you sure chrome driver is version 116? Because logs state it's 114 - Starting ChromeDriver 114.0.5735.90. Maybe the property for the driver file points to the wrong place?Kibitzer
This is the issue regarding the ew CfT endpoint for new Chromedriver releases that also affected WebDriverManager - see answer here: https://mcmap.net/q/67580/-webdrivermanager-causing-mismatch-chromedriver-for-chrome-browser-version-116-0-5845-111-selenium-version-3-141-59Peroxidase
C
6

Issue: You are using the version of selenium(4.8.2) which doesn't support latest browser.

Solution: Upgrade to the latest version of selenium(4.11.0 for JAVA and 4.11.2 for PYTHON) which supports this browser version.

Caterwaul answered 16/8, 2023 at 9:54 Comment(1)
This worked. Also, don't forget to download the version of chromedriver compatible with your Chrome version.Cortes
W
6

Worked for me by using the latest versions

used the latest version of selenium

<dependency>
        <groupId>org.seleniumhq.selenium</groupId>
        <artifactId>selenium-java</artifactId>
        <version>4.11.0</version>
</dependency>

used the latest version of webdriver manager

<dependency>
        <groupId>io.github.bonigarcia</groupId>
        <artifactId>webdrivermanager</artifactId>
        <version>5.4.1</version>
        <scope>test</scope>
</dependency>

https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-java https://github.com/bonigarcia/webdrivermanager

Wonderment answered 18/8, 2023 at 18:59 Comment(0)
A
5

If you don't want to update the pom file, do the following. Add the following 2 lines of code before initializing chrome:

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

It will delete all previously downloaded chromedriver files + cache.

  • When error: enter image description here

  • After clean enter image description here

Alforja answered 19/12, 2023 at 4:36 Comment(1)
This indeed helped, thanks!Precious
O
2

there are a new end point to download it, that is the reason that bonigarcia lib can't download the last driver version. you can check it in the oficial page:

new page: https://googlechromelabs.github.io/chrome-for-testing/

oficial page: https://chromedriver.chromium.org/downloads

enter image description here Current Releases If you are using Chrome version 115 or newer, please consult the Chrome for Testing availability dashboard. This page provides convenient JSON endpoints for specific ChromeDriver version downloading.

Oneself answered 23/8, 2023 at 22:29 Comment(0)
C
0

These are common problems faced by all software qa company when the chrome browser is updated. we need to update chromedriver.exe w.r.t the chrome browser version(version: 115 or latest).

From the logs we are able to observe chrome driver version is not updated:

Starting ChromeDriver: 114.0.5735.90

Current browser version: 116.0.5845.97

Note: If you have already updated chrome driver and facing the same issue, then check for chromedriver.exe threads in Task manager and kill them. or execute the following command in command prompt to close all chromedriver.exe threads and build the application. "taskkill /F /IM ChromeDriver.exe /T"

Cyclonite answered 17/8, 2023 at 6:10 Comment(0)
S
0

Upgrade the Selenium version to latest and Selenium Manager

Stratum answered 18/8, 2023 at 16:14 Comment(1)
Pardon me, but I don't see how your "answer" adds anything that is not already stated in the other answers.Litterbug
R
0

update this in POM

https://mvnrepository.com/artifact/io.github.bonigarcia/webdrivermanager

5.4.1

update this version

Rollie answered 21/8, 2023 at 6:56 Comment(0)
R
0

For me its work when i tried updating the version of selenium and webdriver which are latest version of selenium

 <dependency>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium-java</artifactId>
            <version>4.11.0</version>
    </dependency>

latest version of webdriver manager

<dependency>
        <groupId>io.github.bonigarcia</groupId>
        <artifactId>webdrivermanager</artifactId>
        <version>5.4.1</version>
        <scope>test</scope>
</dependency>

Also make the file in the src\test\java if they are not there .

Rossman answered 22/8, 2023 at 8:15 Comment(0)
G
0

if you are using selenide library also update it to the latest version 6.17.1

Godrich answered 22/8, 2023 at 20:36 Comment(1)
Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.Steal

© 2022 - 2024 — McMap. All rights reserved.