java-client
java-client copied to clipboard
org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 500. Message: An unknown server-side error occurred while processing the command. Original error: Unknown device or simulator UDID: xxxx
Hi All,
I am getting "org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 500. Message: An unknown server-side error occurred while processing the command. Original error: Unknown device or simulator UDID:xxxx" error when I execute my scripts in older device models like iPhone 6S, iPhone 8, iPad mini 2019/20 models which has 40 characters of UDID but the same is working fine in newer devices models which has 24 Characters of UDID. I am not sure if this is any compatibility issue or bug or its the expected behaviour. Also I am new to iOS Real Device Automation.
Please help me out to resolve this issue or please update me if anybody facing this issue and found any work around.
Below is my Environment: Mac OS: Ventura 13.3.1(a) Xcode: 14.3.1
New iPad (Where everything is working fine) : 16.3.1
===Getting the above Error with the below devices===== iPhone 6S : 15.7.5 iPhone 8: 15.2 iPad mini 2019/2020 model: 12.5.7
Appium.io : 8.5.0 Selenium.io: 4.9.1
Below is my Capabilities:
switch (strExecutionMode){ case "Device":
String strDeviceName = properties.getProperty("DeviceName");
options.setDeviceName(strDeviceName);
if(strInstallApp.equalsIgnoreCase("true")){
options.setApp("xxx.app");
}
options.setPlatformName("iOS");
options.setBundleId("xxxxx");
switch (strDeviceName){
case "iPad mini 2019/2020 model:":
options.setPlatformVersion("12.5.7");
options.setUdid("xxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");
break;
case "New iPad":
options.setPlatformVersion("16.3.1");
options.setUdid("xxxxxxxx-xxxxxxxxxxxxxxxx");
break;
case "iPhone 8":
options.setPlatformVersion("15.2");
options.setUdid("xxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");
break;
case "iPhone 6S":
options.setPlatformVersion("15.7.5");
options.setUdid("xxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");
break;
default:
Assert.fail("If Execution Mode is Device then Device Name should be mandatory to configure");
break;
}
break;
case "Simulator":
options.setDeviceName("iPad (10th generation)");
options.setApp("xxxxx.app");
options.setPlatformVersion("16.2");
options.setPlatformName("iOS");
//options.usePrebuiltWda();
break;
}
options.setAutoWebview(true);
options.includeSafariInWebviews();
options.getWebviewConnectTimeout();
options.setWdaLaunchTimeout(Duration.ofSeconds(Long.parseLong(properties.getProperty("ImplicitWaitTime"))));
driver = new IOSDriver(new URL("http://127.0.0.1:4723"),options);
driver.manage().timeouts().implicitlyWait(Duration.ofSeconds(Long.parseLong(properties.getProperty("ImplicitWaitTime"))));
}
@Mahee17 Check your Xcode version and follow https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md this steps