Appium [iOS] - Couldn't launch app on simulator - ios

I had installed Appium and all necessary stuff for running of application via iOS Simulator
Then I started a simulator and launched the Appium (sure path to application was set in Settings before launching)
I don't know whether the application should be open immediately after launching or not. That's why I ran Inspector. Seems the device was connected and installation of app was started. App crashed after the launch screen was shown. I tried the same flow with another application, getting the same result. Here are logs from Appium:
info: [IOS_SYSLOG_ROW ] Jul 24 10:29:07 MacBook-apple com.apple.CoreSimulator.SimDevice.73F7270E-C69E-4CF5-8586-39358163963A.launchd_sim[6364] (UIKitApplication:com.wholefoods.WholeFoods[0x7ca4][6420]): Program specified by service does not contain one of the requested architectures: �<0
info: [IOS_SYSLOG_ROW ] Jul 24 10:29:07 MacBook-apple.local SpringBoard[6378]: Unable to get pid for 'UIKitApplication:com.wholefoods.WholeFoods[0x7ca4]': No such process (err 3)
info: [IOS_SYSLOG_ROW ] Jul 24 10:29:07 MacBook-apple.local SpringBoard[6378]: Unable to delete job with label UIKitApplication:com.wholefoods.WholeFoods[0x7ca4]. Error: Operation now in progress
info: [IOS_SYSLOG_ROW ] Jul 24 10:29:07 MacBook-apple.local SpringBoard[6378]: Application 'UIKitApplication:com.wholefoods.WholeFoods[0x7ca4]' exited for an unknown reason.
info: [IOS_SYSLOG_ROW ] Jul 24 10:29:07 MacBook-apple com.apple.CoreSimulator.SimDevice.73F7270E-C69E-4CF5-8586-39358163963A.launchd_sim[6364] (UIKitApplication:com.wholefoods.WholeFoods[0x7ca4][6420]): Trampoline was terminated before jumping to service: Killed: 9
info: [debug] [INST STDERR] Instruments Trace Error : Target failed to run: Failed looking up pid of launched process
info: [debug] [INSTSERVER] Instruments exited with code 253
info: [debug] Killall instruments
info: [debug] Instruments crashed on startup
info: [debug] Attempting to retry launching instruments, this is retry #2
info: [debug] Killall iOS Simulator
info: [IOS_SYSLOG_ROW ] Jul 24 10:29:07 MacBook-apple.local DTMobileIS[6387]: Could not create service named com.apple.instruments.server.services.processcontrol.posixspawn
info: [IOS_SYSLOG_ROW ] Jul 24 10:29:07 MacBook-apple.local DTMobileIS[6387]: Could not create service named com.apple.instruments.server.services.launchdaemon
info: Launching instruments
info: [debug] Attempting to run app on iPad 2 (8.3 Simulator)
info: [debug] Spawning instruments with command: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.xrplugin/Contents/Resources/Automation.tracetemplate -D /tmp/appium-instruments/instrumentscli0.trace -w "iPad 2 (8.3 Simulator)" /var/folders/7x/pfjm_c_s37ngl66yrs82ry3m0000gn/T/115624-6265-9ypyif/Payload/WholeFoods.app -e UIASCRIPT "/Users/apple/Library/Application Support/appium/bootstrap/bootstrap-4e580d338a12229a.js" -e UIARESULTSPATH /tmp/appium-instruments
info: [debug] And extra without-delay env: {"DYLD_INSERT_LIBRARIES":"/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-instruments/thirdparty/iwd6/InstrumentsShim.dylib","LIB_PATH":"/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-instruments/thirdparty/iwd6"}
info: [debug] And launch timeouts (in ms): {"global":90000}
blablabla
info: [debug] Cleaning up appium session
info: [debug] Error: Instruments crashed on startup
at [object Object].Instruments.onInstrumentsExit (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-instruments/lib/instruments.js:440:31)
at [object Object].<anonymous> (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-instruments/lib/instruments.js:353:12)
at ChildProcess.emit (events.js:110:17)
at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
info: [debug] Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: Instruments crashed on startup)","origValue":"Instruments crashed on startup"},"sessionId":null}
info: <-- POST /wd/hub/session 500 117025.667 ms - 182
error: Failed to start an Appium session, err was: Error: Instruments crashed on startup

The solution is simple, though not trivial
Once you've build the app for the simulator:
In Xcode at the left panel find Products
There you'll find your application. Tap it with right click (even if it is red)
At the right panel you'll see the path at Full Path. Copy it up to last element. For example seeing /projects/.../yourproject-<bhah>/Build/Products/Debug-iphoneos/yourproject.app you need: /projects/.../yourproject-<bhah>/Build/Products
3.1. Or you can find it with:Tap it with right click (even if it is red) and select show in finder
Go one to the enclosing folder (Go->Enclosing folder)
Open that dir. You'll find there Debug-iphonesimulator and yourproject.app there.
that's the one you need

Related

Appium inspector not open getting instruments crash on startup [duplicate]

