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

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

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.

Appium on iOS Instruments Crash and Application is crashing

I am trying to automate a scenario where i launch an app on ios Device(can be either simulator or Real Device). The app is getting installed on the Device, but it is crashing and launching. I have set the all the required capabilities and i am launching my code from Eclipse Mars version.
I am getting this error, and app is crashing.
(Original error: Instruments crashed on startup)","origValue":"Instruments crashed on startup"},"sessionId":null}
Please find the Capabilities set on device
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability("platformVersion", "9.1");
capabilities.setCapability("deviceName","iPhone 6s Plus");
capabilities.setCapability("platformName","iOS");
capabilities.setCapability("bundleId","com.quinnox.EnterpriseCycleCounting");
capabilities.setCapability("app","/Users/rohinic/Downloads/ComEdApp.ipa");
capabilities.setCapability("fullReset",true);
capabilities.setCapability("launchTimeout","900000");
driver = new IOSDriver<WebElement>(new URL("http://0.0.0.0:4723/wd/hub"),capabilities);
The Complete appium log from start to end is as follows,
Launching Appium with command: '/Applications/Appium.app/Contents/Resources/node/bin/node' lib/server/main.js --command-timeout "7200" --debug-log-spacing --platform-version "8.4" --platform-name "iOS" --default-device
info: Welcome to Appium v1.4.13 (REV c75d8adcb66a75818a542fe1891a34260c21f76a)
info: Appium REST http interface listener started on 0.0.0.0:4723
info: [debug] Non-default server args: {"platformName":"iOS","platformVersion":"8.4","defaultDevice":true,"defaultCommandTimeout":7200,"debugLogSpacing":true}
info: Console LogLevel: debug
info: --> POST /wd/hub/session {"desiredCapabilities":{"app":"/Users/rohinic/Downloads/ComEdApp.ipa","nativeInstrumentsLib":true,"platformVersion":"9.1","bundleId":"com.quinnox.EnterpriseCycleCounting","platformName":"iOS","deviceName":"iPhone 6s Plus","fullReset":true,"launchTimeout":900000}}
info: Client User-Agent string: Apache-HttpClient/4.3.3 (java 1.5)
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: **** NEW SESSION ***
info: **** NEW SESSION ***
info: **** NEW SESSION ***
info: **** NEW SESSION ***
info: **** NEW SESSION ***
info: **** NEW SESSION ***
info: **** NEW SESSION ***
info: **** NEW SESSION ***
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: [debug] Using local .ipa from desired caps: /Users/rohinic/Downloads/ComEdApp.ipa
info: [debug] Copying local zip to tmp dir
info: [debug] /Users/rohinic/Downloads/ComEdApp.ipa copied to /var/folders/y_/rh25732s5pl00xxr9s99yybh0000gq/T/116116-5001-qlbbdy/appium-app.zip
info: [debug] Unzipping /var/folders/y_/rh25732s5pl00xxr9s99yybh0000gq/T/116116-5001-qlbbdy/appium-app.zip
info: [debug] Testing zip archive: /var/folders/y_/rh25732s5pl00xxr9s99yybh0000gq/T/116116-5001-qlbbdy/appium-app.zip
info: [debug] Zip archive tested clean
info: [debug] Unzip successful
info: [debug] Using locally extracted app: /var/folders/y_/rh25732s5pl00xxr9s99yybh0000gq/T/116116-5001-qlbbdy/Payload/ComEdApp.app
info: [debug] Creating new appium session b976d2cd-1a6e-4b96-805c-16ccb15d1576
info: [debug] Removing any remaining instruments sockets
info: [debug] Cleaned up instruments socket /tmp/instruments_sock
info: [debug] Setting Xcode version
info: [debug] Xcode version set to 7.2.1
info: [debug] Setting iOS SDK Version
info: [debug] iOS SDK Version set to 9.2
info: [debug] Checking whether instruments supports our device string
info: [debug] Getting list of devices instruments supports
info: [debug] Instruments is at: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments
info: [debug] Getting device string from opts: {"forceIphone":false,"forceIpad":false,"xcodeVersion":"7.2.1","iOSSDKVersion":"9.2","deviceName":"iPhone 6s Plus","platformVersion":"9.1"}
info: [debug] fixDevice is on
info: [debug] Final device string is: 'iPhone 6s Plus (9.1)'
info: [debug] iOS sim UDID is 0C8498DB-281C-49D4-A81D-0049133A28C5
info: [debug] Auto-detecting iOS udid...
info: [debug] Not auto-detecting udid, running on sim
info: [debug] Could not parse plist file (as binary) at /var/folders/y_/rh25732s5pl00xxr9s99yybh0000gq/T/116116-5001-qlbbdy/Payload/ComEdApp.app/en.lproj/Localizable.strings
info: Will try to parse the plist file as XML
info: [debug] Could not parse plist file (as XML) at /var/folders/y_/rh25732s5pl00xxr9s99yybh0000gq/T/116116-5001-qlbbdy/Payload/ComEdApp.app/en.lproj/Localizable.strings
warn: Could not parse app Localizable.strings assuming it doesn't exist
info: [debug] Creating instruments
info: [debug] Preparing uiauto bootstrap
info: [debug] Dynamic bootstrap dir: /Users/rohinic/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/submodules/appium-uiauto/bin/command-proxy-client.js","instrumentsSock":"/tmp/instruments_sock","interKeyDelay":null,"justLoopInfinitely":false,"autoAcceptAlerts":false,"autoDismissAlerts":false,"sendKeyStrategy":"oneByOne"}
info: [debug] Dynamic bootstrap code: // This file is automatically generated. Do not manually modify!
info: [debug] Dynamic bootstrap path: /Users/rohinic/Library/Application Support/appium/bootstrap/bootstrap-f062718992d59810.js
info: [debug] Reusing dynamic bootstrap: /Users/rohinic/Library/Application Support/appium/bootstrap/bootstrap-f062718992d59810.js
info: [debug] Getting device string from opts: {"forceIphone":false,"forceIpad":false,"xcodeVersion":"7.2.1","iOSSDKVersion":"9.2","deviceName":"iPhone 6s Plus","platformVersion":"9.1"}
info: [debug] fixDevice is on
info: [debug] Final device string is: 'iPhone 6s Plus (9.1)'
info: [debug] We're on iOS7.1+ so forcing defaultDevice on
info: [debug] Getting device string from opts: {"forceIphone":false,"forceIpad":false,"xcodeVersion":"7.2.1","iOSSDKVersion":"9.2","deviceName":"iPhone 6s Plus","platformVersion":"9.1"}
info: [debug] fixDevice is on
info: [debug] Final device string is: 'iPhone 6s Plus (9.1)'
info: [debug] Could not parse plist file (as binary) at /var/folders/y_/rh25732s5pl00xxr9s99yybh0000gq/T/116116-5001-qlbbdy/Payload/ComEdApp.app/Info.plist
info: Will try to parse the plist file as XML
info: [debug] Parsed app Info.plist (as XML)
info: [debug] Wrote new app Info.plist with device type
info: [debug] Checking whether we need to set app preferences
info: [debug] Running ios sim reset flow
info: [debug] Killing the simulator process
info: [debug] Killing any other simulator daemons
info: [debug] Cleaning sim data files
info: node-simctl: Executing: xcrun with args: simctl erase 0C8498DB-281C-49D4-A81D-0049133A28C5 and timeout: 2000
info: [debug] Killall iOS Simulator
info: [debug] Cleaning app data files
warn: Applications directory /Users/rohinic/Library/Developer/CoreSimulator/Devices/0C8498DB-281C-49D4-A81D-0049133A28C5/data/Containers/Data/Application doesn't exist. Have you run this simulator before?
warn: Applications directory /Users/rohinic/Library/Developer/CoreSimulator/Devices/0C8498DB-281C-49D4-A81D-0049133A28C5/data/Containers/Bundle/Application doesn't exist. Have you run this simulator before?
info: Couldn't find app directories to delete. Probably it's not installed
info: [debug] Resetting Content and Settings for Simulator
info: node-simctl: Executing: xcrun with args: simctl erase 0C8498DB-281C-49D4-A81D-0049133A28C5 and timeout: 2000
info: [debug] Not setting locale
info: [debug] No iOS / app preferences to set
info: [debug] Starting iOS 8.* simulator log capture
info: [debug] Not pre-launching simulator
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 iPhone 6s Plus (9.1)
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 "iPhone 6s Plus (9.1)" /var/folders/y_/rh25732s5pl00xxr9s99yybh0000gq/T/116116-5001-qlbbdy/Payload/ComEdApp.app -e UIASCRIPT "/Users/rohinic/Library/Application Support/appium/bootstrap/bootstrap-f062718992d59810.js" -e UIARESULTSPATH /tmp/appium-instruments
info: [debug] And extra without-delay env: {}
info: [debug] And launch timeouts (in ms): {"global":900000}
info: [debug] [INST] Waiting for device to boot...
info: [debug] [INST STDERR] 2016-02-16 20:02:58.934 instruments[5040:85669] WebKit Threading Violation - initial use of WebKit from a secondary thread.
info: [debug] [INST STDERR] 2016-02-16 20:03:44.216 instruments[5040:86416] Attempting to change event horizon while disengage
info: [debug] [INST STDERR] 2016-02-16 20:03:44.217 instruments[5040:86958] Attempting to change event horizon while disengage
info: [debug] [INST STDERR] Instruments Trace Error : Target failed to run: The operation couldn’t be completed. (FBSOpenApplicationErrorDomain error 1.) : Failed to launch process with bundle identifier 'com.quinnox.EnterpriseCycleCounting'
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: Launching instruments
info: [debug] Attempting to run app on iPhone 6s Plus (9.1)
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 "iPhone 6s Plus (9.1)" /var/folders/y_/rh25732s5pl00xxr9s99yybh0000gq/T/116116-5001-qlbbdy/Payload/ComEdApp.app -e UIASCRIPT "/Users/rohinic/Library/Application Support/appium/bootstrap/bootstrap-f062718992d59810.js" -e UIARESULTSPATH /tmp/appium-instruments
info: [debug] And extra without-delay env: {}
info: [debug] And launch timeouts (in ms): {"global":900000}
info: [debug] [INST STDERR] 2016-02-16 20:03:52.554 instruments[5155:87070] WebKit Threading Violation - initial use of WebKit from a secondary thread.
info: [debug] [INST STDERR] 2016-02-16 20:03:58.268 instruments[5155:87128] Attempting to change event horizon while disengage
info: [debug] [INST STDERR] 2016-02-16 20:03:58.268 instruments[5155:87129] Attempting to change event horizon while disengage
info: [debug] [INST STDERR] Instruments Trace Error : Target failed to run: The operation couldn’t be completed. (FBSOpenApplicationErrorDomain error 1.) : Failed to launch process with bundle identifier 'com.quinnox.EnterpriseCycleCounting'
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 iPhone 6s Plus (9.1)
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 "iPhone 6s Plus (9.1)" /var/folders/y_/rh25732s5pl00xxr9s99yybh0000gq/T/116116-5001-qlbbdy/Payload/ComEdApp.app -e UIASCRIPT "/Users/rohinic/Library/Application Support/appium/bootstrap/bootstrap-f062718992d59810.js" -e UIARESULTSPATH /tmp/appium-instruments
info: [debug] And extra without-delay env: {}
info: [debug] And launch timeouts (in ms): {"global":900000}
info: [debug] [INST STDERR] 2016-02-16 20:04:06.714 instruments[5179:87396] WebKit Threading Violation - initial use of WebKit from a secondary thread.
info: [debug] [INST STDERR] 2016-02-16 20:04:12.090 instruments[5179:87332] Attempting to change event horizon while disengage
info: [debug] [INST STDERR] 2016-02-16 20:04:12.090 instruments[5179:87401] Attempting to change event horizon while disengage
info: [debug] [INST STDERR] Instruments Trace Error : Target failed to run: The operation couldn’t be completed. (FBSOpenApplicationErrorDomain error 1.) : Failed to launch process with bundle identifier 'com.quinnox.EnterpriseCycleCounting'
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 iPhone 6s Plus (9.1)
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 "iPhone 6s Plus (9.1)" /var/folders/y_/rh25732s5pl00xxr9s99yybh0000gq/T/116116-5001-qlbbdy/Payload/ComEdApp.app -e UIASCRIPT "/Users/rohinic/Library/Application Support/appium/bootstrap/bootstrap-f062718992d59810.js" -e UIARESULTSPATH /tmp/appium-instruments
info: [debug] And extra without-delay env: {}
info: [debug] And launch timeouts (in ms): {"global":900000}
info: [debug] [INST STDERR] 2016-02-16 20:04:19.058 instruments[5203:87596] WebKit Threading Violation - initial use of WebKit from a secondary thread.
info: [debug] [INST STDERR] 2016-02-16 20:04:24.402 instruments[5203:87596] Attempting to change event horizon while disengage
info: [debug] [INST STDERR] 2016-02-16 20:04:24.402 instruments[5203:87621] Attempting to change event horizon while disengage
info: [debug] [INST STDERR] Instruments Trace Error : Target failed to run: The operation couldn’t be completed. (FBSOpenApplicationErrorDomain error 1.) : Failed to launch process with bundle identifier 'com.quinnox.EnterpriseCycleCounting'
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: node-simctl: Executing: xcrun with args: simctl erase 0C8498DB-281C-49D4-A81D-0049133A28C5 and timeout: 2000
info: node-simctl: Executing: xcrun with args: simctl erase 0C8498DB-281C-49D4-A81D-0049133A28C5 and timeout: 2000
info: node-simctl: Executing: xcrun with args: simctl erase 0C8498DB-281C-49D4-A81D-0049133A28C5 and timeout: 2000
info: node-simctl: Executing: xcrun with args: simctl erase 0C8498DB-281C-49D4-A81D-0049133A28C5 and timeout: 2000
info: [debug] Cleaning app data files
warn: Applications directory /Users/rohinic/Library/Developer/CoreSimulator/Devices/0C8498DB-281C-49D4-A81D-0049133A28C5/data/Containers/Data/Application doesn't exist. Have you run this simulator before?
warn: Applications directory /Users/rohinic/Library/Developer/CoreSimulator/Devices/0C8498DB-281C-49D4-A81D-0049133A28C5/data/Containers/Bundle/Application doesn't exist. Have you run this simulator before?
info: Couldn't find app directories to delete. Probably it's not installed
info: [debug] Resetting Content and Settings for Simulator
info: node-simctl: Executing: xcrun with args: simctl erase 0C8498DB-281C-49D4-A81D-0049133A28C5 and timeout: 2000
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 (/Applications/Appium.app/Contents/Resources/node_modules/appium/submodules/appium-instruments/lib/instruments.js:440:31) at [object Object].<anonymous> (/Applications/Appium.app/Contents/Resources/node_modules/appium/submodules/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 99826.842 ms - 182
Kindly help me in automating this script. Thank you:)

