Unable to run Appium with iOS 8.1

Hi,

I’m trying to run Appium 1.3.3 or 1.3.4 with iOS SDK 8.1 (Xcode 6.1) and I’m facing Instruments crashes . I tried with iOS 7.1 and 8.1 devices. Below is the portion of the log. Is anyone facing similar issue?

nfo: [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 xxxxxxxxxxxxx
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 xxxxxxxxxxxxx net.authorize.mobilemerchant -e UIASCRIPT “/Users/sharamac/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-01-15 15:03:56.570 instruments[16327:1003] Failed to start Instruments daemon on ‘iPadMini_ios7 (7.1.1)’ (The service is invalid.)
info: [debug] [INST] Waiting for device to boot…
info: [debug] [INST STDERR] 2015-01-15 15:03:56.747 instruments[16327:507] Failed to start Instruments daemon on ‘iPadMini_ios7 (7.1.1)’ (The service is invalid.)
info: [debug] [INST STDERR] Instruments Usage Error : Timed out waiting for device to boot: “iPadMini_ios7 (7.1.1)”
info: [debug] [INSTSERVER] Instruments exited with code 255
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. (/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}
error: Unexpected error: Error: Can’t set headers after they are sent.
at ServerResponse.OutgoingMessage.setHeader (http.js:689:11)
at ServerResponse.res.set.res.header (/usr/local/lib/node_modules/appium/node_modules/express/lib/response.js:561:10)
at ServerResponse.res.json (/usr/local/lib/node_modules/appium/node_modules/express/lib/response.js:208:36)
at ServerResponse.res.send (/usr/local/lib/node_modules/appium/node_modules/express/lib/response.js:121:21)
at /usr/local/lib/node_modules/appium/lib/server/responses.js:69:9
at safely (/usr/local/lib/node_modules/appium/lib/server/helpers.js:306:5)
at exports.respondError (/usr/local/lib/node_modules/appium/lib/server/responses.js:68:3)
at /usr/local/lib/node_modules/appium/lib/server/controller.js:187:9
at Appium.cleanupSession (/usr/local/lib/node_modules/appium/lib/appium.js:325:21)
at null. (/usr/local/lib/node_modules/appium/lib/appium.js:267:28) context: [POST /wd/hub/session {“desiredCapabilities”:{“deviceName”:“iPad”,“platformName”:“iOS”,“app”:"/Users/sharamac/Documents/Appium/Authorize.Net.app",“udid”:“xxxxxxxxxxxxx”}}]

Thanks.

Which version of XCode you are using ? I had got around a similar problem by switching to 6.1.1 XCode on OS X 10.10.2
if there is any update available update and try again.

Hi all,

I have the same issue on iOS 7.1/8/1( real device) using Xcode 6.2 and Appium 1.3.4.

Here is a part of the log:

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 *********
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 3e20de536ef4c43ba324c5336ea38646bcfd1c94 com.rebelvox.voxer-lite -e UIASCRIPT “/Users/daniela.domnici/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: [IOS_SYSLOG_ROW ] Apr 11 08:55:56 Ionel-5S6T-Johnny SpringBoard[29] : libMobileGestalt MobileGestalt.c:835: any-telephony is static and will never generate a notification

info: [IOS_SYSLOG_ROW ] Apr 11 08:55:56 Ionel-5S6T-Johnny SpringBoard[29] : libMobileGestalt MobileGestalt.c:835: magnetometer is static and will never generate a notification

info: [IOS_SYSLOG_ROW ] Apr 11 08:55:56 Ionel-5S6T-Johnny SpringBoard[29] : libMobileGestalt MobileGestalt.c:835: still-camera is static and will never generate a notification
info: [IOS_SYSLOG_ROW ] Apr 11 08:55:56 Ionel-5S6T-Johnny SpringBoard[29] : libMobileGestalt MobileGestalt.c:835: stand-alone-contacts is static and will never generate a notification
info: [IOS_SYSLOG_ROW ] Apr 11 08:55:56 Ionel-5S6T-Johnny SpringBoard[29] : libMobileGestalt MobileGestalt.c:835: nike-ipod is static and will never generate a notification

info: [IOS_SYSLOG_ROW ] Apr 11 08:55:56 Ionel-5S6T-Johnny lockdownd[56] : 01ccc000 spawn_service_agent: Could not look up service in the map
info: [IOS_SYSLOG_ROW ] Apr 11 08:55:56 Ionel-5S6T-Johnny lockdownd[56] : 01ccc000 spawn_and_handle_checkin: Could not spawn the com.apple.GPUTools.MobileService service agent:InvalidService

info: [IOS_SYSLOG_ROW ] Apr 11 08:55:56 Ionel-5S6T-Johnny lockdownd[56] : 01ccc000 spawn_service_agent: Could not look up service in the map

info: [IOS_SYSLOG_ROW ] Apr 11 08:55:56 Ionel-5S6T-Johnny lockdownd[56] : 01ccc000 spawn_and_handle_checkin: Could not spawn the com.apple.instruments.remoteserver service agent:InvalidService
info: [debug] [INST STDERR] 2015-04-02 09:55:18.679 instruments[4143:25919] Failed to start Instruments daemon on ‘Ionel 5S6T Johnny (7.1.2)’ (The service is invalid.)

Thanks