[iOS] Failing to even start or install on a real device at all

As of maybe three days ago appium has compeltely stopped working for me and I’ve done everything I could to figure out the issue. I’ve installed the latest appium, updated the device, anything. Nothing is working. I’ve installed the latest updated selenium, and even prior working tests have completely begun to fail.

I’ve looked up as many topics as I could but so far I’m running in circles without any help. Here is what I’m getting in return when I try to run a session.

Last login: Wed Apr 19 10:52:26 on ttys002
Mikes-MacBook-Pro:~ UserName$ appium
[Appium] Welcome to Appium v1.6.5-beta
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[HTTP] --> POST /wd/hub/session {“capabilities”:{“desiredCapabilities”:{“app”:"/Users/UserName/desktop/AppName.app",“appium-version”:“1.6.5”,“noReset”:true,“platformVersion”:“10.3.1”,“platformName”:“iOS”,“udid”:“faa70d9149605f11752c61546129ab15eaac73db”,“deviceName”:“5st”,“fullReset”:false},“requiredCapabilities”:{}},“desiredCapabilities”:{“app”:"/Users/UserName/desktop/AppName.app",“appium-version”:“1.6.5”,“noReset”:true,“platformVersion”:“10.3.1”,“platformName”:“iOS”,“udid”:“faa70d9149605f11752c61546129ab15eaac73db”,“deviceName”:“5st”,“fullReset”:false},“requiredCapabilities”:{}}
[debug] [MJSONWP] Calling AppiumDriver.createSession() with args: [{“app”:"/Users/UserName/desktop/AppName.app",“appium-version”:“1.6.5”,“noReset”:true,“platformVersion”:“10.3.1”,“platformName”:“iOS”,“udid”:“faa70d9149605f11752c61546129ab15eaac73db”,“deviceName”:“5st”,“fullReset”:false},{},{“desiredCapabilities”:{“app”:"/Users/UserName/desktop/AppName.app",“appium-version”:“1.6.5”,“noReset”:true,“platformVersion”:“10.3.1”,“platformName”:“iOS”,“udid”:“faa70d9149605f11752c61546129ab15eaac73db”,“deviceName”:“5st”,“fullReset”:false},“requiredCapabilities”:{}},null,null]
[debug] [BaseDriver] Event ‘newSessionRequested’ logged at 1492617728027 (11:02:08 GMT-0500 (CDT))
[Appium] Requested iOS support with version >= 10, using XCUITest driver instead of UIAutomation-based driver, since the latter is unsupported on iOS 10 and up.
[Appium] Creating new XCUITestDriver (v2.28.1) session
[Appium] Capabilities:
[Appium] app: ‘/Users/UserName/desktop/AppName.app’
[Appium] appium-version: ‘1.6.5’
[Appium] noReset: true
[Appium] platformVersion: ‘10.3.1’
[Appium] platformName: ‘iOS’
[Appium] udid: ‘faa70d9149605f11752c61546129ab15eaac73db’
[Appium] deviceName: ‘5st’
[Appium] fullReset: false
[debug] [XCUITest] XCUITestDriver version: 2.28.1
[BaseDriver] The following capabilities were provided, but are not recognized by appium: appium-version.
[BaseDriver] Session created with session id: 56e9a3b2-cba6-48be-9e53-0c0d1532aebd
[debug] [XCUITest] Xcode version set to ‘8.3’ (tools v8.2.0.0.1.1480973914)
[debug] [XCUITest] iOS SDK Version set to ‘10.3’
[debug] [BaseDriver] Event ‘xcodeDetailsRetrieved’ logged at 1492617728148 (11:02:08 GMT-0500 (CDT))
[debug] [XCUITest] Available devices: faa70d9149605f11752c61546129ab15eaac73db, faa70d9149605f11752c61546129ab15eaac73db
[debug] [XCUITest] Creating iDevice object with udid ‘faa70d9149605f11752c61546129ab15eaac73db’
[XCUITest] Determining device to run tests on: udid: ‘faa70d9149605f11752c61546129ab15eaac73db’, real device: true
[BaseDriver] Using local app ‘/Users/UserName/desktop/AppName.app’
[debug] [BaseDriver] Event ‘appConfigured’ logged at 1492617728246 (11:02:08 GMT-0500 (CDT))
[debug] [XCUITest] Checking whether app ‘/Users/UserName/desktop/AppName.app’ is actually present on file system
[debug] [XCUITest] App is present
[debug] [iOS] Getting bundle ID from app ‘/Users/UserName/desktop/AppName.app’: ‘$(PRODUCT_BUNDLE_IDENTIFIER)’
[debug] [BaseDriver] Event ‘resetStarted’ logged at 1492617728258 (11:02:08 GMT-0500 (CDT))
[debug] [XCUITest] Reset: fullReset not set. Leaving as is
[debug] [BaseDriver] Event ‘resetComplete’ logged at 1492617728259 (11:02:08 GMT-0500 (CDT))
[debug] [iOSLog] Attempting iOS device log capture via libimobiledevice idevicesyslog
[debug] [iOSLog] Found idevicesyslog: ‘/usr/local/bin/idevicesyslog’
[debug] [BaseDriver] Event ‘logCaptureStarted’ logged at 1492617728558 (11:02:08 GMT-0500 (CDT))
[XCUITest] Setting up real device
[debug] [XCUITest] Installing ‘/Users/UserName/desktop/AppName.app’ on device with UUID ‘faa70d9149605f11752c61546129ab15eaac73db’…
[XCUITest] Error: Could not install app: ‘Command ‘ios-deploy --id faa70d9149605f11752c61546129ab15eaac73db --uninstall --bundle /Users/UserName/desktop/AppName.app’ exited with code 253’
at IOSDeploy.install$ (…/…/lib/ios-deploy.js:38:13)
at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at process._tickCallback (internal/process/next_tick.js:103:7)
Error: Could not install app: ‘Command ‘ios-deploy --id faa70d9149605f11752c61546129ab15eaac73db --uninstall --bundle /Users/UserName/desktop/AppName.app’ exited with code 253’
at IOSDeploy.install$ (…/…/lib/ios-deploy.js:38:13)
at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at process._tickCallback (internal/process/next_tick.js:103:7)
[debug] [XCUITest] Not clearing log files. Use clearSystemFiles capability to turn on.
[debug] [iOSLog] Stopping iOS log capture
[MJSONWP] Encountered internal error running command: Error: Could not install app: ‘Command ‘ios-deploy --id faa70d9149605f11752c61546129ab15eaac73db --uninstall --bundle /Users/UserName/desktop/AppName.app’ exited with code 253’
at IOSDeploy.install$ (…/…/lib/ios-deploy.js:38:13)
at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at process._tickCallback (internal/process/next_tick.js:103:7)
[HTTP] <-- POST /wd/hub/session 500 2466 ms - 310
[HTTP] --> POST /wd/hub/session {“desiredCapabilities”:{“app”:"/Users/UserName/desktop/AppName.app",“appium-version”:“1.6.5”,“noReset”:true,“platformVersion”:“10.3.1”,“platformName”:“iOS”,“udid”:“faa70d9149605f11752c61546129ab15eaac73db”,“deviceName”:“5st”,“fullReset”:false},“requiredCapabilities”:{}}
[debug] [MJSONWP] Calling AppiumDriver.createSession() with args: [{“app”:"/Users/UserName/desktop/AppName.app",“appium-version”:“1.6.5”,“noReset”:true,“platformVersion”:“10.3.1”,“platformName”:“iOS”,“udid”:“faa70d9149605f11752c61546129ab15eaac73db”,“deviceName”:“5st”,“fullReset”:false},{},null,null,null]
[debug] [BaseDriver] Event ‘newSessionRequested’ logged at 1492617730521 (11:02:10 GMT-0500 (CDT))
[Appium] Requested iOS support with version >= 10, using XCUITest driver instead of UIAutomation-based driver, since the latter is unsupported on iOS 10 and up.
[Appium] Creating new XCUITestDriver (v2.28.1) session
[Appium] Capabilities:
[Appium] app: ‘/Users/UserName/desktop/AppName.app’
[Appium] appium-version: ‘1.6.5’
[Appium] noReset: true
[Appium] platformVersion: ‘10.3.1’
[Appium] platformName: ‘iOS’
[Appium] udid: ‘faa70d9149605f11752c61546129ab15eaac73db’
[Appium] deviceName: ‘5st’
[Appium] fullReset: false
[debug] [XCUITest] XCUITestDriver version: 2.28.1
[BaseDriver] The following capabilities were provided, but are not recognized by appium: appium-version.
[BaseDriver] Session created with session id: 496f1114-2a6f-4e0d-b925-14cbf3498542
[debug] [XCUITest] Xcode version set to ‘8.3’ (tools v8.2.0.0.1.1480973914)
[debug] [XCUITest] iOS SDK Version set to ‘10.3’
[debug] [BaseDriver] Event ‘xcodeDetailsRetrieved’ logged at 1492617730553 (11:02:10 GMT-0500 (CDT))
[debug] [XCUITest] Available devices: faa70d9149605f11752c61546129ab15eaac73db, faa70d9149605f11752c61546129ab15eaac73db
[debug] [XCUITest] Creating iDevice object with udid ‘faa70d9149605f11752c61546129ab15eaac73db’
[XCUITest] Determining device to run tests on: udid: ‘faa70d9149605f11752c61546129ab15eaac73db’, real device: true
[BaseDriver] Using local app ‘/Users/UserName/desktop/AppName.app’
[debug] [BaseDriver] Event ‘appConfigured’ logged at 1492617730668 (11:02:10 GMT-0500 (CDT))
[debug] [XCUITest] Checking whether app ‘/Users/UserName/desktop/AppName.app’ is actually present on file system
[debug] [XCUITest] App is present
[debug] [iOS] Getting bundle ID from app ‘/Users/UserName/desktop/AppName.app’: ‘$(PRODUCT_BUNDLE_IDENTIFIER)’
[debug] [BaseDriver] Event ‘resetStarted’ logged at 1492617730669 (11:02:10 GMT-0500 (CDT))
[debug] [XCUITest] Reset: fullReset not set. Leaving as is
[debug] [BaseDriver] Event ‘resetComplete’ logged at 1492617730669 (11:02:10 GMT-0500 (CDT))
[debug] [iOSLog] Attempting iOS device log capture via libimobiledevice idevicesyslog
[debug] [iOSLog] Found idevicesyslog: ‘/usr/local/bin/idevicesyslog’
[debug] [BaseDriver] Event ‘logCaptureStarted’ logged at 1492617730889 (11:02:10 GMT-0500 (CDT))
[XCUITest] Setting up real device
[debug] [XCUITest] Installing ‘/Users/UserName/desktop/AppName.app’ on device with UUID ‘faa70d9149605f11752c61546129ab15eaac73db’…
[XCUITest] Error: Could not install app: ‘Command ‘ios-deploy --id faa70d9149605f11752c61546129ab15eaac73db --uninstall --bundle /Users/UserName/desktop/AppName.app’ exited with code 253’
at IOSDeploy.install$ (…/…/lib/ios-deploy.js:38:13)
at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at process._tickCallback (internal/process/next_tick.js:103:7)
Error: Could not install app: ‘Command ‘ios-deploy --id faa70d9149605f11752c61546129ab15eaac73db --uninstall --bundle /Users/UserName/desktop/AppName.app’ exited with code 253’
at IOSDeploy.install$ (…/…/lib/ios-deploy.js:38:13)
at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at process._tickCallback (internal/process/next_tick.js:103:7)
[debug] [XCUITest] Not clearing log files. Use clearSystemFiles capability to turn on.
[debug] [iOSLog] Stopping iOS log capture
[MJSONWP] Encountered internal error running command: Error: Could not install app: ‘Command ‘ios-deploy --id faa70d9149605f11752c61546129ab15eaac73db --uninstall --bundle /Users/UserName/desktop/AppName.app’ exited with code 253’
at IOSDeploy.install$ (…/…/lib/ios-deploy.js:38:13)
at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at process._tickCallback (internal/process/next_tick.js:103:7)
[HTTP] <-- POST /wd/hub/session 500 2393 ms - 310
[HTTP] --> POST /wd/hub/session {“capabilities”:{“desiredCapabilities”:{“app”:"/Users/UserName/desktop/AppName.app",“appium-version”:“1.6.5”,“noReset”:true,“platformVersion”:“10.3.1”,“platformName”:“iOS”,“udid”:“faa70d9149605f11752c61546129ab15eaac73db”,“deviceName”:“5st”,“fullReset”:false},“requiredCapabilities”:{}}}
[debug] [MJSONWP] Bad parameters: BadParametersError: Parameters were incorrect. We wanted {“required”:[“desiredCapabilities”],“optional”:[“requiredCapabilities”,“capabilities”,“sessionId”,“id”]} and you sent [“capabilities”]
[HTTP] <-- POST /wd/hub/session 400 5 ms - 171

You need to use ipa instead of app file for real device.

I see from the logs ios-deploy failed to install the .app file on real device.

[XCUITest] Error: Could not install app: ‘Command ‘ios-deploy --id faa70d9149605f11752c61546129ab15eaac73db --uninstall --bundle /Users/UserName/desktop/AppName.app’ exited with code 253’

So In this case you have to use debug enabled ipa [ signed with developer certificate] for real iOS device.

app: '/Users/UserName/desktop/AppName.ipa’

[Appium] appium-version: ‘1.6.5’
Current version – 1.6.4