2015-11-05 127 views
2

也許有人可以幫助我。Appium [iOS]儀器啓動時崩潰

當appium嘗試運行應用程序時,屏幕會與應用程序啓動屏幕一起閃爍,就像appium嘗試多次啓動應用程序一樣。這種行爲在模擬器和真實設備上都會發生。

我設置啓用我的iOS設備的用戶界面Autimation,但是當我嘗試開始檢查我有這樣的問題:

info: [debug] [INST STDERR] 2015-11-05 15:11:05.082 instruments[1495:39489] WebKit Threading Violation - initial use of WebKit from a secondary thread. 
info: [debug] [INST STDERR] 2015-11-05 15:11:06.049 instruments[1495:39460] Attempting to change event horizon while disengage 

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

info: [debug] [INST STDERR] 2015-11-05 15:11:06.049 instruments[1495:39462] Attempting to change event horizon while disengage 
Instruments Trace Error : Target failed to run: Permission to debug com.myapp.iphone was denied. The app must be signed with a development identity (e.g. iOS Developer). 
info: [IOS_SYSLOG_ROW ] Nov 5 15:11:04 tests-iPod com.apple.xpc.launchd[1] (UIKitApplication:com.myapp.iphone[0xe163][607]) <Notice>: Service exited due to signal: Killed: 9 
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] Reset not set, not ending sim or cleaning up app state 
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 33841.937 ms - 182} 

應用是的.ipa

感謝, 問候的形式。

+1

請問您可以添加您的測試腳本,json configs和testNG.xml(或任何您使用的)。謝謝 –

+0

現在它發生沒有腳本。 它發生在我嘗試啓動UI檢查器時。 – mrabaev48

回答

6
Target failed to run: Permission to debug com.myapp.iphone was denied. 
The app must be signed with a development identity (e.g. iOS Developer). 

您的應用程序應該與開發人員密鑰簽名。 Click here for documentation

+0

謝謝。我沒有看到這個。 – mrabaev48

+0

您是否會友善地幫助我瞭解如何獲得此解決方案http://stackoverflow.com/questions/39484982/access-toggle-button-in-android-settings-using-appium-whlie-client-is - 寫在 –

0

BlockquoteTarget無法運行:調試com.myapp.iphone的權限被拒絕。 應用程序必須使用開發標識(例如iOS開發人員)進行簽名。 大段引用

你應該給你的開發人員的身份而創建的.ipa ...

如果要創建通過終端IPA文件,你可以按照給定鏈路[博客]:Xcode "Build and Archive" from command line

0

我也努力解決這個問題,並發現你需要在你的開發者選項中啓用UI自動化iDevice

如何啓用UI自動化 1.關閉iDevice, 2.然後將其連接到運行Xcode的Mac 3.重新打開之前,顯示Developer選項。 4.點擊選項,開發和啓用UI自動化

+0

謝謝) 但我解決了它。 Regards) – mrabaev48

1

如果您使用的是iOS模擬器,請執行下列操作...

Appium,去開發人員設置,檢查Custome服務器旗並在文本框中輸入- 本機文書-lib

現在啓動Appium服務器。

希望這會有所幫助!

0

在我的情況下,下面的命令使我的生活地獄:

rm -rf $HOME/Library/Developer/Xcode/iOS\ DeviceSupport/* 

所以不要把它添加到構建步驟。

要解決此問題: 重啓設備>運行的Xcode>連接設備>打造&運行應用程序>停止&退出Xcode中

現在,確認沒有崩潰的儀器啓動應用程序。

+0

「我的生活地獄」,好的! –