I am doing iOS automation on real device. But i got stuck with the error "Failed to start an Appium session, err was: Error: Instruments crashed on startup". logs are below. Please help to resolve this error. Thanks in advance.
info: Appium REST http interface listener started on 0.0.0.0:4723
info: Console LogLevel: debug
info: --> POST /wd/hub/session {"desiredCapabilities":{"app":"/Users/rajesh.madaswamy/Desktop/PlainNote/code/sencha/cordova/platforms/ios/build/emulator/Fly_dotREZ.ipa","platformVersion":"7.1.2","platformName":"iOS","deviceName":"iPhone 5S","bundleId":"com.accenture.london.Voyage-Air","udid":"5f5e07c61ae3ad4f755801bd6336d21d90927095"}}
info: Client User-Agent string: Apache-HttpClient/4.3.6 (java 1.5)
info: [debug] Using local .ipa from desired caps: /Users/rajesh.madaswamy/Desktop/PlainNote/code/sencha/cordova/platforms/ios/build/emulator/Fly_dotREZ.ipa
info: [debug] Copying local zip to tmp dir
info: [debug] /Users/rajesh.madaswamy/Desktop/PlainNote/code/sencha/cordova/platforms/ios/build/emulator/Fly_dotREZ.ipa copied to /var/folders/mt/7w1_nx811y9cyx1778lqs_700000gq/T/115210-67883-1h28vtl/appium-app.zip
info: [debug] Unzipping /var/folders/mt/7w1_nx811y9cyx1778lqs_700000gq/T/115210-67883-1h28vtl/appium-app.zip
info: [debug] Testing zip archive: /var/folders/mt/7w1_nx811y9cyx1778lqs_700000gq/T/115210-67883-1h28vtl/appium-app.zip
info: [debug] Zip archive tested clean
info: [debug] Unzip successful
info: [debug] Using locally extracted app: /var/folders/mt/7w1_nx811y9cyx1778lqs_700000gq/T/115210-67883-1h28vtl/Payload/Fly dotREZ.app
info: [debug] Creating new appium session 709e3337-b330-4549-b6d0-eb10722cc83b
info: [debug] Removing any remaining instruments sockets
info: [debug] Cleaned up instruments socket /tmp/instruments_sock
info: [debug] Setting Xcode folder
info: [debug] Setting Xcode version
info: [debug] Setting iOS SDK Version
info: [debug] Getting sdk version from xcrun with a timeout
info: [debug] iOS SDK Version set to 7.0
info: [debug] Not checking whether simulator is available since we're on a real device
info: [debug] Detecting automation tracetemplate
info: [debug] Not auto-detecting udid, running on sim
info: [debug] Parsed app Info.plist (as binary)
info: [debug] Parsed app Localizable.strings
info: [debug] Creating instruments
info: [debug] Preparing uiauto bootstrap
info: [debug] Dynamic bootstrap dir: /Users/rajesh.madaswamy/Library/Application Support/appium/bootstrap
info: [debug] Dynamic env: {"nodePath":"/usr/local/bin/node","commandProxyClientPath":"/Users/rajesh.madaswamy/.npm-packages/lib/node_modules/appium/node_modules/appium-uiauto/bin/command-proxy-client.js","instrumentsSock":"/tmp/instruments_sock","interKeyDelay":null,"justLoopInfinitely":false,"autoAcceptAlerts":false,"autoDismissAlerts":false,"sendKeyStrategy":"grouped"}
info: [debug] Dynamic bootstrap code: // This file is automatically generated. D...ot manually modify!
info: [debug] Dynamic bootstrap path: /Users/rajesh.madaswamy/Library/Application Support/appium/bootstrap/bootstrap-b98646d39f6b505e.js
info: [debug] Reusing dynamic bootstrap: /Users/rajesh.madaswamy/Library/Application Support/appium/bootstrap/bootstrap-b98646d39f6b505e.js
info: [debug] Not setting device type since we're on a real device
info: [debug] Checking whether we need to set app preferences
info: [debug] Not setting iOS and app preferences since we're on a real device
info: [debug] Running ios sim reset flow
info: [debug] Killing the simulator process
info: [debug] Killall iPhoneSimulator
info: [debug] Killing any other simulator daemons
info: [debug] On a real device; cannot clean device state
info: [debug] Not setting locale because we're using a real device
info: [debug] No iOS / app preferences to set
info: [debug] Starting iOS device log capture via deviceconsole
info: [debug] Not pre-launching simulator
info: [debug] Creating iDevice object with udid 5f5e07c61ae3ad4f755801bd6336d21d90927095
info: [debug] Checking app install status using: /Users/rajesh.madaswamy/.npm-packages/lib/node_modules/appium/build/fruitstrap/fruitstrap isInstalled --id 5f5e07c61ae3ad4f755801bd6336d21d90927095 --bundle com.accenture.london.Voyage-Air
info: [debug] App is installed.
info: [debug] fullReset not requested. No need to install.
info: [debug] Starting command proxy.
info: [debug] Instruments socket server started at /tmp/instruments_sock
info: [debug] Starting instruments
info: [debug] Instruments is at: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments
info: Launching instruments
info: [debug] Attempting to run app on real device with UDID 5f5e07c61ae3ad4f755801bd6336d21d90927095
info: [debug] Spawning instruments with command: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate -D /tmp/appium-instruments/instrumentscli0.trace -w 5f5e07c61ae3ad4f755801bd6336d21d90927095 com.accenture.london.Voyage-Air -e UIASCRIPT "/Users/rajesh.madaswamy/Library/Application Support/appium/bootstrap/bootstrap-b98646d39f6b505e.js" -e UIARESULTSPATH /tmp/appium-instruments
info: [debug] And extra without-delay env: {}
info: [debug] And launch timeouts (in ms): {"global":90000}
info: [debug] [INST STDERR] 2015-03-10 17:30:06.747 instruments[67920:707] Failed to start Instruments daemon for 'iOS' on 'jitendra.k.dash’s iPhone (v7.1.2)' (The service is invalid.)
info: [debug] [INST STDERR] 2015-03-10 17:30:06.862 instruments[67920:2203] Failed to start Instruments daemon for 'iOS' on 'jitendra.k.dash’s iPhone (v7.1.2)' (The service is invalid.)
info: [debug] [INST STDERR] Instruments Trace Error : Failed to start trace.
info: [debug] [INSTSERVER] Instruments exited with code 253
info: [debug] Killall instruments
info: [debug] Instruments crashed on startup
info: [debug] Attempting to retry launching instruments, this is retry #1
info: [debug] Killall iPhoneSimulator
info: Launching instruments
info: [debug] Attempting to run app on real device with UDID 5f5e07c61ae3ad4f755801bd6336d21d90927095
info: [debug] Spawning instruments with command: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate -D /tmp/appium-instruments/instrumentscli0.trace -w 5f5e07c61ae3ad4f755801bd6336d21d90927095 com.accenture.london.Voyage-Air -e UIASCRIPT "/Users/rajesh.madaswamy/Library/Application Support/appium/bootstrap/bootstrap-b98646d39f6b505e.js" -e UIARESULTSPATH /tmp/appium-instruments
info: [debug] And extra without-delay env: {}
info: [debug] And launch timeouts (in ms): {"global":90000}
info: [debug] [INST STDERR] 2015-03-10 17:30:13.444 instruments[67923:707] Failed to start Instruments daemon for 'iOS' on 'jitendra.k.dash’s iPhone (v7.1.2)' (The service is invalid.)
info: [debug] [INST STDERR] 2015-03-10 17:30:13.555 instruments[67923:2003] Failed to start Instruments daemon for 'iOS' on 'jitendra.k.dash’s iPhone (v7.1.2)' (The service is invalid.)
info: [debug] [INST STDERR] Instruments Trace Error : Failed to start trace.
info: [debug] [INSTSERVER] Instruments exited with code 253
info: [debug] Killall instruments
info: [debug] Instruments crashed on startup
info: [debug] Attempting to retry launching instruments, this is retry #2
info: [debug] Killall iPhoneSimulator
info: Launching instruments
info: [debug] Attempting to run app on real device with UDID 5f5e07c61ae3ad4f755801bd6336d21d90927095
info: [debug] Spawning instruments with command: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate -D /tmp/appium-instruments/instrumentscli0.trace -w 5f5e07c61ae3ad4f755801bd6336d21d90927095 com.accenture.london.Voyage-Air -e UIASCRIPT "/Users/rajesh.madaswamy/Library/Application Support/appium/bootstrap/bootstrap-b98646d39f6b505e.js" -e UIARESULTSPATH /tmp/appium-instruments
info: [debug] And extra without-delay env: {}
info: [debug] And launch timeouts (in ms): {"global":90000}
info: [debug] [INST STDERR] 2015-03-10 17:30:20.152 instruments[67927:707] Failed to start Instruments daemon for 'iOS' on 'jitendra.k.dash’s iPhone (v7.1.2)' (The service is invalid.)
info: [debug] [INST STDERR] 2015-03-10 17:30:20.253 instruments[67927:3f03] Failed to start Instruments daemon for 'iOS' on 'jitendra.k.dash’s iPhone (v7.1.2)' (The service is invalid.)
info: [debug] [INST STDERR] Instruments Trace Error : Failed to start trace.
info: [debug] [INSTSERVER] Instruments exited with code 253
info: [debug] Killall instruments
info: [debug] Instruments crashed on startup
info: [debug] Attempting to retry launching instruments, this is retry #3
info: [debug] Killall iPhoneSimulator
info: Launching instruments
info: [debug] Attempting to run app on real device with UDID 5f5e07c61ae3ad4f755801bd6336d21d90927095
info: [debug] Spawning instruments with command: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate -D /tmp/appium-instruments/instrumentscli0.trace -w 5f5e07c61ae3ad4f755801bd6336d21d90927095 com.accenture.london.Voyage-Air -e UIASCRIPT "/Users/rajesh.madaswamy/Library/Application Support/appium/bootstrap/bootstrap-b98646d39f6b505e.js" -e UIARESULTSPATH /tmp/appium-instruments
info: [debug] And extra without-delay env: {}
info: [debug] And launch timeouts (in ms): {"global":90000}
info: [debug] [INST STDERR] 2015-03-10 17:30:26.840 instruments[67930:707] Failed to start Instruments daemon for 'iOS' on 'jitendra.k.dash’s iPhone (v7.1.2)' (The service is invalid.)
info: [debug] [INST STDERR] 2015-03-10 17:30:26.952 instruments[67930:3827] Failed to start Instruments daemon for 'iOS' on 'jitendra.k.dash’s iPhone (v7.1.2)' (The service is invalid.)
info: [debug] [INST STDERR] Instruments Trace Error : Failed to start trace.
info: [debug] [INSTSERVER] Instruments exited with code 253
info: [debug] Killall instruments
info: [debug] Instruments crashed on startup
info: [debug] We exceeded the number of retries allowed for instruments to successfully start; failing launch
info: [debug] Stopping iOS log capture
info: [debug] Running ios sim reset flow
info: [debug] Killing the simulator process
info: [debug] Killall iPhoneSimulator
info: [debug] Killing any other simulator daemons
info: [debug] On a real device; cannot clean device state
info: [debug] Cleaning up appium session
error: Failed to start an Appium session, err was: Error: Instruments crashed on startup
info: [debug] Error: Instruments crashed on startup
at Instruments.onInstrumentsExit (/Users/rajesh.madaswamy/.npm-packages/lib/node_modules/appium/node_modules/appium-instruments/lib/instruments.js:389:31)
at null.<anonymous> (/Users/rajesh.madaswamy/.npm-packages/lib/node_modules/appium/node_modules/appium-instruments/lib/instruments.js:308:12)
at ChildProcess.emit (events.js:110:17)
at Process.ChildProcess._handle.onexit (child_process.js:1067:12)
info: [debug] Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: Instruments crashed on startup)","origValue":"Instruments crashed on startup"},"sessionId":null}
info: <-- POST /wd/hub/session 500 24889.612 ms - 182
The problem was that I did not have the appium instruments node package installed. Once I installed it the crash went away. Check that you have the appium-instruments node package installed:
npm install appium-instruments
Few things to keep in mind while running in real device:
1)No simulator should be opened.
2)Make sure the .app file which you are using is build for real device(take the help of developer to find it out)
3)Pass correct udid and bundle id.
4)If you are getting error like app installed failed or something like that then try to do pass app path from appium gui and other parameters from your code i.e. device name , platform capabilities; trying these different combinations do help sometimes.

