org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.

25,386 views
Skip to first unread message

Sajan Soosaimicheal

unread,
Apr 30, 2021, 1:03:41 PM4/30/21
to ChromeDriver Users
I am getting below error.
org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.

OS : MAC:

System.setProperty("webdriver.chrome.driver", "/Users/ssoosaimicheal/Mydocs/Projects/canaportal/softwares/drivers/chromedriver");
ChromeOptions options = new ChromeOptions();
options.addArguments("--diable--notifications");
WebDriverDetail webDriverDetail = new WebDriverDetail();
WebDriver webDriver = new ChromeDriver(options);


Build info: version: '4.0.0-beta-3', revision: '5d108f9a67'
System info: host: 'C02VT1HCHTDD', ip: '2603:6080:2803:81c3:0:0:0:1c94%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.15.6', java.version: '13'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Command: [null, newSession {desiredCapabilities=Capabilities {browserName: chrome}}]
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:637)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:251)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:173)
at org.openqa.selenium.chromium.ChromiumDriver.<init>(ChromiumDriver.java:89)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:99)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:86)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:75)
at org.cana.services.executors.ui.actions.browser.BrowserInstance.initialize(BrowserInstance.java:24)
at org.cana.services.executors.ui.actions.browser.BrowserInstance.initialize(BrowserInstance.java:42)
at org.cana.services.executors.ui.actions.browser.BrowserActionImpl.execute(BrowserActionImpl.java:16)
at org.cana.services.executors.ui.actions.browser.BrowserActionImpl_ClientProxy.execute(BrowserActionImpl_ClientProxy.zig:157)
at org.cana.services.executors.ui.UiControlExecutorImpl.execute(UiControlExecutorImpl.java:22)
at org.cana.services.executors.ui.UiControlExecutorImpl_ClientProxy.execute(UiControlExecutorImpl_ClientProxy.zig:157)
at org.cana.services.testplan.TestPlanServiceImpl.executeTestPlan(TestPlanServiceImpl.java:95)
at org.cana.services.testplan.TestPlanServiceImpl_ClientProxy.executeTestPlan(TestPlanServiceImpl_ClientProxy.zig:126)
at org.cana.scheduler.TestPlanSchedule.executeTestPlan(TestPlanSchedule.java:20)
at org.cana.scheduler.TestPlanSchedule_Subclass.executeTestPlan$$superaccessor1(TestPlanSchedule_Subclass.zig:201)
at org.cana.scheduler.TestPlanSchedule_Subclass$$function$$1.apply(TestPlanSchedule_Subclass$$function$$1.zig:29)
at io.quarkus.arc.impl.AroundInvokeInvocationContext.proceed(AroundInvokeInvocationContext.java:54)
at io.quarkus.narayana.jta.runtime.interceptor.TransactionalInterceptorBase.invokeInOurTx(TransactionalInterceptorBase.java:127)
at io.quarkus.narayana.jta.runtime.interceptor.TransactionalInterceptorBase.invokeInOurTx(TransactionalInterceptorBase.java:100)
at io.quarkus.narayana.jta.runtime.interceptor.TransactionalInterceptorRequired.doIntercept(TransactionalInterceptorRequired.java:32)
at io.quarkus.narayana.jta.runtime.interceptor.TransactionalInterceptorBase.intercept(TransactionalInterceptorBase.java:53)
at io.quarkus.narayana.jta.runtime.interceptor.TransactionalInterceptorRequired.intercept(TransactionalInterceptorRequired.java:26)
at io.quarkus.narayana.jta.runtime.interceptor.TransactionalInterceptorRequired_Bean.intercept(TransactionalInterceptorRequired_Bean.zig:340)
at io.quarkus.arc.impl.InterceptorInvocation.invoke(InterceptorInvocation.java:41)
at io.quarkus.arc.impl.AroundInvokeInvocationContext.perform(AroundInvokeInvocationContext.java:41)
at io.quarkus.arc.impl.InvocationContexts.performAroundInvoke(InvocationContexts.java:32)
at org.cana.scheduler.TestPlanSchedule_Subclass.executeTestPlan(TestPlanSchedule_Subclass.zig:159)
at org.cana.scheduler.TestPlanSchedule_ClientProxy.executeTestPlan(TestPlanSchedule_ClientProxy.zig:126)
at org.cana.scheduler.TestPlanSchedule_ScheduledInvoker_executeTestPlan_b1635972d209bdcb5e9df8aac89cb0e0cc0b647c.invokeBean(TestPlanSchedule_ScheduledInvoker_executeTestPlan_b1635972d209bdcb5e9df8aac89cb0e0cc0b647c.zig:46)
at io.quarkus.arc.runtime.BeanInvoker.invoke(BeanInvoker.java:20)
at io.quarkus.scheduler.runtime.SimpleScheduler$ScheduledTask$1.run(SimpleScheduler.java:227)
at io.quarkus.runtime.CleanableExecutor$CleaningRunnable.run(CleanableExecutor.java:231)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2415)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1452)
at org.jboss.threads.DelegatingRunnable.run(DelegatingRunnable.java:29)
at org.jboss.threads.ThreadLocalResettingRunnable.run(ThreadLocalResettingRunnable.java:29)
at java.base/java.lang.Thread.run(Thread.java:830)
at org.jboss.threads.JBossThread.run(JBossThread.java:501)
Caused by: java.lang.NoSuchMethodError: 'void com.google.common.base.Throwables.throwIfUnchecked(java.lang.Throwable)'
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:145)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:619)
... 41 more

