When I try to create a new driver
driver = new AppiumDriver(new URL(“”), capabilities);
driver = new IOSDriver(new URL(“”), capabilities);

I have this bug.

How can I debug? Or to find a solution?

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: EISDIR: illegal operation on a directory, read
Host info: host: ‘MAC…’, ip: ‘…’
Build info: version: ‘4.5.3’, revision: ‘4b786a1e430’
System info: ‘Mac OS X’, os.arch: ‘x86_64’, os.version: ‘12.6’, java.version: ‘11.0.17’
Driver info: io.appium.java_client.ios.IOSDriver
Command: [null, newSession {capabilities=[{appium:app=/Users/xxx/Projects/mobile-tests/src/app/IpaApk1/ipa/, appium:automationName=XCUITest, appium:deviceName=iPhone 12 Pro Max, platformName=IOS, appium:platformVersion=15.5}], desiredCapabilities=Capabilities {app: /Users/xxx/Projects/mobi…, automationName: XCUITest, deviceName: iPhone 12 Pro Max, platformName: IOS, platformVersion: 15.5}}]
Capabilities {}

void beforeClass(@Optional(“platform”) String platform) throws MalformedURLException {
platform = “ios”;
startServer(4723, “”);
setDriver(platform, “”);

public void setDriver(String testPlatform, String url) throws MalformedURLException {
switch (testPlatform) {
case “ios”: {
System.out.println("------------ios--------" + url);
//driver = new AppiumDriver(new URL(url), capabilities);
// driver = new AppiumDriver(new URL(“”), capabilities); //v2 local
driver = new IOSDriver(new URL(“”), capabilities); //v2 local

        default: {
            driver = new AndroidDriver(new URL(""), capabilities);

public void setIosCaps() {
    capabilities.setCapability(MobileCapabilityType.PLATFORM_NAME, "iOS");
    capabilities.setCapability(MobileCapabilityType.PLATFORM_VERSION, "15.5");
    capabilities.setCapability(MobileCapabilityType.AUTOMATION_NAME, "XCUITest");
    capabilities.setCapability(MobileCapabilityType.DEVICE_NAME, "iPhone 12 Pro Max");
    String appUrlIos = System.getProperty("user.dir") + "/src/app/IpaApk1/ipa/";
    capabilities.setCapability("app", appUrlIos);

.app = Simulator
.ipa = real device

Are you trying to test on real device?

I try to test on simulator. I have Xcode installed.

This is the structure of the app file/folder

enable DEBUG error logs with Appium server and check errors there. will be more info in DEBUG logs

1 Like

The appium server is started and the status is 200
[Appium] Welcome to Appium v2.0.0-beta.43
[Appium] Non-default server args:
[Appium] { address: ‘’, sessionOverride: true }
[Appium] Default capabilities, which will be added to each request unless overridden by desired capabilities:
[Appium] { app:
[Appium] ‘/Users/…/app/swift/’,
[Appium] automationName: ‘XCUITest’,
[Appium] deviceName: ‘iPhone 12 Pro Max’,
[Appium] platformName: ‘IOS’,
[Appium] platformVersion: ‘15.5’ }
[Appium] Attempting to load driver xcuitest…
[debug] [[email protected]] Responding to client with driver.getStatus() result: {“build”:{“version”:“2.0.0-beta.43”}}
[HTTP] <-- GET /status 200 4 ms - 47

but after this is displayed

[[email protected] (62217eea)] Session created with session id: 62217eea-89f0-4603-add2-5e6b83d5a9b6
[debug] [XCUITest] Current user: ‘xxxx’
[[email protected] (62217eea)] iOS SDK Version set to ‘16.2’
[iOSSim] Constructing iOS simulator for Xcode version 14.2 with udid ‘D38F9903-AA4C-4E34-8ACF-876AE39B01B9’
[[email protected] (62217eea)] Determining device to run tests on: udid: ‘D38F9903-AA4C-4E34-8ACF-876AE39B01B9’, real device: false
[debug] [[email protected] (62217eea)] Event ‘xcodeDetailsRetrieved’ logged at 1681906091548 (15:08:11 GMT+0300 (Eastern European Summer Time))
[BaseDriver] Using local app ‘/Users/…/app/swift/’
[debug] [Support] Found ‘unzip’ at ‘/usr/bin/unzip’
[Support] unzip failed; falling back to JS: %s
[Support] unzip: cannot find or open /Users/…/app/swift/, /Users/…/app/swift/ or /Users/…/src/app/swift/
[[email protected] (62217eea)] {“cause”:{“errno”:-21,“code”:“EISDIR”,“syscall”:“read”},“isOperational”:true,“errno”:-21,“code”:“EISDIR”,“syscall”:“read”}
[DevCon Factory] Releasing connections for D38F9903-AA4C-4E34-8ACF-876AE39B01B9 device on any port number
[DevCon Factory] No cached connections have been found

tries to unzip the .app file ??? and normally it can’t be done
I want to use a simulator for the automated tests on swift application

looks like you provide wrong path to file.

[debug] [[email protected]] Encountered internal error running command: Error: Simulator architecture is unsupported by the ‘/Users/me/githubProjects/src/app/’ application. Make sure the correct deployment target has been selected for its compilation in Xcode.

And this error?
I regenerated the .ipa file , make .zip, extract .app file, copy the .app filr into projects

For simulator you should generate app for Simulator!

1 Like