Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

org.openqa.selenium.SessionNotCreatedException: Message: Could not start a new session. Response code 500 error using Selenium Java

A window appears after launch and immediately disappears, I can not understand what's wrong. Google except for the latest version, selenium is also set to the LATEST parameter (nothing changes with a specific version).

Error:

org.openqa.selenium.SessionNotCreatedException: Message:  Could not start a new session. Response code 500. Message: session not created

Code:

code

Error: Error

like image 324
Dmitriy N Avatar asked Oct 15 '25 16:10

Dmitriy N


1 Answers

This error message...

org.openqa.selenium.SessionNotCreatedException: Message:  Could not start a new session. Response code 500. Message: session not created:
.
Driver info: org.openqa.selenium.chrome.ChromeDriver

...implies that the ChromeDriver was unable to initiate/spawn a new Browsing Context i.e. google-chrome session.

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

  • You are using chrome=99.0
  • Release Notes of ChromeDriver v99.0 clearly mentions the following :

Supports Chrome version 99

  • But your chromedriver version is not getting detected.

Driver info: org.openqa.selenium.chrome.ChromeDriver

  • Your JDK version 1.8.0_281 is also old and ancient.

So most possibly there is a mismatch between jdk version, chromedriver version and the chrome=99.0


Solution

Ensure that:

  • JDK is upgraded to current levels JDK 8u311.
  • ChromeDriver is updated to current ChromeDriver v99.0 level.
  • Chrome Browser is updated to current chrome=99.0 (as per chromedriver=99.0.4844.51 release notes).
like image 111
undetected Selenium Avatar answered Oct 17 '25 06:10

undetected Selenium