How to Run Appium on ios Simulator 8.x/7.x

I am trying to do the automation using Appium on ios simulators.
My config is:
OS version: 10.10.x
Appium: 1.4.0
Xcode: 6.3.2
and caps for appium is:
automationName = "Appium"
platformName = "iOS"
platformVersion = "8.3"
deviceName = "iPhone 5s"
app = "/Users/skaram200/Desktop/ios_build/XfinityMyAccount_6.3.app"
When I run the appium it is giving me an error:
info: [debug] Attempting to run app on iPhone 5s (8.3 Simulator)
info: [debug] Spawning instruments with command: /Applications/xcode6.3/Xcode6.3.2.app/Contents/Developer/usr/bin/instruments -t /Applications/xcode6.3/Xcode6.3.2.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.xrplugin/Contents/Resources/Automation.tracetemplate -D /tmp/appium-instruments/instrumentscli0.trace -w "iPhone 5s (8.3 Simulator)" /Users/skaram200/Desktop/ios_build/XfinityMyAccount_6.3.app -e UIASCRIPT "/Users/skaram200/Library/Application Support/appium/bootstrap/bootstrap-4d92d75355d74eeb.js" -e UIARESULTSPATH /tmp/appium-instruments
info: [debug] And extra without-delay env: {"DYLD_INSERT_LIBRARIES":"/Users/skaram200/Documents/workspace/appium_1/node_modules/appium-instruments/thirdparty/iwd6/InstrumentsShim.dylib","LIB_PATH":"/Users/skaram200/Documents/workspace/appium_1/node_modules/appium-instruments/thirdparty/iwd6"}
info: [debug] And launch timeouts (in ms): {"global":90000}
info: [debug] [INST STDERR] 2015-09-10 10:47:20.672 instruments[36855:1272282] WebKit Threading Violation - initial use of WebKit from a secondary thread.
info: [debug] [INST] Waiting for device to boot...
info: [debug] [INST STDERR] Instruments Trace Error : Target failed to run: Unable to install app with path: /Users/skaram200/Desktop/ios_build/XfinityMyAccount_6.3.app: "(null)"
info: [debug] [INSTSERVER] Instruments exited with code 253
info: [debug] Killall instruments
info: [debug] Instruments crashed on startup
info: [debug] We exceeded the number of retries allowed for instruments to successfully start; failing launch
info: [debug] Stopping iOS log capture
info: [debug] Running ios sim reset flow
info: [debug] Killing the simulator process
info: [debug] Killing any other simulator daemons
info: [debug] Killall iOS Simulator
info: [debug] Cleaning sim data files
info: Executing: xcrun simctl erase F54870E7-17FD-4A07-B6EE-1636F6AB5757 with timeout 2000
info: Executing: xcrun simctl erase F54870E7-17FD-4A07-B6EE-1636F6AB5757 with timeout 2000
info: [debug] Cleaning app data files
warn: Applications directory /Users/skaram200/Library/Developer/CoreSimulator/Devices/F54870E7-17FD-4A07-B6EE-1636F6AB5757/data/Applications doesn't exist. Have you run this simulator before?
info: Couldn't find app directories to delete. Probably it's not installed
info: [debug] Cleaning up appium session
error: Failed to start an Appium session, err was: Error: Instruments crashed on startup
info: [debug] Error: Instruments crashed on startup
at [object Object].Instruments.onInstrumentsExit (/Users/skaram200/Documents/workspace/appium_1/node_modules/appium-instruments/lib/instruments.js:440:31)
at [object Object].<anonymous> (/Users/skaram200/Documents/workspace/appium_1/node_modules/appium-instruments/lib/instruments.js:353:12)
at ChildProcess.emit (events.js:110:17)
at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
info: [debug] Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: Instruments crashed on startup)","origValue":"Instruments crashed on startup"},"sessionId":null}
```
Please let me know, how can I resolve these errors and start automating on ios simulators using appium.
Here you need to pass the --default-device or -dd as true for simulators and need to specify the --bundleID of the app. And we need to have debug .ipa or .app file to do automation.
Creating a successfull Build without an error.
I'm using Cordova, got some issues with that as well, this is what Idid in order to generate the .app:
cordova build ios --emulator
That's it, after that I was able to use Appium and push the .app to the simulator.
I hope it helps somebody else!

Able to start appium inspector and run the app over simulator using a .app file, but unable to do the same through a .ipa file over a real device

I have no idea what went wrong, we were able to install the application on the iOS device before, but I changed my mac, and the error started appearing.
So I have no problems with running appium and the inspector over simulators using the .app file. The issue is only with trying to have appium run over real devices.
I tried with a ipa that is of ad-hoc build, and .app files that were done with developer provisioning.
Im able to install the app over X-Code, but if I Run the same over appium, it gives either a fruitstrap crash error, and if the app is already installed on to the device and appium is run, it gives a "error: Failed to start an Appium session, err was: Error: Instruments crashed on startup". and the app starts up and closes instantly.
I have read almost all stack overflow pages on the error, and none of the solutions seem to help me solve this. :(
Error if app is already installed on the device :-
![Launching Appium with command: '/Applications/Appium.app/Contents/Resources/node/bin/node' lib/server/main.js --command-timeout "7200" --platform-version "8.3" --platform-name "iOS" --app "com.indecomm.literaturelibrary" --udid "5fcdd3078c081abb666330066681c5f0c55d2a08" --device-name "Rohan"
info: Welcome to Appium v1.3.7 (REV 72fbfaa116d3d9f6a862600ee99cf02f6d0e2182)
info: Appium REST http interface listener started on 0.0.0.0:4723
info: \[debug\] Non-default server args: {"app":"com.indecomm.literaturelibrary","udid":"5fcdd3078c081abb666330066681c5f0c55d2a08","deviceName":"Rohan","platformName":"iOS","platformVersion":"8.3","defaultCommandTimeout":7200}
info: Console LogLevel: debug
info: --> GET /wd/hub/status {}
info: \[debug\] Responding to client with success: {"status":0,"value":{"build":{"version":"1.3.7","revision":"72fbfaa116d3d9f6a862600ee99cf02f6d0e2182"}}}
info: <-- GET /wd/hub/status 200 10.052 ms - 104 {"status":0,"value":{"build":{"version":"1.3.7","revision":"72fbfaa116d3d9f6a862600ee99cf02f6d0e2182"}}}
info: --> GET /wd/hub/status {}
info: \[debug\] Responding to client with success: {"status":0,"value":{"build":{"version":"1.3.7","revision":"72fbfaa116d3d9f6a862600ee99cf02f6d0e2182"}}}
info: <-- GET /wd/hub/status 200 5.375 ms - 104 {"status":0,"value":{"build":{"version":"1.3.7","revision":"72fbfaa116d3d9f6a862600ee99cf02f6d0e2182"}}}
info: --> GET /wd/hub/sessions {}
info: \[debug\] Responding to client with success: {"status":0,"value":\[\]}
info: <-- GET /wd/hub/sessions 200 1.032 ms - 23 {"status":0,"value":\[\]}
info: --> POST /wd/hub/session {"desiredCapabilities":{"platformName":"iOS","platformVersion":"8.3","newCommandTimeout":"999999","automationName":"Appium","deviceName":"Rohan"}}
info: Client User-Agent string: Appium (unknown version) CFNetwork/720.3.13 Darwin/14.3.0 (x86_64)
info: \[debug\] App is an iOS bundle, will attempt to run as pre-existing
info: \[debug\] Creating new appium session 371dbdd4-3129-40ee-b102-4048d0ee998f
info: \[debug\] Removing any remaining instruments sockets
info: \[debug\] Cleaned up instruments socket /tmp/instruments_sock
info: \[debug\] Setting Xcode folder
info: \[debug\] Setting Xcode version
info: \[debug\] Setting iOS SDK Version
info: \[debug\] Getting sdk version from xcrun with a timeout
info: \[debug\] iOS SDK Version set to 8.3
info: \[debug\] Not checking whether simulator is available since we're on a real device
info: \[debug\] Detecting automation tracetemplate
info: \[debug\] Not auto-detecting udid, running on sim
info: \[debug\] Could not parse plist file (as binary) at /Applications/Appium.app/Contents/Resources/node_modules/appium/com.indecomm.literaturelibrary/en.lproj/Localizable.strings
info: Will try to parse the plist file as XML
info: \[debug\] Could not parse plist file (as XML) at /Applications/Appium.app/Contents/Resources/node_modules/appium/com.indecomm.literaturelibrary/en.lproj/Localizable.strings
warn: Could not parse app Localizable.strings assuming it doesn't exist
info: \[debug\] Creating instruments
info: On some xcode 6 platforms, instruments-without-delay does not work. If you experience this, you will need to re-run appium with the --native-instruments-lib flag
info: \[debug\] Preparing uiauto bootstrap
info: \[debug\] Dynamic bootstrap dir: /Users/rohanganapathy/Library/Application Support/appium/bootstrap
info: \[debug\] Dynamic env: {"nodePath":"/Applications/Appium.app/Contents/Resources/node/bin/node","commandProxyClientPath":"/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-uiauto/bin/command-proxy-client.js","instrumentsSock":"/tmp/instruments_sock","interKeyDelay":null,"justLoopInfinitely":false,"autoAcceptAlerts":false,"autoDismissAlerts":false,"sendKeyStrategy":"grouped"}
info: \[debug\] Dynamic bootstrap code: // This file is automatically generated. Do not manually modify!
...
info: \[debug\] Dynamic bootstrap path: /Users/rohanganapathy/Library/Application Support/appium/bootstrap/bootstrap-d5a0fb924946d8d3.js
info: \[debug\] Reusing dynamic bootstrap: /Users/rohanganapathy/Library/Application Support/appium/bootstrap/bootstrap-d5a0fb924946d8d3.js
info: \[debug\] Getting device string from opts: {"forceIphone":false,"forceIpad":false,"xcodeVersion":"6.3.1","iOSSDKVersion":"8.3","deviceName":"Rohan","platformVersion":"8.3"}
info: \[debug\] fixDevice is on
info: \[debug\] Final device string is: 'Rohan (8.3 Simulator)'
info: \[debug\] Not setting device type since we're on a real device
info: \[debug\] Checking whether we need to set app preferences
info: \[debug\] Not setting iOS and app preferences since we're on a real device
info: \[debug\] Running ios sim reset flow
info: \[debug\] Killing the simulator process
info: \[debug\] Killall iOS Simulator
info: \[debug\] Killing any other simulator daemons
info: \[debug\] On a real device; cannot clean device state
info: \[debug\] Not setting locale because we're using a real device
info: \[debug\] No iOS / app preferences to set
info: \[debug\] Starting iOS device log capture via deviceconsole
info: \[debug\] Not pre-launching simulator
info: \[debug\] Creating iDevice object with udid 5fcdd3078c081abb666330066681c5f0c55d2a08
info: \[debug\] Checking app install status using: /Applications/Appium.app/Contents/Resources/node_modules/appium/build/fruitstrap/fruitstrap isInstalled --id 5fcdd3078c081abb666330066681c5f0c55d2a08 --bundle com.indecomm.literaturelibrary
info: \[debug\] App is installed.
info: \[debug\] fullReset not requested. No need to install.
info: \[debug\] Starting command proxy.
info: \[debug\] Instruments socket server started at /tmp/instruments_sock
info: \[debug\] Starting instruments
info: \[debug\] Instruments is at: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments
info: Launching instruments
info: \[debug\] Attempting to run app on real device with UDID 5fcdd3078c081abb666330066681c5f0c55d2a08
info: \[debug\] Spawning instruments with command: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.xrplugin/Contents/Resources/Automation.tracetemplate -D /tmp/appium-instruments/instrumentscli0.trace -w 5fcdd3078c081abb666330066681c5f0c55d2a08 com.indecomm.literaturelibrary -e UIASCRIPT "/Users/rohanganapathy/Library/Application Support/appium/bootstrap/bootstrap-d5a0fb924946d8d3.js" -e UIARESULTSPATH /tmp/appium-instruments
info: \[debug\] And extra without-delay env: {}
info: \[debug\] And launch timeouts (in ms): {"global":90000}
info: \[debug\] \[INST STDERR\] 2015-05-13 12:35:32.683 instruments\[10692:1844813\] WebKit Threading Violation - initial use of WebKit from a secondary thread.
info: \[debug\] \[INST STDERR\] Instruments Trace Error : Target failed to run: Permission to debug com.indecomm.literaturelibrary was denied. The app must be signed with a development identity (e.g. iOS Developer).
info: \[debug\] \[INSTSERVER\] Instruments exited with code 253
info: \[debug\] Killall instruments
info: \[debug\] Instruments crashed on startup
info: \[debug\] Attempting to retry launching instruments, this is retry #1
info: \[debug\] Killall iOS Simulator
info: --> GET /wd/hub/status {}
info: \[debug\] Responding to client with success: {"status":0,"value":{"build":{"version":"1.3.7","revision":"72fbfaa116d3d9f6a862600ee99cf02f6d0e2182"},"isShuttingDown":false},"sessionId":"371dbdd4-3129-40ee-b102-4048d0ee998f"}
info: <-- GET /wd/hub/status 200 1.113 ms - 178 {"status":0,"value":{"build":{"version":"1.3.7","revision":"72fbfaa116d3d9f6a862600ee99cf02f6d0e2182"},"isShuttingDown":false},"sessionId":"371dbdd4-3129-40ee-b102-4048d0ee998f"}
info: Launching instruments
info: \[debug\] Attempting to run app on real device with UDID 5fcdd3078c081abb666330066681c5f0c55d2a08
info: \[debug\] Spawning instruments with command: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.xrplugin/Contents/Resources/Automation.tracetemplate -D /tmp/appium-instruments/instrumentscli0.trace -w 5fcdd3078c081abb666330066681c5f0c55d2a08 com.indecomm.literaturelibrary -e UIASCRIPT "/Users/rohanganapathy/Library/Application Support/appium/bootstrap/bootstrap-d5a0fb924946d8d3.js" -e UIARESULTSPATH /tmp/appium-instruments
info: \[debug\] And extra without-delay env: {}
info: \[debug\] And launch timeouts (in ms): {"global":90000}
info: \[debug\] \[INST STDERR\] 2015-05-13 12:35:38.992 instruments\[10695:1844869\] WebKit Threading Violation - initial use of WebKit from a secondary thread.
info: \[debug\] \[INST STDERR\] Instruments Trace Error : Target failed to run: Permission to debug com.indecomm.literaturelibrary was denied. The app must be signed with a development identity (e.g. iOS Developer).
info: \[debug\] \[INSTSERVER\] Instruments exited with code 253
info: \[debug\] Killall instruments
info: \[debug\] Instruments crashed on startup
info: \[debug\] Attempting to retry launching instruments, this is retry #2
info: \[debug\] Killall iOS Simulator
info: Launching instruments
info: \[debug\] Attempting to run app on real device with UDID 5fcdd3078c081abb666330066681c5f0c55d2a08
info: \[debug\] Spawning instruments with command: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.xrplugin/Contents/Resources/Automation.tracetemplate -D /tmp/appium-instruments/instrumentscli0.trace -w 5fcdd3078c081abb666330066681c5f0c55d2a08 com.indecomm.literaturelibrary -e UIASCRIPT "/Users/rohanganapathy/Library/Application Support/appium/bootstrap/bootstrap-d5a0fb924946d8d3.js" -e UIARESULTSPATH /tmp/appium-instruments
info: \[debug\] And extra without-delay env: {}
info: \[debug\] And launch timeouts (in ms): {"global":90000}
info: \[debug\] \[INST STDERR\] 2015-05-13 12:35:44.997 instruments\[10698:1844942\] WebKit Threading Violation - initial use of WebKit from a secondary thread.
info: \[debug\] \[INST STDERR\] Instruments Trace Error : Target failed to run: Permission to debug com.indecomm.literaturelibrary was denied. The app must be signed with a development identity (e.g. iOS Developer).
info: \[debug\] \[INSTSERVER\] Instruments exited with code 253
info: \[debug\] Killall instruments
info: \[debug\] Instruments crashed on startup
info: \[debug\] Attempting to retry launching instruments, this is retry #3
info: \[debug\] Killall iOS Simulator
info: Launching instruments
info: \[debug\] Attempting to run app on real device with UDID 5fcdd3078c081abb666330066681c5f0c55d2a08
info: \[debug\] Spawning instruments with command: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.xrplugin/Contents/Resources/Automation.tracetemplate -D /tmp/appium-instruments/instrumentscli0.trace -w 5fcdd3078c081abb666330066681c5f0c55d2a08 com.indecomm.literaturelibrary -e UIASCRIPT "/Users/rohanganapathy/Library/Application Support/appium/bootstrap/bootstrap-d5a0fb924946d8d3.js" -e UIARESULTSPATH /tmp/appium-instruments
info: \[debug\] And extra without-delay env: {}
info: \[debug\] And launch timeouts (in ms): {"global":90000}
info: \[debug\] \[INST STDERR\] 2015-05-13 12:35:51.316 instruments\[10701:1845063\] WebKit Threading Violation - initial use of WebKit from a secondary thread.
info: \[debug\] \[INST STDERR\] Instruments Trace Error : Target failed to run: Permission to debug com.indecomm.literaturelibrary was denied. The app must be signed with a development identity (e.g. iOS Developer).
info: \[debug\] \[INSTSERVER\] Instruments exited with code 253
info: \[debug\] Killall instruments
info: \[debug\] Instruments crashed on startup
info: \[debug\] We exceeded the number of retries allowed for instruments to successfully start; failing launch
info: \[debug\] Stopping iOS log capture
info: \[debug\] Running ios sim reset flow
info: \[debug\] Killing the simulator process
info: \[debug\] Killall iOS Simulator
info: \[debug\] Killing any other simulator daemons
info: \[debug\] On a real device; cannot clean device state
info: \[debug\] Cleaning up appium session
info: \[debug\] Error: Instruments crashed on startup
at Instruments.onInstrumentsExit (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-instruments/lib/instruments.js:389:31)
at null.<anonymous> (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-instruments/lib/instruments.js:308:12)
at ChildProcess.emit (events.js:110:17)
at Process.ChildProcess._handle.onexit (child_process.js:1067:12)
info: \[debug\] Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: Instruments crashed on startup)","origValue":"Instruments crashed on startup"},"sessionId":null}
error: Failed to start an Appium session, err was: Error: Instruments crashed on startup
info: <-- POST /wd/hub/session 500 21928.427 ms - 182
info: --> GET /wd/hub/status {}
info: \[debug\] Responding to client with success: {"status":0,"value":{"build":{"version":"1.3.7","revision":"72fbfaa116d3d9f6a862600ee99cf02f6d0e2182"}}}
info: <-- GET /wd/hub/status 200 1.723 ms - 104 {"status":0,"value":{"build":{"version":"1.3.7","revision":"72fbfaa116d3d9f6a862600ee99cf02f6d0e2182"}}}
info: --> GET /wd/hub/status {}
info: \[debug\] Responding to client with success: {"status":0,"value":{"build":{"version":"1.3.7","revision":"72fbfaa116d3d9f6a862600ee99cf02f6d0e2182"}}}
info: <-- GET /wd/hub/status 200 1.344 ms - 104 {"status":0,"value":{"build":{"version":"1.3.7","revision":"72fbfaa116d3d9f6a862600ee99cf02f6d0e2182"}}}
info: --> GET /wd/hub/status {}
info: \[debug\] Responding to client with success: {"status":0,"value":{"build":{"version":"1.3.7","revision":"72fbfaa116d3d9f6a862600ee99cf02f6d0e2182"}}}
info: <-- GET /wd/hub/status 200 1.144 ms - 104 {"status":0,"value":{"build":{"version":"1.3.7","revision":"72fbfaa116d3d9f6a862600ee99cf02f6d0e2182"}}}
info: --> GET /wd/hub/status {}
info: \[debug\] Responding to client with success: {"status":0,"value":{"build":{"version":"1.3.7","revision":"72fbfaa116d3d9f6a862600ee99cf02f6d0e2182"}}}
info: <-- GET /wd/hub/status 200 1.039 ms - 104 {"status":0,"value":{"build":{"version":"1.3.7","revision":"72fbfaa116d3d9f6a862600ee99cf02f6d0e2182"}}}
info: --> GET /wd/hub/status {}
info: \[debug\] Responding to client with success: {"status":0,"value":{"build":{"version":"1.3.7","revision":"72fbfaa116d3d9f6a862600ee99cf02f6d0e2182"}}}
info: <-- GET /wd/hub/status 200 1.202 ms - 104 {"status":0,"value":{"build":{"version":"1.3.7","revision":"72fbfaa116d3d9f6a862600ee99cf02f6d0e2182"}}}
info: --> GET /wd/hub/status {}
info: \[debug\] Responding to client with success: {"status":0,"value":{"build":{"version":"1.3.7","revision":"72fbfaa116d3d9f6a862600ee99cf02f6d0e2182"}}}
info: <-- GET /wd/hub/status 200 1.082 ms - 104 {"status":0,"value":{"build":{"version":"1.3.7","revision":"72fbfaa116d3d9f6a862600ee99cf02f6d0e2182"}}}
`][1]
Error if app is not installed in the device:-
Launching Appium with command: '/Applications/Appium.app/Contents/Resources/node/bin/node' lib/server/main.js --command-timeout "7200" --platform-version "8.3" --platform-name "iOS" --app "com.indecomm.literaturelibrary" --udid "5fcdd3078c081abb666330066681c5f0c55d2a08" --device-name "Rohan"
info: Welcome to Appium v1.3.7 (REV 72fbfaa116d3d9f6a862600ee99cf02f6d0e2182)
info: Appium REST http interface listener started on 0.0.0.0:4723
info: [debug] Non-default server args: {"app":"com.indecomm.literaturelibrary","udid":"5fcdd3078c081abb666330066681c5f0c55d2a08","deviceName":"Rohan","platformName":"iOS","platformVersion":"8.3","defaultCommandTimeout":7200}
info: Console LogLevel: debug
info: --> GET /wd/hub/status {}
info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.3.7","revision":"72fbfaa116d3d9f6a862600ee99cf02f6d0e2182"}}}
info: <-- GET /wd/hub/status 200 11.393 ms - 104 {"status":0,"value":{"build":{"version":"1.3.7","revision":"72fbfaa116d3d9f6a862600ee99cf02f6d0e2182"}}}
info: --> GET /wd/hub/status {}
info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.3.7","revision":"72fbfaa116d3d9f6a862600ee99cf02f6d0e2182"}}}
info: <-- GET /wd/hub/status 200 3.277 ms - 104 {"status":0,"value":{"build":{"version":"1.3.7","revision":"72fbfaa116d3d9f6a862600ee99cf02f6d0e2182"}}}
info: --> GET /wd/hub/sessions {}
info: [debug] Responding to client with success: {"status":0,"value":[]}
info: <-- GET /wd/hub/sessions 200 1.075 ms - 23 {"status":0,"value":[]}
info: --> POST /wd/hub/session {"desiredCapabilities":{"platformName":"iOS","platformVersion":"8.3","newCommandTimeout":"999999","automationName":"Appium","deviceName":"Rohan"}}
info: Client User-Agent string: Appium (unknown version) CFNetwork/720.3.13 Darwin/14.3.0 (x86_64)
info: [debug] App is an iOS bundle, will attempt to run as pre-existing
info: [debug] Creating new appium session 9fd1be4f-aaeb-41c9-afd2-6947fa91babf
info: [debug] Removing any remaining instruments sockets
info: [debug] Cleaned up instruments socket /tmp/instruments_sock
info: [debug] Setting Xcode folder
info: [debug] Setting Xcode version
info: [debug] Setting iOS SDK Version
info: [debug] Getting sdk version from xcrun with a timeout
info: [debug] iOS SDK Version set to 8.3
info: [debug] Not checking whether simulator is available since we're on a real device
info: [debug] Detecting automation tracetemplate
info: [debug] Not auto-detecting udid, running on sim
info: [debug] Could not parse plist file (as binary) at /Applications/Appium.app/Contents/Resources/node_modules/appium/com.indecomm.literaturelibrary/en.lproj/Localizable.strings
info: Will try to parse the plist file as XML
info: [debug] Could not parse plist file (as XML) at /Applications/Appium.app/Contents/Resources/node_modules/appium/com.indecomm.literaturelibrary/en.lproj/Localizable.strings
warn: Could not parse app Localizable.strings assuming it doesn't exist
info: [debug] Creating instruments
info: On some xcode 6 platforms, instruments-without-delay does not work. If you experience this, you will need to re-run appium with the --native-instruments-lib flag
info: [debug] Preparing uiauto bootstrap
info: [debug] Dynamic bootstrap dir: /Users/rohanganapathy/Library/Application Support/appium/bootstrap
info: [debug] Dynamic env: {"nodePath":"/Applications/Appium.app/Contents/Resources/node/bin/node","commandProxyClientPath":"/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-uiauto/bin/command-proxy-client.js","instrumentsSock":"/tmp/instruments_sock","interKeyDelay":null,"justLoopInfinitely":false,"autoAcceptAlerts":false,"autoDismissAlerts":false,"sendKeyStrategy":"grouped"}
info: [debug] Dynamic bootstrap code: // This file is automatically generated. Do not manually modify!
...
info: [debug] Dynamic bootstrap path: /Users/rohanganapathy/Library/Application Support/appium/bootstrap/bootstrap-d5a0fb924946d8d3.js
info: [debug] Reusing dynamic bootstrap: /Users/rohanganapathy/Library/Application Support/appium/bootstrap/bootstrap-d5a0fb924946d8d3.js
info: [debug] Getting device string from opts: {"forceIphone":false,"forceIpad":false,"xcodeVersion":"6.3.1","iOSSDKVersion":"8.3","deviceName":"Rohan","platformVersion":"8.3"}
info: [debug] fixDevice is on
info: [debug] Final device string is: 'Rohan (8.3 Simulator)'
info: [debug] Not setting device type since we're on a real device
info: [debug] Checking whether we need to set app preferences
info: [debug] Not setting iOS and app preferences since we're on a real device
info: [debug] Running ios sim reset flow
info: [debug] Killing the simulator process
info: [debug] Killall iOS Simulator
info: [debug] Killing any other simulator daemons
info: [debug] On a real device; cannot clean device state
info: [debug] Not setting locale because we're using a real device
info: [debug] No iOS / app preferences to set
info: [debug] Starting iOS device log capture via deviceconsole
info: [debug] Not pre-launching simulator
info: [debug] Creating iDevice object with udid 5fcdd3078c081abb666330066681c5f0c55d2a08
info: [debug] Checking app install status using: /Applications/Appium.app/Contents/Resources/node_modules/appium/build/fruitstrap/fruitstrap isInstalled --id 5fcdd3078c081abb666330066681c5f0c55d2a08 --bundle com.indecomm.literaturelibrary
info: [debug] App is not installed. Will try to install the app.
info: [debug] Installing app using cmd: /Applications/Appium.app/Contents/Resources/node_modules/appium/build/fruitstrap/fruitstrap install --id 5fcdd3078c081abb666330066681c5f0c55d2a08 --bundle "com.indecomm.literaturelibrary"
info: [debug] Cleaning up appium session
info: [debug] Error: Unable to install [com.indecomm.literaturelibrary] to device with id [5fcdd3078c081abb666330066681c5f0c55d2a08]. Error [Error: Command failed: /bin/sh -c /Applications/Appium.app/Contents/Resources/node_modules/appium/build/fruitstrap/fruitstrap install --id 5fcdd3078c081abb666330066681c5f0c55d2a08 --bundle "com.indecomm.literaturelibrary"
Assertion failed: (access(app_path, F_OK) == 0), function main, file fruitstrap.c, line 718.
]
at /Applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/common.js:147:10
at ChildProcess.exithandler (child_process.js:751:5)
at ChildProcess.emit (events.js:110:17)
at maybeClose (child_process.js:1008:16)
at Socket.<anonymous> (child_process.js:1176:11)
at Socket.emit (events.js:107:17)
at Pipe.close (net.js:476:12)
info: [debug] Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: Unable to install [com.indecomm.literaturelibrary] to device with id [5fcdd3078c081abb666330066681c5f0c55d2a08]. Error [Error: Command failed: /bin/sh -c /Applications/Appium.app/Contents/Resources/node_modules/appium/build/fruitstrap/fruitstrap install --id 5fcdd3078c081abb666330066681c5f0c55d2a08 --bundle \"com.indecomm.literaturelibrary\"\nAssertion failed: (access(app_path, F_OK) == 0), function main, file fruitstrap.c, line 718.\n])","origValue":"Unable to install [com.indecomm.literaturelibrary] to device with id [5fcdd3078c081abb666330066681c5f0c55d2a08]. Error [Error: Command failed: /bin/sh -c /Applications/Appium.app/Contents/Resources/node_modules/appium/build/fruitstrap/fruitstrap install --id 5fcdd3078c081abb666330066681c5f0c55d2a08 --bundle \"com.indecomm.literaturelibrary\"\nAssertion failed: (access(app_path, F_OK) == 0), function main, file fruitstrap.c, line 718.\n]"},"sessionId":null}
error: Failed to start an Appium session, err was: Error: Unable to install [com.indecomm.literaturelibrary] to device with id [5fcdd3078c081abb666330066681c5f0c55d2a08]. Error [Error: Command failed: /bin/sh -c /Applications/Appium.app/Contents/Resources/node_modules/appium/build/fruitstrap/fruitstrap install --id 5fcdd3078c081abb666330066681c5f0c55d2a08 --bundle "com.indecomm.literaturelibrary"
Assertion failed: (access(app_path, F_OK) == 0), function main, file fruitstrap.c, line 718.
]
info: <-- POST /wd/hub/session 500 2729.320 ms - 1002
info: --> GET /wd/hub/status {}
info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.3.7","revision":"72fbfaa116d3d9f6a862600ee99cf02f6d0e2182"}}}
info: <-- GET /wd/hub/status 200 1.394 ms - 104 {"status":0,"value":{"build":{"version":"1.3.7","revision":"72fbfaa116d3d9f6a862600ee99cf02f6d0e2182"}}}
info: --> GET /wd/hub/status {}
The issue is that the app must be signed with a developer profile for it to work on real ios devices.I had faced the same issue and it works after signing it with a development profile(u can get one from apple dev site for $99).
info: \[debug\] \[INST STDERR\] Instruments Trace Error : Target failed to run: Permission to debug com.indecomm.literaturelibrary was denied. The app must be signed with a development identity (e.g. iOS Developer).
pls refer to this for further details https://discuss.appium.io/t/the-app-must-be-signed-with-a-development-identity/2653

