2015-11-05 133 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

“我的生活地狱”,好的! –