Sajan Soosaimicheal

unread,
Apr 30, 2021, 1:31:07 PM4/30/21
to ChromeDriver Users
adding few more:
POM.xml
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>4.0.0-beta-3</version>
</dependency>

John Chen

unread,
Apr 30, 2021, 2:14:08 PM4/30/21
to Sajan Soosaimicheal, ChromeDriver Users
I am unable to figure out what went wrong based on the information provided. One problem is the "java.lang.NoSuchMethodError: 'void com.google.common.base.Throwables.throwIfUnchecked(java.lang.Throwable)'" error. It appears to be an issue with the Selenium library. While it is not the root cause of the failure, it replaced any error returned from ChromeDriver with a NoSuchMethodError, so it's not possible to know what went wrong in ChromeDriver.

Would it be possible for you to send a ChromeDriver verbose log?

--
You received this message because you are subscribed to the Google Groups "ChromeDriver Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromedriver-us...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/chromedriver-users/c26325de-ae31-4862-8c33-2e4243a6b372n%40googlegroups.com.

Sajan Soosaimicheal

unread,
Apr 30, 2021, 3:24:24 PM4/30/21
to ChromeDriver Users
I tried and don't have any luck.
few more detail:
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-beta-3', revision: '5d108f9a67'
System info: host: 'C02VT1HCHTDD', ip: '2603:6080:2803:81c3:0:0:0:1c94%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.15.6', java.version: '13'
Driver info: org.openqa.selenium.remote.RemoteWebDriver
Command: [null, newSession {desiredCapabilities=Capabilities {browserName: chrome}}]
Capabilities {}

System.setProperty("webdriver.chrome.logfile", "<path>/chromedriver.log");
System.setProperty("webdriver.chrome.verboseLogging", "true");
DesiredCapabilities desiredCapabilities = new DesiredCapabilities();
desiredCapabilities.setBrowserName("chrome");

try {
URL url = new URL("http://localhost:9515");
RemoteWebDriver remoteWebDriver = new RemoteWebDriver(url, desiredCapabilities);
} catch (MalformedURLException e) {
System.out.println("Invalid grid URL");
}
catch (Exception e) {
System.out.println(e.getMessage());
}

Sajan Soosaimicheal

