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

org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:536)
at io.appium.java_client.AppiumDriver.startSession(AppiumDriver.java:268)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:161)
at io.appium.java_client.AppiumDriver.(AppiumDriver.java:90)
at io.appium.java_client.AppiumDriver.(AppiumDriver.java:102)
at io.appium.java_client.android.AndroidDriver.(AndroidDriver.java:109)
at appiumtests.BaseTest.setup(BaseTest.java:35)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:133)
at org.testng.internal.MethodInvocationHelper.invokeMethodConsideringTimeout(MethodInvocationHelper.java:62)
at org.testng.internal.ConfigInvoker.invokeConfigurationMethod(ConfigInvoker.java:385)
at org.testng.internal.ConfigInvoker.invokeConfigurations(ConfigInvoker.java:321)
at org.testng.internal.TestMethodWorker.invokeBeforeClassMethods(TestMethodWorker.java:176)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:122)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
at org.testng.TestRunner.privateRun(TestRunner.java:794)
at org.testng.TestRunner.run(TestRunner.java:596)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:377)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:371)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:332)
at org.testng.SuiteRunner.run(SuiteRunner.java:276)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:53)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:96)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1212)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1134)
at org.testng.TestNG.runSuites(TestNG.java:1063)
at org.testng.TestNG.run(TestNG.java:1031)
at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:115)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:251)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:77)
Caused by: org.openqa.selenium.WebDriverException: java.lang.NoSuchMethodException: org.openqa.selenium.remote.ProtocolHandshake.createSession(org.openqa.selenium.remote.http.HttpHandler,java.util.function.Supplier,long)
Build info: version: β€˜4.19.0’, revision: β€˜5f9cec8963’
System info: os.name: β€˜Mac OS X’, os.arch: β€˜aarch64’, os.version: β€˜14.2.1’, java.version: β€˜17.0.2’
Driver info: driver.version: AndroidDriver
at io.appium.java_client.remote.AppiumProtocolHandshake.createSession(AppiumProtocolHandshake.java:137)
at io.appium.java_client.remote.AppiumProtocolHandshake.createSession(AppiumProtocolHandshake.java:102)
at io.appium.java_client.remote.AppiumCommandExecutor.createSession(AppiumCommandExecutor.java:176)
at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:237)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:518)
… 32 more
Caused by: java.lang.NoSuchMethodException: org.openqa.selenium.remote.ProtocolHandshake.createSession(org.openqa.selenium.remote.http.HttpHandler,java.util.function.Supplier,long)
at java.base/java.lang.Class.getDeclaredMethod(Class.java:2675)
at io.appium.java_client.remote.AppiumProtocolHandshake.createSession(AppiumProtocolHandshake.java:128)
… 36 more
’

Upgrade appium java-client

1 Like