java-client
java-client copied to clipboard
Unable to start Appium session when I am having sikulixapi: 2.0.5 added in the dependency.
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
Code 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] - [email protected] (automationName 'XCUITest')
[Appium] Available plugins:
[Appium] - [email protected]
[Appium] - [email protected]
[Appium] - [email protected]
[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.
@JYOTIPRAKASH225 try the following code, Add base Path to the builder argument
new AppiumServiceBuilder() .usingAnyFreePort() .withArgument(GeneralServerFlag.BASEPATH, "/wd/hub") .build() .start();
@ashwithpoojary98 : .withArgument(GeneralServerFlag.BASEPATH, "/wd/hub") adding this will fail. I am using Appium 2.0 There is some issue with sikulixapi: 2.0.5 When I downgrade to 2.0.4, everything works fine.
@JYOTIPRAKASH225 What is the JDK version that you are using? if below 11 update it!!
I am using JDK 17
@jlipps : Can you please suggest here? There is a lot of dependency for sikulixapi in my project. When I downgrade to 2.0.4 from 2.0.5, everything works fine. Please look into it and suggest.
@JYOTIPRAKASH225 The common dependencies might be mismatched, so try removing the common dependency from SikuliXAPI.