Appium failed to start iOS simulator when running test from jenkins. Instruments exited with code 255

I am currently working on building a test automation framework for iOS using Appium. In my framework, I start the Appium server from inside the code before the test suite started (#BeforeSuite).
When I run the test manually using command:
mvn clean test #... and so on the Appium are able to start the simulator and start the test normally. But when I start the test using Jenkins with same goal and options like on the terminal, it's not working and stuck on staring Simulator.
here is my Appium server script:
#!/bin/bash
NODE='/Applications/Appium.app/Contents/Resources/node/bin/node'
APPIUM='/Applications/Appium.app/Contents/Resources/node_modules/appium/bin/appium.js'
PORT=5000
ADDR=127.0.0.1
LOGDIR=~/log
LOGFILE=$LOGDIR/appium.log
DEVICE=$(idevice_id -l |head -1)
mkdir -p $LOGDIR
function startAppium() {
SCRIPT="$NODE $APPIUM"
SCRIPT="$SCRIPT --address $ADDR \
--port $PORT \
--native-instruments-lib \
--session-override \
--backend-retries 10 \
--debug-log-spacing \
--full-reset \
--debug-log-spacing \
--command-timeout 90 \
-g $LOGFILE \
--launch-timeout 500000"
echo "Running: $SCRIPT"
$SCRIPT >> /dev/null &
}
startAppium 2>/dev/null >>/dev/null &
sleep 5
Here is the Appium logs snippet when starting from jenkins, when it try to start the instruments:
2016-02-25 09:56:03:175 - info: [debug] Starting instruments
2016-02-25 09:56:03:183 - info: [debug] Instruments is at: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments
2016-02-25 09:56:03:184 - info: Launching instruments
2016-02-25 09:56:03:204 - info: [debug] Attempting to run app on iPhone 5 (9.0)
2016-02-25 09:56:03:205 - 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 "iPhone 5 (9.0)" /Users/Shared/Jenkins/AUT/iOS/Live-release.app -e UIASCRIPT "/Users/Shared/Jenkins/Library/Application Support/appium/bootstrap/bootstrap-f062718992d59810.js" -e UIARESULTSPATH /tmp/appium-instruments
2016-02-25 09:56:03:205 - info: [debug] And extra without-delay env: {}
2016-02-25 09:56:03:205 - info: [debug] And launch timeouts (in ms): {"global":500000}
2016-02-25 09:56:03:986 - info: [debug] [INST] Waiting for device to boot...
2016-02-25 09:56:34:536 - info: [debug] [INST STDERR] Instruments Usage Error : Timed out waiting for device to boot: "iPhone 5 (9.0)"
2016-02-25 09:56:34:546 - info: [debug] [INSTSERVER] Instruments exited with code 255
2016-02-25 09:56:34:546 - info: [debug] Killall instruments
2016-02-25 09:56:34:548 - info: [debug] Instruments crashed on startup
2016-02-25 09:56:34:548 - info: [debug] Attempting to retry launching instruments, this is retry #1
2016-02-25 09:56:34:549 - info: [debug] Killall iOS Simulator
2016-02-25 09:56:39:554 - info: Launching instruments
2016-02-25 09:56:39:555 - info: [debug] Attempting to run app on iPhone 5 (9.0)
...
and so on...
system.log output every time Appium trying to restart the simulator:
Feb 25 16:56:39 --- last message repeated 1 time ---
Feb 25 16:56:39 MyMac-Mac-mini.local instruments[27594]: Failed to initialize IconCache named: com.apple.iconservices with error: Error Domain=NSCocoaErrorDomain Code=4097 "Couldn’t communicate with a helper application." (connection to service named com.apple.iconservices) UserInfo=0x7fc51bc29af0 {NSDebugDescription=connection to service named com.apple.iconservices}
Feb 25 16:56:39 MyMac-Mac-mini.local instruments[27594]: Error returned from iconservicesagent: Error Domain=NSCocoaErrorDomain Code=4097 "Couldn’t communicate with a helper application." (connection to service named com.apple.iconservices) UserInfo=0x7fc51be0c8a0 {NSDebugDescription=connection to service named com.apple.iconservices}
Feb 25 16:56:39 MyMac-Mac-mini com.apple.xpc.launchd[1] (com.apple.StreamingUnzipService): The _DirtyJetsamPriority key is not available on this platform.
Feb 25 16:56:39 MyMac-Mac-mini com.apple.xpc.launchd[1] (com.apple.StreamingUnzipService): The _DirtyJetsamMemoryLimit key is not available on this platform.
Feb 25 16:56:39 MyMac-Mac-mini com.apple.xpc.launchd[1] (com.apple.imfoundation.IMRemoteURLConnectionAgent): The _DirtyJetsamMemoryLimit key is not available on this platform.
Feb 25 16:56:39 MyMac-Mac-mini com.apple.xpc.launchd[1] (com.apple.StreamingUnzipService): The _DirtyJetsamPriority key is not available on this platform.
Feb 25 16:56:39 MyMac-Mac-mini com.apple.xpc.launchd[1] (com.apple.StreamingUnzipService): The _DirtyJetsamMemoryLimit key is not available on this platform.
Feb 25 16:56:39 MyMac-Mac-mini.local com.apple.SecurityServer[80]: Session 100074 created
Feb 25 16:56:39 MyMac-Mac-mini.local com.apple.SecurityServer[80]: Killing auth hosts
Feb 25 16:56:39 MyMac-Mac-mini.local com.apple.SecurityServer[80]: Session 100073 destroyed
Feb 25 16:56:39 MyMac-Mac-mini.local instruments[27594]: DTServiceHubClient: connected to server (singleton pid: 27595, initial pid: 27595)
Feb 25 16:56:40 MyMac-Mac-mini.local instruments[27594]: enumerate proxied devices: true
Feb 25 16:56:40 MyMac-Mac-mini com.apple.xpc.launchd[1] (com.apple.xpc.launchd.domain.system): Caller not allowed to perform action: instruments.27594, action = service submission, code = 1: Operation not permitted, uid = 247, euid = 247, gid = 1, egid = 1, asid = 100003
Feb 25 16:56:50 MyMac-Mac-mini.local mds[61]: (DiskStore.Normal:2382) d001 1.000014
I am curious about the logs on system.log: Caller not allowed to perform action: instruments.27594, action = service submission, code = 1: Operation not permitted, uid = 247, euid = 247, gid = 1, egid = 1, asid = 100003
Is there any different permission when starting the maven script from Jenkin than from terminal??
FYI: Jenkins are started with the current logged in user (jenkins), and the process owner when I check it is the same user too.
I have also try to start the command which provided on appium logs:
/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 "iPhone 5 (9.0)" /Users/Shared/Jenkins/AUT/iOS/Live-release.app -e UIASCRIPT "/Users/Shared/Jenkins/Library/Application Support/appium/bootstrap/bootstrap-f062718992d59810.js" -e UIARESULTSPATH /tmp/appium-instruments
I have try to run it manually and from inside jenkins too, and when started manually on terminal, the simulator started normally, but it wont boot when the script run from jenkins.
System info:
OSX 10.10.5
XCode Version: 7.2
XCode command line tools path: /Applications/Xcode.app/Contents/Developer
instruments, version 7.2 (59503)
Appium version: 1.4.13 (latest Appium)
Jenkins Version: Jenkins ver. 1.634
Any clue or answer will really helpful.
Thank you.

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

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

Not able to automate iOS Hybrid mobile app using protractor

I am trying to automate an hybrid ios app using Appium and Protractor. I have installed appium 1.3.4 and xcode 6.1. While ruuning the protractor scripts displays error below. Kindly help. I have Enable UIAutomation from iPhone Developer option. Appium Logs ::
info: Welcome to Appium v1.3.4 (REV c8c79a85fbd6870cd6fc3d66d038a115ebe22efe)
info: Appium REST http interface listener started on 0.0.0.0:4723
info: [debug] Non-default server args: {"app":"/Users/qualcomm/Desktop/bhawani/AbbVieCareCH.app","ipa":"/Users/qualcomm/Desktop/bhawani/abbvieCH-dev-01.01.21050131.01.ipa","udid":"cbecb05c855c13d9b2e6b693999123268fc0b966"}
info: Console LogLevel: debug
info: --> POST /wd/hub/session {"desiredCapabilities":{"browserName":"iOS","appium-version":"1.3.4","platformName":"iOS","platformVersion":8.1,"deviceName":"iPhone6","autoWebview":true,"count":1}}
info: Client User-Agent string: undefined
info: [debug] The following desired capabilities were provided, but not recognized by appium. They will be passed on to any other services running on this server. : appium-version, count
info: [debug] Using local app from command line: /Users/qualcomm/Desktop/bhawani/AbbVieCareCH.app
info: [debug] Creating new appium session ca2a0eb0-f7cf-47f6-b960-93f447bb3010
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.1
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] Getting bundle ID from app
info: [debug] Parsed app Info.plist (as binary)
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/qualcomm/Library/Application Support/appium/bootstrap
info: [debug] Dynamic env: {"nodePath":"/usr/local/bin/node","commandProxyClientPath":"/usr/local/lib/node_modules/appium/node_modules/appium-uiauto/bin/command-proxy-client.js","instrumentsSock":"/tmp/instruments_sock","interKeyDelay":null,"justLoopInfinitely":false,"autoAcceptAlerts":false,"sendKeyStrategy":"grouped"}
info: [debug] Dynamic bootstrap code: // This file is automatically generated. D...ot manually modify!
info: [debug] Dynamic bootstrap path: /Users/qualcomm/Library/Application Support/appium/bootstrap/bootstrap-d0f21a5b61bb08af.js
info: [debug] Reusing dynamic bootstrap: /Users/qualcomm/Library/Application Support/appium/bootstrap/bootstrap-d0f21a5b61bb08af.js
info: [debug] Getting device string from opts: {"forceIphone":false,"forceIpad":false,"xcodeVersion":"6.1.1","iOSSDKVersion":"8.1","deviceName":"iPhone6","platformVersion":8.1}
info: [debug] fixDevice is on
info: [debug] Final device string is: 'iPhone6 (8.1 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 cbecb05c855c13d9b2e6b693999123268fc0b966
info: [debug] Checking app install status using: /usr/local/lib/node_modules/appium/build/fruitstrap/fruitstrap isInstalled --id cbecb05c855c13d9b2e6b693999123268fc0b966 --bundle com.qcl.qualcomm.healthycircles.dev
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 cbecb05c855c13d9b2e6b693999123268fc0b966
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 cbecb05c855c13d9b2e6b693999123268fc0b966 -e UIASCRIPT "/Users/qualcomm/Library/Application Support/appium/bootstrap/bootstrap-d0f21a5b61bb08af.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-02 18:05:17.723 instruments[12882:123318] WebKit Threading Violation - initial use of WebKit from a secondary thread.
info: [debug] [INST STDERR] Instruments Trace Error : Target failed to run: The operation couldn’t be completed. (FBSOpenApplicationErrorDomain error 3.) : Failed to launch process with bundle identifier 'com...'
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: Launching instruments
info: [debug] Attempting to run app on real device with UDID cbecb05c855c13d9b2e6b693999123268fc0b966
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 cbecb05c855c13d9b2e6b693999123268fc0b966 -e UIASCRIPT "/Users/qualcomm/Library/Application Support/appium/bootstrap/bootstrap-d0f21a5b61bb08af.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-02 18:05:25.309 instruments[12885:123423] WebKit Threading Violation - initial use of WebKit from a secondary thread.
info: [debug] [INST STDERR] Instruments Trace Error : Target failed to run: The operation couldn’t be completed. (FBSOpenApplicationErrorDomain error 3.) : Failed to launch process with bundle identifier 'com...'
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 cbecb05c855c13d9b2e6b693999123268fc0b966
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 cbecb05c855c13d9b2e6b693999123268fc0b966 -e UIASCRIPT "/Users/qualcomm/Library/Application Support/appium/bootstrap/bootstrap-d0f21a5b61bb08af.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-02 18:05:31.499 instruments[12888:123447] WebKit Threading Violation - initial use of WebKit from a secondary thread.
info: [debug] [INST STDERR] Instruments Trace Error : Target failed to run: The operation couldn’t be completed. (FBSOpenApplicationErrorDomain error 3.) : Failed to launch process with bundle identifier 'com.qcl.qualcomm.healthycircles.dev'
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 cbecb05c855c13d9b2e6b693999123268fc0b966
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 cbecb05c855c13d9b2e6b693999123268fc0b966 -e UIASCRIPT "/Users/qualcomm/Library/Application Support/appium/bootstrap/bootstrap-d0f21a5b61bb08af.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-02 18:05:37.696 instruments[12891:123507] WebKit Threading Violation - initial use of WebKit from a secondary thread.
info: [debug] [INST STDERR] Instruments Trace Error : Target failed to run: The operation couldn’t be completed. (FBSOpenApplicationErrorDomain error 3.) : Failed to launch process with bundle identifier 'com...'
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
error: Failed to start an Appium session, err was: Error: Instruments crashed on startup
info: [debug] Error: Instruments crashed on startup
at Instruments.onInstrumentsExit (/usr/local/lib/node_modules/appium/node_modules/appium-instruments/lib/instruments.js:387:31)
at null.<anonymous> (/usr/local/lib/node_modules/appium/node_modules/appium-instruments/lib/instruments.js:308:12)
at ChildProcess.emit (events.js:98:17)
at Process.ChildProcess._handle.onexit (child_process.js:810: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 25043.363 ms - 182
Thanks,

Resources