Instruments crashed on startup when running tests on iOS 8.2

Hi,
Previously I’m able to run my tests against IOS real devices (IOS version 7.1.1) without any problem. However when I tried to run the tests against IOS version 8.2, I got the following error:

error: Failed to start an Appium session, err was: Error: Instruments crashed on startup
info: [debug] Error: Instruments crashed on startup

I am just wondering is it a bug in Appium version 1.3.7? I tried running Appium from source (latest version 1.40) but it doesnt work either. :frowning:

I have enabled “UI Automation” setting on my iOS device 8.2.

My environments are:

Appium version = 1.3.7 (running using appium &)
Xcode = 5.1.1
Mac = 10.9.5

***************** FULL LOGS HERE ***************
Welcome to Appium v1.3.7 (REV 72fbfaa116d3d9f6a862600ee99cf02f6d0e2182)
info: Appium REST http interface listener started on 0.0.0.0:4723
info: Console LogLevel: debug
info: --> POST /wd/hub/session {“desiredCapabilities”:{“platformName”:“ios”,“deviceName”:“Burberry iphone 6”,“udid”:“8b7b0d23bbbe13b42ad71dbb95c7664a248cc49c”,“app”:“Safari”,“platformVersion”:“8.2”}}
info: Client User-Agent string: Ruby
info: [debug] Configuring Safari session
info: [debug] Using local .zip from desired caps: /usr/local/lib/node_modules/appium/build/SafariLauncher/SafariLauncher.zip
info: [debug] Copying local zip to tmp dir
info: [debug] /usr/local/lib/node_modules/appium/build/SafariLauncher/SafariLauncher.zip copied to /var/folders/b9/8b7t1gz538j6714r67890tnjd51cz8/T/115329-18762-dju4g5/appium-app.zip
info: [debug] Unzipping /var/folders/b9/8b7t1gz538j6714r67890tnjd51cz8/T/115329-18762-dju4g5/appium-app.zip
info: [debug] Testing zip archive: /var/folders/b9/8b7t1gz538j6714r67890tnjd51cz8/T/115329-18762-dju4g5/appium-app.zip
info: [debug] Zip archive tested clean
info: [debug] Unzip successful
info: [debug] Using locally extracted app: /var/folders/b9/8b7t1gz538j6714r67890tnjd51cz8/T/115329-18762-dju4g5/submodules/SafariLauncher/build/Release-iphoneos/SafariLauncher.app
info: [debug] Creating new appium session f7dc47af-fbf9-4cd7-926b-a5c53565987b
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.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] Could not parse plist file (as binary) at /var/folders/b9/8b7t1gz538j6714r67890tnjd51cz8/T/115329-18762-dju4g5/submodules/SafariLauncher/build/Release-iphoneos/SafariLauncher.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/b9/8b7t1gz538j6714r67890tnjd51cz8/T/115329-18762-dju4g5/submodules/SafariLauncher/build/Release-iphoneos/SafariLauncher.app/en.lproj/Localizable.strings
warn: Could not parse app Localizable.strings assuming it doesn’t exist
info: [debug] Getting bundle ID from app
info: [debug] Parsed app Info.plist (as binary)
info: [debug] Creating instruments
info: [debug] Preparing uiauto bootstrap
info: [debug] Dynamic bootstrap dir: /Users/tchong/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,“autoDismissAlerts”:false,“sendKeyStrategy”:“grouped”}
…o: [debug] Dynamic bootstrap code: // This file is automatically generated. Do not manually modify!
info: [debug] Dynamic bootstrap path: /Users/tchong/Library/Application Support/appium/bootstrap/bootstrap-da7309635b162766.js
info: [debug] Reusing dynamic bootstrap: /Users/tchong/Library/Application Support/appium/bootstrap/bootstrap-da7309635b162766.js
info: [debug] Getting device string from opts: {“forceIphone”:false,“forceIpad”:false,“xcodeVersion”:“5.1.1”,“iOSSDKVersion”:“7.1”,“deviceName”:“Burberry iphone 6”,“platformVersion”:“8.2”}
info: [debug] fixDevice is on
info: [debug] Final device string is: ‘iPhone - Simulator - iOS 8.2’
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] Checking app install status using: /usr/local/lib/node_modules/appium/build/fruitstrap/fruitstrap isInstalled --id 8b7b0d23bbbe13b42ad71dbb95c7664a248cc49c --bundle com.bytearc.SafariLauncher
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 8b7b0d23bbbe13b42ad71dbb95c7664a248cc49c
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 8b7b0d23bbbe13b42ad71dbb95c7664a248cc49c com.bytearc.SafariLauncher -e UIASCRIPT “/Users/tchong/Library/Application Support/appium/bootstrap/bootstrap-da7309635b162766.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-04-29 13:01:30.245 instruments[18790:4103] Error fetching kdebug events
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 8b7b0d23bbbe13b42ad71dbb95c7664a248cc49c
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 8b7b0d23bbbe13b42ad71dbb95c7664a248cc49c com.bytearc.SafariLauncher -e UIASCRIPT “/Users/tchong/Library/Application Support/appium/bootstrap/bootstrap-da7309635b162766.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-04-29 13:01:36.829 instruments[18794:1a03] Error fetching kdebug events
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 8b7b0d23bbbe13b42ad71dbb95c7664a248cc49c
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 8b7b0d23bbbe13b42ad71dbb95c7664a248cc49c com.bytearc.SafariLauncher -e UIASCRIPT “/Users/tchong/Library/Application Support/appium/bootstrap/bootstrap-da7309635b162766.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-04-29 13:01:43.380 instruments[18799:3d0b] Error fetching kdebug events
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 8b7b0d23bbbe13b42ad71dbb95c7664a248cc49c
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 8b7b0d23bbbe13b42ad71dbb95c7664a248cc49c com.bytearc.SafariLauncher -e UIASCRIPT “/Users/tchong/Library/Application Support/appium/bootstrap/bootstrap-da7309635b162766.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-04-29 13:01:49.903 instruments[18802:4103] Error fetching kdebug events
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 (/usr/local/lib/node_modules/appium/node_modules/appium-instruments/lib/instruments.js:389:31)
at null. (/usr/local/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 22961.261 ms - 182

back to 1.3.6 cause 1.3.7 is broken for iOS simulators