Appium Appium1.4.8 中的 TestApp,Inspector 启动 iOS 模拟器无限重启

adfghzhang · 2015年08月05日 · 最后由 陈恒捷 回复于 2015年08月06日 · 1390 次阅读

今天重新折腾了一下 mac 的环境,今天测试的时候发现使用 1.4.8 的 Inspector 启动 iOS 模拟器无限重启(用 TestApp 也一样),反而真机没有遇到问题。还望各位有解决无限重启经验的朋友们提供思路或解决方案。
环境信息如下:
Mac OS X 10.10.3
Xcode 6.3(Xcode Command Line Tools、ideviceinstaller 安装 OK)
模拟器 iPad 2 (8.3 Simulator)
Appium 1.4.8.dmg
未通过命令安装 Appium

不胜感激!

info: [debug] Instruments crashed on startup
info: [debug] Attempting to retry launching instruments, this is retry #1
info: [debug] Killall iOS Simulator

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)" /Users/systest/Documents/TestApp.app -e UIASCRIPT "/Users/systest/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}

info: [debug] [INST] Waiting for device to boot...

info: [debug] [INST] 2015-08-05 10:06:42 +0000 Fail: The target application appears to have died

info: [debug] [INST STDERR] 2015-08-05 18:06:42.416 instruments[36815:111511] Attempting to set event horizon when core is not engaged, request ignored

info: [debug] [INST STDERR] 2015-08-05 18:06:42.417 instruments[36815:111511] Attempting to set event horizon when core is not engaged, request ignored

info: [debug] [INST] Instruments Trace Complete (Duration : 2.177104s; 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 #2
info: [debug] Killall iOS Simulator
如果觉得我的文章对您有用,请随意打赏。您的支持将鼓励我继续创作!
共收到 3 条回复 时间 点赞

没猜错的话你是拿对应真机的 ipa/app 放到模拟器上跑了。

iOS 模拟器都是 x86,真机都是 arm ,两者编译时使用的参数是不一样的,所以真机能跑的放到模拟器就会无限闪退。

至于 XCode 里面直接点 run 的话它会自动根据你选择的设备使用不同的编译参数现场编译,所以会有用的是同样程序的错觉。

PS:遇到 app 自己闪退方面的问题不要光看 appium server log,此时设备自身的包含应用内部日志的 log 才是能够有效定位问题的。

#2 楼 @adfghzhang 不客气。
麻烦添加一下头像吧。

需要 登录 后方可回复, 如果你还没有账号请点击这里 注册