Appium Running Safari on a Real iOS Device~ Instruments Usage Error : Specified target process is invalid: {}

So I am running Appium and trying to get Safari to launch on a real iOS device.
When I run my tests I am getting the following in the Appium logs.
info: Launching instruments
info: [debug] Attempting to run app on real device with UDID
0d0404b24f2fad46051111d56d811d900cb2a762
info: [debug] Spawning instruments with command:
/Applications/Xcode.app/Contents/Developer/usr/bin/instruments -t
/Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.xrplugin/Contents/Resources/Automation.tracetemplate
-D /tmp/appium-instruments/instrumentscli0.trace -w 0d0404b24f2fad46051111d56d811d900cb2a762 {} -e UIASCRIPT
"/Users/trent/Library/Application
Support/appium/bootstrap/bootstrap-2911698fabce8e2c.js" -e
UIARESULTSPATH /tmp/appium-instruments info: [debug] And extra
without-delay env: {} info: [debug] And launch timeouts (in ms):
{"global":20000}
info: [IOS_SYSLOG_ROW ] Mar 19 21:28:24 iPad2 kernel[0] :
flow_divert_token_set (0): Failed to get the key unit from the token:
22
info: [IOS_SYSLOG_ROW ] Mar 19 21:28:24 iPad2 lockdownd[26] :
Could not set socket option SO_OPPORTUNISTIC: Invalid argument
info: [IOS_SYSLOG_ROW ] Mar 19 21:28:24 iPad2 kernel[0] :
flow_divert_token_set (0): Failed to get the key unit from the token:
22
info: [IOS_SYSLOG_ROW ] Mar 19 21:28:24 iPad2 lockdownd[26] :
Could not set socket option SO_OPPORTUNISTIC: Invalid argument
info: [IOS_SYSLOG_ROW ] Mar 19 21:28:24 iPad2 kernel[0] :
flow_divert_token_set (0): Failed to get the key unit from the token:
22
info: [IOS_SYSLOG_ROW ] Mar 19 21:28:24 iPad2 lockdownd[26] :
Could not set socket option SO_OPPORTUNISTIC: Invalid argument
info: [debug] [INST STDERR] Instruments Usage Error : Specified target
process is invalid: {}
info: [debug] [INST STDERR] instruments, version 6.1 (56160) usage:
instruments [-t template] [-D document] [-l timeLimit] [-i #] [-w
device] [[-p pid] | [application [-e variable value] [argument ...]]]
info: [debug] [INSTSERVER] Instruments exited with code 255 info:
[debug] Killall instruments info: [debug] Instruments crashed on
startup info: [debug] Attempting to retry launching instruments, this
is retry #2 info: [debug] Killall iOS Simulator

