Appium stoped working on real device

Appium stoped working on real device. It was working properly before I installed Xcode 8. After I found it’s not working, I uninstalled Xcode 8 and reinstalled Xcode 7. But it doesn’t work. Any help is appreciated!

Environment:
Appium version: 1.5.3
Xcode version: 7.3.1
Real device: iPhone 5

Logs:
[MJSONWP] Calling AppiumDriver.createSession() with args: [{“app”:"/Users/xman/Down…
[Appium] Creating new IosDriver session
[Appium] Capabilities:
[Appium] app: ‘/Users/xman/Downloads/UICatalog.app’
[Appium] newCommandTimeout: 20
[Appium] platformVersion: ‘9.3’
[Appium] platformName: ‘iOS’
[Appium] udid: ‘05f2ee34191f8ac72f4c36cc150dc55d2e48b7f4’
[Appium] deviceName: ‘iPhone 5’
[BaseDriver] Session created with session id: c41c87b4-1a70-4321-806b-06c773e29033
[debug] [iOS] Not auto-detecting udid.
[BaseDriver] Using local app ‘/Users/xman/Downloads/UICatalog.app’
[debug] [iOS] Removing any remaining instruments sockets
[debug] [iOS] Cleaned up instruments socket /var/folders/dk/cdk2bfmj5kg3r3_94zcfb6pdp9jp89/T/instruments_sock
[debug] [iOS] No language specified. Using default strings
[debug] [iOS] Strings file not found. Looking in ‘en.lproj’ directory
[debug] [iOS] Parsed app ‘Localizable.strings’
[debug] [ios-app-utils] Getting bundle ID from app
[iOS] Extracted bundleID: com.example.apple-samplecode.UICatalog from app: /Users/xman/Downloads/UICatalog.app
[debug] [iOS] Creating instruments
[debug] [UIAuto] Preparing bootstrap code
[debug] [UIAuto] Dynamic bootstrap dir: /Users/xman/Library/Application Support/appium/bootstrap
[debug] [UIAuto] Dynamic env: {“nodePath”:"/Users/xman/.nvm/versions/node/v5.6.0/bin/node",“commandProxyClientPath”:"/usr/local/lib/node_modules/appium/node_modules/appium-ios-driver/node_modules/appium-uiauto/build/lib/bin/command-proxy-client.js",“instrumentsSock”:"/var/folders/dk/cdk2bfmj5kg3r3_94zcfb6pdp9jp89/T/instruments_sock",“interKeyDelay”:null,“justLoopInfinitely”:false,“autoAcceptAlerts”:false,“autoDismissAlerts”:false,“sendKeyStrategy”:“grouped”}
[debug] [UIAuto] Dynamic bootstrap code: // This file is automatically generated. Do not m…ally modify!
[debug] [UIAuto] Dynamic bootstrap path: /Users/xman/Library/Application Support/appium/bootstrap/bootstrap-5cd9752f634b732a.js
[debug] [UIAuto] Reusing dynamic bootstrap: /Users/xman/Library/Application Support/appium/bootstrap/bootstrap-5cd9752f634b732a.js
[debug] [iOS] Running ios real device reset flow
[debug] [iOSLog] Attempting iOS device log capture via libimobiledevice idevicesyslog
[debug] [iOSLog] Found idevicesyslog: ‘/usr/local/bin/idevicesyslog’
[debug] [iOS] Creating iDevice object with udid 05f2ee34191f8ac72f4c36cc150dc55d2e48b7f4
[debug] [iOS] App is not installed. Will try to install.
[MJSONWP] Encountered internal error running command: Error: Command failed: /bin/sh -c ideviceinstaller -u 05f2ee34191f8ac72f4c36cc150dc55d2e48b7f4 -i /Users/xman/Downloads/UICatalog.app

at ChildProcess.exithandler (child_process.js:213:12)
at emitTwo (events.js:100:13)
at ChildProcess.emit (events.js:185:7)
at maybeClose (internal/child_process.js:827:16)
at Socket.<anonymous> (internal/child_process.js:319:11)
at emitOne (events.js:90:13)
at Socket.emit (events.js:182:7)
at Pipe._onclose (net.js:471:12)

[HTTP] <-- POST /wd/hub/session 500 3672 ms - 267
[HTTP] --> POST /wd/hub/session {“capabilities”:{“desiredCapabilities”:{“app”:"/Users/xman/Downloads/UICatalog.app",“newCommandTimeout”:20,“platformVersion”:“9.3”,“platformName”:“iOS”,“udid”:“05f2ee34191f8ac72f4c36cc150dc55d2e48b7f4”,“deviceName”:“iPhone 5”},“requiredCapabilities”:{}}}
[debug] [MJSONWP] Bad parameters: BadParametersError: Parameters were incorrect. We wanted {“required”:[“desiredCapabilities”],“optional”:[“requiredCapabilities”,“sessionId”,“id”,“sessionId”,“id”,“sessionId”,“id”,“sessionId”,“id”,“sessionId”,“id”,“sessionId”,“id”]} and you sent [“capabilities”]
[HTTP] <-- POST /wd/hub/session 400 1 ms - 241

@Bill Try to run this command independent of Appium in your command line with your iphone connected:
/bin/sh -c ideviceinstaller -u 05f2ee34191f8ac72f4c36cc150dc55d2e48b7f4 -i /Users/xman/Downloads/UICatalog.app

Check if you get the same error, that you noticed with Appium

@Mayuresh_Shirodkar

Thanks for your reply!

When I run /bin/sh -c ideviceinstaller -u 05f2ee34191f8ac72f4c36cc150dc55d2e48b7f4 -i /Users/xman/Downloads/UICatalog.app, I got an error saying “ERROR: No mode/operation was supplied.”

But if I run ideviceinstaller -u 05f2ee34191f8ac72f4c36cc150dc55d2e48b7f4 -i /Users/xman/Downloads/UICatalog.app, I get this:
Uploading UICatalog.app package contents… DONE.
Installing ‘(null)’

  • CreatingStagingDirectory (5%)
  • ExtractingPackage (15%)
  • InspectingPackage (20%)
  • TakingInstallLock (20%)
  • PreflightingApplication (30%)
  • VerifyingApplication (40%)
  • Error occurred: ApplicationVerificationFailed

@Bill This suggests that its an issue of the .app file that you are using and not appium itself.Since ideviceinstaller itself is not able to install the app on the phone. Appium uses ideviceinstaller internally.
Rebuild the .app file using Xcode 7 and Xcode 8 and try it out with ideviceinstaller first, if it works. Should solve your problem.