当前位置: 首页 > 知识库问答 >
问题:

Appium[iOS]-无法在模拟器上启动应用程序

缑赤岩
2023-03-14

我已经安装了Appium和所有必要的东西,通过iOS模拟器运行应用程序

然后我启动了一个模拟器并启动了Appium(确保在启动前在设置中设置了应用程序的路径)

我不知道应用程序是否应该在启动后立即开放。这就是为什么我运行督察。似乎设备已连接,应用程序的安装已启动。显示启动屏幕后,应用程序崩溃了。我用另一个应用程序尝试了同样的流程,得到了同样的结果。以下是Appium的日志:

info: [IOS_SYSLOG_ROW ] Jul 24 10:29:07 MacBook-apple com.apple.CoreSimulator.SimDevice.73F7270E-C69E-4CF5-8586-39358163963A.launchd_sim[6364] (UIKitApplication:com.wholefoods.WholeFoods[0x7ca4][6420]): Program specified by service does not contain one of the requested architectures: �<0
info: [IOS_SYSLOG_ROW ] Jul 24 10:29:07 MacBook-apple.local SpringBoard[6378]: Unable to get pid for 'UIKitApplication:com.wholefoods.WholeFoods[0x7ca4]': No such process (err 3)
info: [IOS_SYSLOG_ROW ] Jul 24 10:29:07 MacBook-apple.local SpringBoard[6378]: Unable to delete job with label UIKitApplication:com.wholefoods.WholeFoods[0x7ca4]. Error: Operation now in progress
info: [IOS_SYSLOG_ROW ] Jul 24 10:29:07 MacBook-apple.local SpringBoard[6378]: Application 'UIKitApplication:com.wholefoods.WholeFoods[0x7ca4]' exited for an unknown reason.
info: [IOS_SYSLOG_ROW ] Jul 24 10:29:07 MacBook-apple com.apple.CoreSimulator.SimDevice.73F7270E-C69E-4CF5-8586-39358163963A.launchd_sim[6364] (UIKitApplication:com.wholefoods.WholeFoods[0x7ca4][6420]): Trampoline was terminated before jumping to service: Killed: 9

info: [debug] [INST STDERR] Instruments Trace Error : Target failed to run: Failed looking up pid of launched process
info: [debug] [INSTSERVER] Instruments exited with code 253
info: [debug] Killall instruments
info: [debug] Instruments crashed on startup
info: [debug] Attempting to retry launching instruments, this is retry #2
info: [debug] Killall iOS Simulator
info: [IOS_SYSLOG_ROW ] Jul 24 10:29:07 MacBook-apple.local DTMobileIS[6387]: Could not create service named com.apple.instruments.server.services.processcontrol.posixspawn
info: [IOS_SYSLOG_ROW ] Jul 24 10:29:07 MacBook-apple.local DTMobileIS[6387]: Could not create service named com.apple.instruments.server.services.launchdaemon

info: Launching instruments

info: [debug] Attempting to run app on iPad 2 (8.3 Simulator)
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 "iPad 2 (8.3 Simulator)" /var/folders/7x/pfjm_c_s37ngl66yrs82ry3m0000gn/T/115624-6265-9ypyif/Payload/WholeFoods.app -e UIASCRIPT "/Users/apple/Library/Application Support/appium/bootstrap/bootstrap-4e580d338a12229a.js" -e UIARESULTSPATH /tmp/appium-instruments
info: [debug] And extra without-delay env: {"DYLD_INSERT_LIBRARIES":"/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-instruments/thirdparty/iwd6/InstrumentsShim.dylib","LIB_PATH":"/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-instruments/thirdparty/iwd6"}
info: [debug] And launch timeouts (in ms): {"global":90000}

blablabla

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/node_modules/appium-instruments/lib/instruments.js:440:31)
at [object Object].<anonymous> (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/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 117025.667 ms - 182 

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

共有1个答案

卢皓轩
2023-03-14

解决办法很简单,但并不微不足道

为模拟器构建应用程序后:

  1. 在左侧面板的Xcode中查找产品

这就是你需要的

 类似资料:
  • 无法启动应用程序,请查找以下相同的跟踪 注意:同样的应用程序与卡拉巴赫工作,即我能够启动应用程序 我正在使用以下功能:

  • 将ANDROID_HOME和JAVA_HOME添加到sh配置文件(为了不每次都设置它们)echo“export JAVA_HOME=$(/usr/libexec/JAVA_HOME)”>>~/.bash_profile echo“export ANDROID_HOME=/usr/local/adt/sdk”>>~/.bash_profile 安装Android构建和平台工具$android_hom

  • 当我尝试在iOS 8.0模拟器上使用Xcode 6 Beta 4运行我的应用程序时,总是会出现以下错误: 无法启动iOS模拟器 事实上,我在这个网站上发现了一些类似的问题,我尝试了所有的答案,但仍然无法解决。我在Xcode 6的Beta 2版本中也遇到了同样的错误,所以我决定等待。但现在这已经不正常了。有人找到了发生这种情况的原因并找到了解决方案吗?

  • 我在尝试使用ios应用程序上的滑动功能时遇到问题。目前正在将Appium v1.3.5与Cucumber/RubyMine v7.04联合使用。 我尝试使用一个范围的x,y坐标。然而,我仍然只能刷一半,无法点击屏幕上的元素。 以前有人遇到过这个问题吗? 请发送错误消息:

  • 我正在使用appium xcuitest V1.6在iOS模拟器V10.0中自动化wb应用程序,但我无法使用代码中提到的url启动safari。出现以下异常,请帮忙。

  • 我试图推出iOS应用程序,这是开发和建立在Xcode版本7.3.1(7D1014)使用Appium自动化工具。为了启动ios应用程序,我在IOS模拟器上安装了苹果公司的根证书,方法是在模拟器上拖放证书文件。我能够手动启动应用程序,但使用appium自动化工具启动应用程序时出现问题。IOS应用程序启动时失败,我得到"nsurlerrordomer1012 iphone"。下面我附上了简单的代码来设置