Throwing error - org.openqa.selenium.SessionNotCreatedException: session not created exception

0 votes

I'm trying to run some Selenium tests using the Selenium Chrome Driver, but it is throwing an error:

Starting ChromeDriver 2.23.409699 (49b0fa931cda1caad0ae15b7d1b68004acd05129) on port 42985

Only local connections are allowed.

Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: session not created exception

from unknown error: Runtime.executionContextCreated has invalid 'context': {"auxData":{"frameId":"7576.1","isDefault":true},"id":1,"name":"","origin":"://"}

  (Session info: chrome=54.0.2840.59)

  (Driver info: chromedriver=2.23.409699 (49b0fa931cda1caad0ae15b7d1b68004acd05129),platform=Windows NT 10.0.14393 x86_64) (WARNING: The server did not provide any stacktrace information)

Command duration or timeout: 2.48 seconds

Build info: version: 'unknown', revision: '2aa21c1', time: '2016-08-02 14:59:43 -0700'

System info: host: 'SUJITH', ip: '192.168.43.228', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_101'

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

    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)

    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)

    at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:206)

    at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:158)

    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:683)

    at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:247)

    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:130)

    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:143)

    at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:170)

    at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:159)

    at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:116)

    at Selenium.Test2.main(Test2.java:15)

Why is this happening, and how can I fix it?

Jul 20, 2018 in Selenium by Martin
• 4,220 points
2,990 views
Still not able to run.

getting this error-

Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code.
Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: session not created
from disconnected: unable to connect to renderer
  (Session info: chrome=75.0.3770.142)
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
System info: host: 'admins-MacBook-Pro-8.local', ip: 'fe80:0:0:0:18fb:f5a2:680a:d377%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.14.5', java.version: '1.8.0_211'
Driver info: driver.version: ChromeDriver
remote stacktrace: 0   chromedriver                        0x000000010b88b319 chromedriver + 3597081
1   chromedriver                        0x000000010b81af73 chromedriver + 3137395
2   chromedriver                        0x000000010b5c6c6f chromedriver + 695407
Try to look for your Selenium version and then checkout which version of Chrome driver is supported by Selenium Webdriver? Or simply check whether there's any mismatch in versions between Selenium Webdriver and Chrome Driver.
I am still getting the same error for chrome browser "77.0.3865.75" with chromedriver version "77.0.3865.40" . Is that problem resolved for you ? If yes ,Please provide steps here . It would be a great help.

Hey Aravintham, these kind of errors occur when either the chrome browser is updated or the chrome driver is updated and both aren't version compatible. So to resolve such error, update your chrome browser to the latest version and also install the latest chrome driver version supporting browser.

You can choose chrome driver from the below link that will suit your system architecture: http://chromedriver.storage.googleapis.com/index.html

1 answer to this question.

0 votes

Update your chrome driver with latest version. It will work fine.

answered Jul 20, 2018 by Samarpit
• 5,130 points
hi,

Updated the chromdriver(latest version)still facing the issue.

Related Questions In Selenium

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,090 points
760 views
0 votes
1 answer
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,130 points
1,001 views
0 votes
1 answer

How to use such xpath to find web elements

It's much simpler to use: #MyDiv123 > div.super or ...READ MORE

answered Jun 14, 2018 in Selenium by Samarpit
• 5,130 points
713 views
0 votes
1 answer

Error: org.openqa.selenium.ElementNotInteractableException

Try to use javascriptExecutor to click the ...READ MORE

answered Jul 30, 2018 in Selenium by Samarpit
• 5,130 points
1,584 views