A new session could not be created. Instruments crashed on startup

I am getting below error message while running appium for iOS.

A new session could not be created. (Original error: Instruments crashed on startup)",“origValue”:“Instruments crashed on startup”},“sessionId”:null}

iOS device used: iphone 5C
OS version: 8.2

Hi @Nikunj_Agarwal

Refer the link and make sure those thing are satisfied
http://appium.io/slate/en/1.5/?java#appium-on-real-ios-devices

Checked…Everything is included. Any other workaround?

Could you provide Appium log

info: --> POST /wd/hub/session {“desiredCapabilities”:{“app”:"/Users/xxxxxxxxxxx/Downloads/XXXXXXXX.ipa",“platformVersion”:“8.2”,“autoDismissAlerts”:true,“platformName”:“iOS”,“udid”:“XXXXXxxxxxxxxxxxxxxxxxx”,“locationServicesEnabled”:true,“deviceName”:“iPhone”,“fullReset”:true}}
info: Client User-Agent string: Apache-HttpClient/4.3.3 (java 1.5)
info: [debug] Using local .ipa from desired caps: /Users/xxxxxxxxxxx/Downloads/XXXXXXXX.ipa
info: [debug] Copying local zip to tmp dir
info: [debug] /Users/xxxxxxxxxxx/Downloads/XXXXXXXX.ipa copied to /var/folders/g8/_154rv4n0yd8x64rxkmx2pxdx184ml/T/116012-495-1xbc7py/appium-app.zip
info: [debug] Unzipping /var/folders/g8/_154rv4n0yd8x64rxkmx2pxdx184ml/T/116012-495-1xbc7py/appium-app.zip
info: [debug] Testing zip archive: /var/folders/g8/_154rv4n0yd8x64rxkmx2pxdx184ml/T/116012-495-1xbc7py/appium-app.zip
info: [debug] Zip archive tested clean
info: [debug] Unzip successful
info: [debug] Using locally extracted app: /var/folders/g8/_154rv4n0yd8x64rxkmx2pxdx184ml/T/116012-495-1xbc7py/Payload/XXXXXXXX-Debug.app
info: [debug] Creating new appium session 840892c3-84af-4f41-8f13-1e8132095d54
info: [debug] Removing any remaining instruments sockets
info: [debug] Cleaned up instruments socket /tmp/instruments_sock
info: [debug] Auto-detecting iOS udid…
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] Could not parse plist file (as binary) at /var/folders/g8/_154rv4n0yd8x64rxkmx2pxdx184ml/T/116012-495-1xbc7py/Payload/XXXXXXXX-Debug.app/Info.plist
info: Will try to parse the plist file as XML
info: [debug] Parsed app Info.plist (as XML)
info: [debug] Creating instruments
info: [debug] Preparing uiauto bootstrap
info: [debug] Dynamic bootstrap dir: /Users/xxxxxxxxxxx/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”:true,“sendKeyStrategy”:“grouped”}
info: [debug] Dynamic bootstrap code: // This file is automatically generated. D…ot manually modify!
info: [debug] Dynamic bootstrap path: /Users/xxxxxxxxxxx/Library/Application Support/appium/bootstrap/bootstrap-59137a69b9fc7a3c.js
info: [debug] Reusing dynamic bootstrap: /Users/xxxxxxxxxxx/Library/Application Support/appium/bootstrap/bootstrap-59137a69b9fc7a3c.js
info: [debug] Attempting iOS device log capture via libimobiledevice idevicesyslog
info: [debug] Creating iDevice object with udid XXXXXxxxxxxxxxxxxxxxxxx
info: [debug] App is not installed. Will try to install the app.
info: [debug] Installing ipa found at /Users/xxxxxxxxxxx/Downloads/XXXXXXXX.ipa
info: [debug] Nothing found on device, going ahead and installing.
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 XXXXXxxxxxxxxxxxxxxxxxx
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 XXXXXxxxxxxxxxxxxxxxxxx XXXXXXXX.XXXXXXXX.1 -e UIASCRIPT “/Users/xxxxxxxxxxx/Library/Application Support/appium/bootstrap/bootstrap-59137a69b9fc7a3c.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] 2016-01-12 12:17:23.170 instruments[547:5588] Failed to start Instruments daemon on ‘iPhone (8.2)’ (The service is invalid.)
info: [debug] [INST STDERR] Instruments Usage Error : Specified target process is invalid: XXXXXXXX.XXXXXXXX.1
info: [debug] [INST STDERR] instruments, version 7.2 (59503)
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 #1
info: [debug] Killall iOS Simulator
info: Launching instruments
info: [debug] Attempting to run app on real device with UDID XXXXXxxxxxxxxxxxxxxxxxx
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 XXXXXxxxxxxxxxxxxxxxxxx XXXXXXXX.XXXXXXXX.1 -e UIASCRIPT “/Users/xxxxxxxxxxx/Library/Application Support/appium/bootstrap/bootstrap-59137a69b9fc7a3c.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] 2016-01-12 12:17:28.771 instruments[555:5679] Failed to start Instruments daemon on ‘iPhone (8.2)’ (The service is invalid.)
info: [debug] [INST STDERR] Instruments Usage Error : Specified target process is invalid: XXXXXXXXXXX.1
instruments, version 7.2 (59503)
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

Check Setting > Developer > Enable UI Automation is enabled

I was getting this error when the checkbox to use native library was uncheked.
In appium, Go to iOS settings, select Advanced tab and check the check box to use native instruments library.

After this checkbox was checked I did not face this issue.

Please use this setting your issue should be resolved.

Thanks. It’s working now.

thanks @asjadtariq your solution worked for me