unread,
Apr 30, 2021, 3:28:25 PM4/30/21
to ChromeDriver Users
docker logs:
2021-04-30 18:05:53,848 INFO Included extra file "/etc/supervisor/conf.d/selenium.conf" during parsing
2021-04-30 18:05:53,854 INFO supervisord started with pid 8
2021-04-30 18:05:54,857 INFO spawned: 'xvfb' with pid 10
2021-04-30 18:05:54,860 INFO spawned: 'vnc' with pid 11
2021-04-30 18:05:54,863 INFO spawned: 'novnc' with pid 12
2021-04-30 18:05:54,865 INFO spawned: 'selenium-standalone' with pid 13
2021-04-30 18:05:54,897 INFO success: xvfb entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2021-04-30 18:05:54,898 INFO success: vnc entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2021-04-30 18:05:54,898 INFO success: novnc entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2021-04-30 18:05:54,898 INFO success: selenium-standalone entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
18:05:56.068 INFO [LogManager$RootLogger.log] - Using the system default encoding
18:05:56.076 INFO [OpenTelemetryTracer.createTracer] - Using OpenTelemetry for tracing
18:05:57.058 INFO [NodeOptions.getSessionFactories] - Detected 4 available processors
18:05:57.081 INFO [NodeOptions.discoverDrivers] - Discovered 1 driver(s)
18:05:57.124 INFO [NodeOptions.report] - Adding Chrome for {"browserName": "chrome","platformName": "LINUX"} 1 times
18:05:57.158 INFO [Node.<init>] - Binding additional locator mechanisms: id, name
18:05:57.179 INFO [LocalDistributor.add] - Added node f2dde8d1-4836-476a-b172-c41120cb45bb at http://172.17.0.2:4444.
18:05:57.195 INFO [GridModel.setAvailability] - Switching node f2dde8d1-4836-476a-b172-c41120cb45bb (uri: http://172.17.0.2:4444) from DOWN to UP
18:05:57.446 INFO [Standalone.execute] - Started Selenium Standalone 4.0.0-beta-3 (revision 5d108f9a67): http://172.17.0.2:4444

die...@gmail.com

unread,
May 1, 2021, 9:14:06 AM5/1/21
to ChromeDriver Users
How are you starting the docker images? What operating system and docker desktop version are you using?

Sajan Soosaimicheal

unread,
May 1, 2021, 10:57:07 AM5/1/21
to die...@gmail.com, ChromeDriver Users
I debugged RemoteWebDriver code and found com.google.guava  outdated , missing some method not found exception. it;s worked after upgrading with latest version. thanks everyone

shiffali wadhera

unread,
Jun 4, 2021, 6:05:21 AM6/4/21
to ChromeDriver Users
Hi Sajan,
I have been struggling with this error since last one week.. Could you please let me know how did you manage to make this work.
I am using selenium-java -> 4.0.0-beta-3
Linux Chromedriver 89
Could you please help.

Deepika Pentala

unread,
Dec 12, 2021, 9:49:56 PM12/12/21
to ChromeDriver Users
Hi sajan,
Shifalli,
I am trying this from one week.How did u allresolve it.
thanks in advance

Saurabh

unread,
Mar 20, 2022, 4:18:08 AM3/20/22
to ChromeDriver Users
Hi Guys,
I have written the solution here, Hope this will help you and solve your issue.

https://stackoverflow.com/a/71545058/11811482


Sathish Subramaniam

unread,
Mar 31, 2023, 9:43:02 AM3/31/23
to ChromeDriver Users
Hi All,

When I am trying to upgrade Selenium from 3.141.59 to 4.8.1..This is the error and I was able to resolve it by adding this dependency...
I know this big jump in the Selenium version.



org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.

.

.

.

at com.intellij.rt.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:109)

Caused by: java.lang.NoClassDefFoundError: io/netty/handler/codec/DefaultHeaders$ValueValidator

 

I added the following dependency which resolved the issue.

<!--https://mvnrepository.com/artifact/io.netty/netty-handler-->
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-handler</artifactId>
<version>4.1.90.Final</version>
</dependency>


Quick Note - When you receive the "Session Not created exception"..always scroll to the bottom of the error and see where exactly the issue is thrown. you should be able to find the exact error.

Ahsan Hussain

unread,
Sep 16, 2023, 8:07:20 PM9/16/23
to ChromeDriver Users
facing the same on 4.12.* using latest IDE Eclipse 2023 09 R on Java 17 and JavaSE1.8 as well..

Richard Steiger

