Unable to start Appium session when I am having sikulixapi: 2.0.5 added in the dependency.
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.3k
- Forks
- 752
- Avg merge
- 6d 21h
- Merged PRs (30d)
- 8
Description
Description
Unable to start Appium session when I am having sikulixapi: 2.0.5 added in the dependency.
Environment
- Java client build version or git revision if you use some snapshot: 8.5.1
- Appium server version or git revision if you use some snapshot: 2.1.3
- Desktop OS/version used to run Appium if necessary: Mac OS Ventura
- Node.js version (unless using Appium.app|exe) or Appium CLI or Appium.app|exe: 20.6.0
- Mobile platform/version under test: iOS
- Real device or emulator/simulator: Real
Details
Unable to start Appium session when I am having sikulixapi: 2.0.5 added in the dependency.
Note: I am able create session when I downgrade sikulixapi to 2.0.4.
This is the dependency added to pom.xml
com.sikulix sikulixapi 2.0.5Code To Reproduce Issue [ Good To Have ]
service = AppiumDriverLocalService.buildService(new AppiumServiceBuilder().withIPAddress("127.0.0.1")
.usingPort(port).withAppiumJS(new File("/usr/local/lib/node_modules/appium/build/lib/main.js"))
.withArgument(GeneralServerFlag.LOG_LEVEL, "debug")
.withLogFile(new File(System.getProperty("user.dir") + "appium.log"))
.withArgument(GeneralServerFlag.RELAXED_SECURITY));
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(MobileCapabilityType.PLATFORM_NAME, "iOS");
capabilities.setCapability("appium:platformVersion", "15");
capabilities.setCapability("appium:deviceName", "jyotipraksh's iPhone");
capabilities.setCapability("appium:automationName", "XCUITest");
capabilities.setCapability("appium:app", "com.fiberlink.maas360.enterpriseappstore");
capabilities.setCapability("appium:udid", "6279765bfc1744548bec50ddc00780049a3f155c");
capabilities.setCapability("appium:includeSafariInWebviews", true);
capabilities.setCapability("appium:newCommandTimeout", 3600);
capabilities.setCapability("appium:connectHardwareKeyboard", true);
System.out.println("Appium context set to application :" + appName);
driver = new IOSDriver(service, capabilities);
Exception Stacktraces
(https://gist.github.com/JYOTIPRAKASH225/f72cdde390c92d22df812edf09538e0d)
Link To Appium Logs
[Appium] Welcome to Appium v2.1.3
[Appium] Non-default server args:
[Appium] { address: [32m'127.0.0.1'[39m, port: [33m4385[39m, relaxedSecurityEnabled: [33mtrue[39m }
[Appium] Attempting to load driver xcuitest...
[debug] [Appium] Requiring driver at /Users/jprakash/.appium/node_modules/appium-xcuitest-driver
[Appium] Appium REST http interface listener started on http://127.0.0.1:4385
[Appium] Available drivers:
[Appium] - xcuitest@5.1.0 (automationName 'XCUITest')
[Appium] Available plugins:
[Appium] - execute-driver@3.0.14
[Appium] - device-farm@8.2.1
[Appium] - appium-dashboard@v2.0.2
[Appium] No plugins activated. Use the --use-plugins flag with names of plugins to activate
[38;5;0m[HTTP][0m --> GET /status
[38;5;0m[HTTP][0m {}
[debug] [38;5;16m[AppiumDriver@132e][0m Calling AppiumDriver.getStatus() with args: []
[debug] [38;5;16m[AppiumDriver@132e][0m Responding to client with driver.getStatus() result: {"ready":true,"message":"The server is ready to accept new connections","build":{"version":"2.1.3"}}
[38;5;0m[HTTP][0m <-- GET /status 200 9 ms - 110
[38;5;0m[HTTP][0m
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: 'jprakashs-MacBook-Pro-2098.local', ip: '2402:e280:217b:ac5:b98e:5649:bd6c:fb24%en0'
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:620)
at io.appium.java_client.AppiumDriver.startSession(AppiumDriver.java:274)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:163)
at io.appium.java_client.AppiumDriver.(AppiumDriver.java:89)
at io.appium.java_client.AppiumDriver.(AppiumDriver.java:112)
at io.appium.java_client.ios.IOSDriver.(IOSDriver.java:126)
at com.appium.appium2Session.getDriver(appium2Session.java:61)
at com.appium.appium2Session.main(appium2Session.java:30)
Caused by: org.openqa.selenium.WebDriverException: java.lang.reflect.InvocationTargetException
Build info: version: '4.12.1', revision: '8e34639b11'
System info: os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '13.4.1', java.version: '17.0.8'
Driver info: driver.version: IOSDriver
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:182)
at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:250)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:602)
... 7 more
Caused by: java.lang.reflect.InvocationTargetException
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 io.appium.java_client.remote.AppiumProtocolHandshake.createSession(AppiumProtocolHandshake.java:133)
... 11 more
Caused by: java.lang.NoClassDefFoundError: io/netty/handler/codec/DefaultHeaders$ValueValidator
at org.asynchttpclient.RequestBuilderBase.(RequestBuilderBase.java:98)
at org.asynchttpclient.RequestBuilderBase.(RequestBuilderBase.java:92)
at org.asynchttpclient.RequestBuilder.(RequestBuilder.java:35)
at org.asynchttpclient.RequestBuilder.(RequestBuilder.java:31)
at org.asynchttpclient.Dsl.request(Dsl.java:73)
at org.openqa.selenium.remote.http.netty.NettyMessages.toNettyRequest(NettyMessages.java:57)
at org.openqa.selenium.remote.http.netty.NettyHttpHandler.makeCall(NettyHttpHandler.java:55)
at io.appium.java_client.AppiumUserAgentFilter.lambda$apply$0(AppiumUserAgentFilter.java:88)
at org.openqa.selenium.remote.http.Filter.lambda$andFinally$1(Filter.java:55)
at org.openqa.selenium.remote.http.netty.NettyHttpHandler.execute(NettyHttpHandler.java:48)
at org.openqa.selenium.remote.http.netty.NettyClient.execute(NettyClient.java:96)
at io.appium.java_client.remote.AppiumCommandExecutor.lambda$null$0(AppiumCommandExecutor.java:187)
at org.openqa.selenium.remote.http.Filter.lambda$andFinally$1(Filter.java:55)
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:115)
... 16 more
Caused by: java.lang.ClassNotFoundException: io.netty.handler.codec.DefaultHeaders$ValueValidator
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
... 30 more
Exception : Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
Host info: host: 'jprakashs-MacBook-Pro-2098.local', ip: '2402:e280:217b:ac5:b98e:5649:bd6c:fb24%en0'
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the pom.xml dependency shown in the report and trace the NoClassDefFoundError for io.netty.handler.codec.DefaultHeaders$ValueValidator through AppiumProtocolHandshake. Compare the resolved dependencies for sikulixapi 2.0.5 and 2.0.4, then verify that an iOS session starts with version 2.0.5 without the missing-class failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ios, java
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100