Appium 为什么连接真机启动 app 的时候,会提示 The service is invalid

云飞凌风 · 2014年10月17日 · 最后由 沙丘 回复于 2015年06月19日 · 2170 次阅读

请问在真机设备上启动应用时,多次提示错误,经常碰到这样的错误,一会儿可以启动,一会儿又启动不了应用,真实奇怪,请高手帮我看看,那错误说明了什么?
如::Instruments crashed on startup
如: The service is invalid.
我的 Instruments 上午还好好的,下午就启动不了了,通过命令。奇怪的事情。。

info: [debug] App is installed.
info: [debug] fullReset not requested. No need to install.
info: [debug] Starting command proxy.
info: [debug] Instruments socket server started at /tmp/instruments_sock
info: [debug] Starting instruments
info: [debug] Instruments is at: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments
info: Launching instruments
info: [debug] Attempting to run app on real device with UDID 80f5f5157d2a7464867b5cb3a838ed54671754b8
info: [debug] Spawning instruments with command: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments -t /Users/yunfeiyang/快盘/Tools/Automation/Automation.tracetemplate -D /tmp/appium-instruments/instrumentscli0.trace -w 80f5f5157d2a7464867b5cb3a838ed54671754b8 com.25pp.ppappinstaller -e UIASCRIPT "/Users/yunfeiyang/Library/Application Support/appium/bootstrap/bootstrap-155cfe23bfa89a47.js" -e UIARESULTSPATH /tmp/appium-instruments
info: [debug] And extra without-delay env: {}
info: [debug] And launch timeouts (in ms): {"global":90000}
info: [debug] [INST STDERR] 2014-10-17 03:23:23.861 instruments[2263:1307] Failed to start Instruments daemon on '“云飞扬”的 iPhone (7.1.2)' (The service is invalid.)
info: [debug] [INST] Waiting for device to boot...
info: [debug] [INST STDERR] 2014-10-17 03:23:24.314 instruments[2263:507] Failed to start Instruments daemon on '“云飞扬”的 iPhone (7.1.2)' (The service is invalid.)
info: [debug] [INST STDERR] Instruments Usage Error : Timed out waiting for device to boot: "“云飞扬”的 iPhone (7.1.2)"
info: [debug] [INSTSERVER] Instruments exited with code 255
info: [debug] Killall instruments
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 real device with UDID 80f5f5157d2a7464867b5cb3a838ed54671754b8
info: [debug] Spawning instruments with command: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments -t /Users/yunfeiyang/快盘/Tools/Automation/Automation.tracetemplate -D /tmp/appium-instruments/instrumentscli0.trace -w 80f5f5157d2a7464867b5cb3a838ed54671754b8 com.25pp.ppappinstaller -e UIASCRIPT "/Users/yunfeiyang/Library/Application Support/appium/bootstrap/bootstrap-155cfe23bfa89a47.js" -e UIARESULTSPATH /tmp/appium-instruments
info: [debug] And extra without-delay env: {}
info: [debug] And launch timeouts (in ms): {"global":90000}
info: [debug] [INST STDERR] 2014-10-17 03:23:59.696 instruments[2266:240b] Failed to start Instruments daemon on '“云飞扬”的 iPhone (7.1.2)' (The service is invalid.)
info: [debug] [INST] Waiting for device to boot...
info: [debug] [INST STDERR] 2014-10-17 03:24:00.089 instruments[2266:507] Failed to start Instruments daemon on '“云飞扬”的 iPhone (7.1.2)' (The service is invalid.)

如果觉得我的文章对您有用,请随意打赏。您的支持将鼓励我继续创作!
共收到 4 条回复 时间 点赞

有人见过这种情况么?求解答?

確定一下你的 platformVersion 有沒有填對,像是 desired_caps['platformVersion'] = '7.1.2'

我後來也有遇到同樣的問題,參考這篇居然就解決了
http://www.vingo.cn/vingo/?p=687

@colorhaake 你发的链接多帖子是让打开 xcode,为试了一下打开 xcode 之后确实可以了,但是有人知道为什么不?以前不是打开 xcode 就不能启动的吗?

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