1

I just upgraded my Selenium to 4.0.0. After the update, I am not able to open Chrome or Firefox. Here are the details Chrome : 96
Chrome driver : Supports 96. Downloaded from https://chromedriver.storage.googleapis.com/index.html?path=96.0.4664.45/
Selenium : 4.0.0

Here is the code to open browser

 System.setProperty("webdriver.chrome.driver", "<chromedriver location>");<br>
    driver = new ChromeDriver();

The browser opens up for split second and then closes. Here is the error I get

AILED CONFIGURATION: @BeforeClass beforeClassSetup("chrome")
org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
Build info: version: '4.0.0', revision: '3a21814679'
System info: host: 'dkleinman.esri.com', ip: 'fe80:0:0:0:23:8798:b33c:2bf6%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.15.7', java.version: '16.0.1'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Command: [null, newSession {capabilities=[Capabilities {browserName: chrome, goog:chromeOptions: {args: [], extensions: []}}], desiredCapabilities=Capabilities {browserName: chrome, goog:chromeOptions: {args: [], extensions: []}}}]

It works fine if I downgrade the selenium to 3.14 (keeping the chrome to 96)

undetected Selenium
  • 183,867
  • 41
  • 278
  • 352
kuldeep
  • 51
  • 4
  • Please provide the full code for your browser driver configuration, for anyone to be able to help you – djmonki Nov 17 '21 at 00:06
  • if (browserName.equalsIgnoreCase("chrome")) { System.setProperty("webdriver.chrome.driver", "chromedriver"); driver = new ChromeDriver(); } – kuldeep Nov 17 '21 at 00:21
  • we will need everything including prefs, options, set capabilities, profile etc, so we can see if thee is an issue with the construction of the driver to initialise the browser. Please update it i the original question. Thanks – djmonki Nov 17 '21 at 00:25
  • Thanks guys. I found the issue. There were some dependencies that were causing the issue. Removed them and things are back to normal. – kuldeep Nov 17 '21 at 01:09
  • FYI if it helps anyone - I accidentally downloaded the Mac M1 chromedriver 96 and was having a similar issue. No error, the browser just wouldn't launch. – MattS Nov 19 '21 at 16:59
  • @kuldeep could u share which dependecies u deleted . Fcing similar issue - https://stackoverflow.com/questions/70121909/sessionnotcreatedexception-could-not-start-a-new-session-possible-causes-are-i – Suraj Gupta Nov 26 '21 at 14:32
  • @djmonki Please check - https://stackoverflow.com/questions/70121909/sessionnotcreatedexception-could-not-start-a-new-session-possible-causes-are-i – Suraj Gupta Nov 26 '21 at 14:33

1 Answers1

0

Possibly a compatibility issue between Selenium and

A possible solution would be replace java.version: '16.0.1' with stable latest JDK 8u311

undetected Selenium
  • 183,867
  • 41
  • 278
  • 352
  • https://stackoverflow.com/questions/70121909/sessionnotcreatedexception-could-not-start-a-new-session-possible-causes-are-i Can u pls chk – Suraj Gupta Nov 26 '21 at 15:31