2016-01-05 86 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