unread,
Sep 20, 2023, 5:41:24 PM9/20/23
to ChromeDriver Users
facing the same issue, Eclipse 2023 06, jdk11.0.1, chromedriver 114.0.5735.90, chrome 117.0.5938.89, selenium 4.12.1, Windows 10, using 4.1.90Final netty-handler version suggested by Sathish Subramaniam, still getting

org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.

Host info: host: 'DESKTOP-O5Q7SKH', ip: '10.0.0.45'

Build info: version: '4.12.1', revision: '8e34639b11'

System info: os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '11.0.10'

Driver info: org.openqa.selenium.remote.RemoteWebDriver

Command: [null, newSession {capabilities=[Capabilities {browserName: chrome, goog:chromeOptions: {args: [--remote-allow-origins=*, --user-data-dir=C:\Users\rs..., --headless=new, --no-sandbox, --ignore-ssl-errors=true, --ignore-certificate-errors], binary: C:\Program Files\Google\Chr..., extensions: []}}]}]

Capabilities {browserName: chrome, goog:chromeOptions: {args: [--remote-allow-origins=*, --user-data-dir=C:\Users\rs..., --headless=new, --no-sandbox, --ignore-ssl-errors=true, --ignore-certificate-errors], binary: C:\Program Files\Google\Chr..., extensions: []}}


sandeep singh

unread,
Sep 25, 2023, 3:49:24 AM9/25/23
to ChromeDriver Users
Hi All I am getting same issue but I am using selenide latest version(6.15.0)  and Chrome latest version( 117.0.5938.92 )  instead of slenium to resolve this issue I have also added the dependency but still getting same error   <!--https://mvnrepository.com/artifact/io.netty/netty-handler-->

<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-handler</artifactId>
<version>4.1.90.Final</version>
</dependency>
org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
Host info: host: 'IN-4WLSVM7', ip: '192.168.24.143'
Build info: version: '4.9.1', revision: 'eb2032df7sf'
System info: os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_202'
selenide.remote: http://localhost:3333/wd/hub
river info: org.openqa.selenium.remote.RemoteWebDriver
Command: [null, newSession {capabilities=[Capabilities {acceptInsecureCerts: true, browserName: chrome, goog:chromeOptions: {args: [--remote-allow-origins=*, --headless=new, --proxy-bypass-list=<-loopb..., --disable-dev-shm-usage, --disable-background-networ..., --enable-features=NetworkSe..., --disable-background-timer-..., --disable-backgrounding-occ..., --disable-breakpad, --disable-client-side-phish..., --disable-component-extensi..., --disable-default-apps, --disable-features=TranslateUI, --disable-hang-monitor, --disable-ipc-flooding-prot..., --disable-popup-blocking, --disable-prompt-on-repost, --disable-renderer-backgrou..., --disable-sync, --force-color-profile=srgb, --metrics-recording-only, --no-first-run, --password-store=basic, --use-mock-keychain, --hide-scrollbars, --mute-audio, --window-size=1366,768], excludeSwitches: [enable-automation, load-extension], extensions: [], prefs: {credentials_enable_service: false, plugins.always_open_pdf_externally: true, profile.default_content_setting_values.automatic_downloads: 1, safebrowsing.enabled: true}}, pageLoadStrategy: normal, unhandledPromptBehavior: accept}]}]

Mayur Kumar

unread,
Oct 6, 2023, 1:22:07 AM10/6/23
to ChromeDriver Users
My browser has automatically upgraded to the latest version and faced the same exact issue. So I used a downgraded version of chrome to solve this issue. See below code.

I have Version 117.0.5938.150 (Official Build) (64-bit) but used  version 116.. Hope this helps 

WebDriverManager.chromedriver().browserVersion("116").setup();

ChromeOptions options = new ChromeOptions();

options.addArguments("start-maximized");

options.addArguments("enable-automation");

options.addArguments("--no-sandbox");

options.addArguments("--disable-infobars");

options.addArguments("--disable-dev-shm-usage");

options.addArguments("--disable-browser-side-navigation");

options.addArguments("--disable-gpu");

driver = new ChromeDriver(options);


Reply all
Reply to author
Forward
0 new messages