【问题标题】:Appium [iOS] - Couldn't launch app on simulatorAppium [iOS] - 无法在模拟器上启动应用程序
【发布时间】:2015-10-14 18:51:03
【问题描述】:

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

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

我不知道应用程序是否应该在启动后立即打开。这就是我运行 Inspector 的原因。似乎设备已连接并开始安装应用程序。显示启动屏幕后应用程序崩溃。我用另一个应用程序尝试了相同的流程,得到了相同的结果。以下是 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

【问题讨论】:

    标签: ios automated-tests appium


    【解决方案1】:

    解决方案很简单,但并不简单

    为模拟器构建应用后:

    1. 在 Xcode 的左侧面板中找到 Products
    2. 在那里您可以找到您的应用程序。用右键点击它(即使它是红色的)
    3. 在右侧面板中,您将看到Full Path 的路径。将其复制到最后一个元素。例如看到/projects/.../yourproject-&lt;bhah&gt;/Build/Products/Debug-iphoneos/yourproject.app 你需要:/projects/.../yourproject-&lt;bhah&gt;/Build/Products 3.1。或者您可以通过以下方式找到它:右键单击它(即使它是红色的)并选择show in finder
    4. 转到封闭文件夹 (Go-&gt;Enclosing folder)
    5. 打开该目录。你会在那里找到Debug-iphonesimulatoryourproject.app

    这是你需要的

    【讨论】:

      猜你喜欢
      • 2017-10-31
      • 2017-03-13
      • 2014-03-26
      • 1970-01-01
      • 1970-01-01
      • 2015-06-07
      • 2014-11-21
      • 1970-01-01
      • 2015-06-23
      相关资源
      最近更新 更多