msiles
msiles

Reputation: 687

Appium - Instruments crashed on startup Emulator

I'm new to appium, and I'm trying to run an example using the following code with Java / Intellij

OSX El Capitan 10.11.2 Appium version 1.4.16

DesiredCapabilities desiredCapabilities = new DesiredCapabilities();
desiredCapabilities.setCapability("deviceName", "iPhone 6");
desiredCapabilities.setCapability("platformName", "iOS");
desiredCapabilities.setCapability("platformVersion", "9.2");
desiredCapabilities.setCapability("app", "http://appium.s3.amazonaws.com/TestApp6.0.app.zip");

driver = new IOSDriver(new URL("http://127.0.0.1:4723/wd/hub"), desiredCapabilities);
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);

but I'm getting the following error

Here is the log info

  info: [debug] [INST] Instruments Trace Complete (Duration : 20.832968s; Output : /tmp/appium-instruments/instrumentscli0.trace)
    info: [debug] [INSTSERVER] Instruments exited with code 0
    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: [IOS_SYSLOG_ROW ] Jan  5 16:14:22 Moisess-MacBook-Pro DTServiceHub[56640]: Could not create service named com.apple.instruments.server.services.processcontrol.posixspawn
    info: [IOS_SYSLOG_ROW ] Jan  5 16:14:23 Moisess-MacBook-Pro assertiond[56635]: assertion failed: 15C50 13C75: assertiond + 12188 [8CF1968D-3466-38B7-B225-3F6F5B64C552]: 0x1

    info: [IOS_SYSLOG_ROW ] Jan  5 16:14:23 Moisess-MacBook-Pro ScriptAgent[56697]: Warning - Unable to stop script because the script was already stopped.

    info: Launching instruments

    info: [debug] Attempting to run app on iPhone 6 (9.2)

    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 6 (9.2)" /var/folders/mj/ysvr7x097ynb626pxp6f2zbm0000gn/T/11605-56384-6yj58r/TestApp.app -e UIASCRIPT "/Users/moisessiles/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":90000}

    info: [IOS_SYSLOG_ROW ] Jan  5 16:14:28 Moisess-MacBook-Pro SpringBoard[56630]: Weekly asset update check did fire (force=NO)

    info: [IOS_SYSLOG_ROW ] Jan  5 16:14:28 Moisess-MacBook-Pro SpringBoard[56630]: Beginning check for asset updates (force: 0
    info: [IOS_SYSLOG_ROW ] Jan  5 16:14:28 Moisess-MacBook-Pro SpringBoard[56630]: Did not complete check for asset updates (force: 0, isVoiceOverRunning: 0

    info: [IOS_SYSLOG_ROW ] Jan  5 16:14:29 Moisess-MacBook-Pro assertiond[56635]: assertion failed: 15C50 13C75: assertiond + 12188 [8CF1968D-3466-38B7-B225-3F6F5B64C552]: 0x1

    info: [IOS_SYSLOG_ROW ] Jan  5 16:14:29 Moisess-MacBook-Pro DTServiceHub[56640]: DTMemlimitAssertionFactory: failed to remove active and inactive memory limits for pid 56707 (result = -1)

    info: [IOS_SYSLOG_ROW ] Jan  5 16:14:29 Moisess-MacBook-Pro com.apple.CoreSimulator.SimDevice.5D6F2EC4-53A3-41E2-BCA6-108B991591C7.launchd_sim[56614] (UIKitApplication:D.TestApp[0xf0ea][56707]): Service exited due to signal: Trace/BPT trap: 5

    info: [IOS_SYSLOG_ROW ] Jan  5 16:14:29 Moisess-MacBook-Pro SpringBoard[56630]: Unable to get short BSD proc info for 56707: No such process
    info: [debug] [INST] 2016-01-05 22:14:29 +0000 Fail: The target application appears to have died
    info: [IOS_SYSLOG_ROW ] Jan  5 16:14:30 Moisess-MacBook-Pro SpringBoard[56630]: Application 'UIKitApplication:D.TestApp[0xf0ea]' crashed.
    info: [IOS_SYSLOG_ROW ] Jan  5 16:14:30 Moisess-MacBook-Pro assertiond[56635]: assertion failed: 15C50 13C75: assertiond + 12188 [8CF1968D-3466-38B7-B225-3F6F5B64C552]: 0x1
    info: [debug] [INST STDERR] 2016-01-05 16:14:30.057 instruments[56702:7555272] Attempting to change event horizon while disengage

    info: [IOS_SYSLOG_ROW ] Jan  5 16:14:30 Moisess-MacBook-Pro ScriptAgent[56708]: Warning - Unable to stop script because the script was already stopped.

    info: [debug] [INST] Instruments Trace Complete (Duration : 1.587851s; Output : /tmp/appium-instruments/instrumentscli0.trace)

I tried with a previous version of iphone and iOS and I'm getting this

warn: Applications directory /Users/moisessiles/Library/Developer/CoreSimulator/Devices/5D6F2EC4-53A3-41E2-BCA6-108B991591C7/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] Cleaning up appium session
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 147478.284 ms - 182 

Upvotes: 1

Views: 424

Answers (2)

Emna Ayadi
Emna Ayadi

Reputation: 2460

Try to Configure an Android Application on your Mac if it works fine the problem isn't from the version you use. Else try to update the latest version of Xcode

Upvotes: 0

Keshav
Keshav

Reputation: 425

What is the version of xcode you are using? As you are using the IOS 9.2 you need to upgrade Xcode and instruments. i had successfully resolved same issue by upgaring my OS, xcode and instruments.

Hope this helps.

Upvotes: 2

Related Questions