selenium: [π Bug]: Response code 500 SessionNotCreatedException starting with chrome 131.0.6741.0 on windows only
What happened?
Hello, We are running selenium 4 grid (hub + nodes) in a following configuration :
- 1 hub RH9
- 2 nodes RH9
- 2 nodes win server 2022 (datacenter)
- 1 node win server 2016 (datacenter) We are constraint to upgrade every few months all our browsers (chrome and edge). Running tests against chrome 132 and 133 results in failures of 10 to 30% only on windows node machines not on linux ones. So we have tested the same basic test in a row of 250 to 500 times in order to identify the version with issues. The test consists in getting a page on a local website and find an webelement id in that page. Since the error is present on all windows machines the grid was configured for the test with only one node Windows Server 2022. We have starting with version 114 of chrome and going up to version 131. All the tests were executed with the exactly the same version of browser and driver. The first failure happened with the latest version of 131 (131.0.6778.264), so we have drilled down into the minor versions of 131. The first version that failed was 131.0.6741.0 (for both chrome and chromedriver) so we have crosschecked between chrome 131.0.6741.0 and chrome 131.0.6740.0 : chrome 131.0.6741.0 + chromedriver 131.0.6740.0 : ko in the first 20 runs chrome 131.0.6740.0 + chromedriver 131.0.6741.0 : ok for 500 tests in a row So it seems that chrome 131.0.6741.0 is responsible for the issue or maybe selenium is not properly handling the chrome via chromedriver starting with this particular version. Some help will be appreciated to unblock this situation π
How can we reproduce the issue?
The drivers and navigators were downloaded using selenium-manager.exe in command line, like this :
C:\Users\selenium\.cache\selenium\manager\0.4.27>selenium-manager.exe --avoid-stats --browser chrome --browser-version 123
[2025-02-25T08:46:44.431Z INFO ] Driver path: C:\Users\selenium\.cache\selenium\chromedriver\win64\123.0.6312.122\chromedriver.exe
[2025-02-25T08:46:44.435Z INFO ] Browser path: C:\Users\selenium\.cache\selenium\chrome\win64\123.0.6312.122\chrome.exe
Relevant log output
Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 500. Message: Could not start a new session. Could not start a new session. Error while creating session with the driver service. Stopping driver service: Could not start a new session. Response code 500. Message: disconnected: unable to send message to renderer
(failed to check if window was closed: disconnected: not connected to DevTools)
(Session info: chrome=131.0.6778.264)
Host info: host: 'POL01', ip: '10.2.2.240'
Build info: version: '4.29.0', revision: '18ae989'
System info: os.name: 'Windows Server 2022', os.arch: 'amd64', os.version: '10.0', java.version: '17.0.10'
Driver info: driver.version: unknown
Build info: version: '4.29.0', revision: '18ae989'
System info: os.name: 'Windows Server 2022', os.arch: 'amd64', os.version: '10.0', java.version: '17.0.10'
Driver info: driver.version: unknown
Build info: version: '4.29.0', revision: '18ae989'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '5.14.0-503.21.1.el9_5.x86_64', java.version: '17.0.14'
Driver info: driver.version: unknown
Build info: version: '4.29.0', revision: '5fc1ec94cb'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '5.14.0-503.21.1.el9_5.x86_64', java.version: '17.0.14'
Driver info: org.openqa.selenium.remote.RemoteWebDriver
Command: [null, newSession {capabilities=[Capabilities {acceptInsecureCerts: true, browserName: chrome, goog:chromeOptions: {args: [--ignore-certificate-errors, --remote-allow-origins=*], extensions: []}, pageLoadStrategy: normal}]}]
Capabilities {acceptInsecureCerts: true, browserName: chrome, goog:chromeOptions: {args: [--ignore-certificate-errors, --remote-allow-origins=*], extensions: []}, pageLoadStrategy: normal}
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:114)
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:75)
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:61)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:187)
at org.openqa.selenium.remote.TracedCommandExecutor.execute(TracedCommandExecutor.java:53)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:545)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:245)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:174)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:152)
at sop.selenium.Main.main(Main.java:344)
Operating System
HUB on RedHat9, node on Windows Server 2022 Datacenter Edition
Selenium version
4.29.0
What are the browser(s) and version(s) where you see this issue?
chrome starting with version chrome 131.0.6741.0
What are the browser driver(s) and version(s) where you see this issue?
chromedriver 131.latest is working fine
Are you using Selenium Grid?
Grid 4.29.0
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 22 (10 by maintainers)
@schrufygroovy
No, the error you posted is completely different.
It seems like there are 3 errors that may be encountered on windows since chrome/chromedriver 131.0.6741.0 :
During my tests I encountered all of these 3 errors.
But a very good point is that it seems there is a difference in running selenium against the installed version of chrome (In Program Files) or against the one downloaded as zip from https://storage.googleapis.com/chrome-for-testing-public/β¦
I have now installed in Program Files on my test system (win2019) chrome version 134. In my test folder I have chrome 134 and chrome 133 each with the corresponding chromedriver. When I run this code everything runs alright :
When I run this code everything runs alright :
But when I run this code the script crash with : Invalid session Id :
I didnβt yet try to completely remove chrome from the system and see whatβs happening
In java (17.x) on windows machine x64: Download chrome/chromedriver versions 131.0.6740.0 and 131.0.6741.0 in a test folder then run this code :
if you will run the command : java -jar myTestApp.jar 40 50 then you will use version 131.0.6740.0 and 50 loops and app runs smoothly
if you will run the command : java -jar myTestApp.jar 41 50 then you will use version 131.0.6741.0 and 50 loops and app will crash with following exception : β¦