2016-01-05 87 views
1

我是新来appium,我试图使用与Java /的IntelliJAppium - 仪器在启动时崩溃模拟器

OSX埃尔卡皮坦10.11.2 Appium版本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); 

,但我发现了以下错误

这里是日志信息

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) 

我试着用以前版本的iPhone和iOS的,我得到这个

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 
+0

我知道这可能会迟到,但是1.您是否能够以除了appium脚本之外的其他方式访问乐器? 2.还请确保在Appium的用户界面中使用IOS平台的高级设置下的“Native Instruments Library”。 3.在设置中启用UI自动化设置 - 开发者 – nullpointer

回答

2

什么是你正在使用Xcode的版本?当您使用IOS 9.2时,您需要升级Xcode和仪器。 我已经成功解决了我的操作系统,xcode和乐器的问题。

希望这会有所帮助。

+0

我使用的是XCode 7.2版(7C68)和工具版本7.2(7C68),但问题仍然存在。 – msiles

+0

看来你有关于配置/应用程序的其他问题,因为在日志中我可以看到错误“应用程序'UIKitApplication:D.TestApp [0xf0ea]'崩溃了。”我相信这与您的测试应用程序有关。 – Keshav

0

尝试在Mac上配置Android应用程序,如果它工作正常,则问题不在于您使用的版本。 其他尝试更新Xcode的最新版本

+1

我使用XCode 7.2版(7C68)和工具版本7.2(7C68),但问题仍然存在。我想我正在使用最新版本的XCode。 – msiles

+0

它与Android应用程序工作正常吗? – Emna

+0

首先我试着用iphone,因为这个例子中的应用程序是针对iOS的 http://appium.s3.amazonaws.com/TestApp6.0.app.zip – msiles