Instruments crashed at start up

I am running appium server 1.2 at MAC OS 10.8.X and appis installed on real iOs device Iphone 5.
When I try to run the test script, it gives me the following error.
info: [debug] App is installed.
info: [debug] fullReset not requested. No need to install.
info: [debug] Starting command proxy.
info: [debug] Instruments socket server started at /tmp/instruments_sock
info: [debug] Starting instruments
info: [debug] Instruments is at: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments
info: Launching instruments
info: [debug] Attempting to run app on real device with UDID 1d30758b4d21c267fb261c47d52b1e393357367e
info: [debug] Spawning instruments with command: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate -D /tmp/appium-instruments/instrumentscli0.trace -w 1d30758b4d21c267fb261c47d52b1e393357367e com.equinix.ecpnewappdistribution -e UIASCRIPT "/Users/anujtomar/Library/Application Support/appium/bootstrap/bootstrap-0943baae6b1d6f5b.js" -e UIARESULTSPATH /tmp/appium-instruments
info: [debug] And extra without-delay env: {}
info: [debug] And launch timeouts (in ms): {"global":90000}
info: [debug] [INST STDERR] 2014-12-10 15:18:14.827 instruments[6611:707] Failed to start Instruments daemon for 'iOS' on 'Equinix's iPhone (v8.0.2)' (The service is invalid.)
info: [debug] [INST STDERR] 2014-12-10 15:18:14.954 instruments[6611:2203] Failed to start Instruments daemon for 'iOS' on 'Equinix's iPhone (v8.0.2)' (The service is invalid.)
info: [debug] [INSTSERVER] Instruments exited with code 253
info: [debug] Killall instruments
How can I fix this?
The problem seems to be with device. Try below steps:
Open Xcode
Goto Window
Organizer
Under you device name goto Console.
Clear the the console.
And then run test cases again.
Hope that helps !!!
I also faced a similar problem and none of the above techniques worked.
However I was able to run appium by doing the following changes in the setting
choose xcode instruments
choose automation
Look for options and select allow device for automation
A window comes up asking for permission. Select 'okay' and you should be able to run appium now

Resources