Appium appium 搭建真机 ios 测试遇到的问题

haojie · 2016年08月17日 · 最后由 haojie 回复于 2016年08月29日 · 1839 次阅读

本人试用 xcode 能成功将应用部署到真机上,启动 appium,搭建 ios 配置文件,配置如下

成功启动服务后,无法启动 inspector。
请问这是啥问题啊

[Instruments] Launching instruments
[debug] [Instruments] Attempting to run app on real device with UDID '4fa579783179da2068b0dfbcb47177ca28b3603b'
[debug] [Instruments] Found Insruments-Without-Delay: /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-ios-driver/node_modules/appium-instruments/thirdparty/iwd7
[debug] [Instruments] 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 /var/folders/3n/qcx5k1p50h5gf3z2gdkr2t4r0000gp/T/appium-instruments/instrumentscli0.trace -w 4fa579783179da2068b0dfbcb47177ca28b3603b cn.named.take -e UIASCRIPT "/Users/baoz/Library/Application Support/appium/bootstrap/bootstrap-65476410cd29e3d0.js" -e UIARESULTSPATH /var/folders/3n/qcx5k1p50h5gf3z2gdkr2t4r0000gp/T/appium-instruments'
[debug] [Instruments] And extra without-delay env: {}
[debug] [Instruments] And launch timeouts (in ms): {"global":90000}

[HTTP] <-- GET /wd/hub/status - - ms - - 

[HTTP] <-- GET /wd/hub/status - - ms - - 

[HTTP] --> GET /wd/hub/status {}

[MJSONWP] Calling AppiumDriver.getStatus() with args: []

[HTTP] --> GET /wd/hub/status {}

[MJSONWP] Calling AppiumDriver.getStatus() with args: []

[HTTP] <-- GET /wd/hub/status - - ms - - 

[HTTP] <-- GET /wd/hub/status - - ms - - 

[HTTP] --> GET /wd/hub/status {}

[MJSONWP] Calling AppiumDriver.getStatus() with args: []

[iOSLog] [IOS_SYSLOG_ROW] Aug 17 11:31:44 NamediPod com.apple.xpc.launchd[1] <Error>: assertion failed: 13G35: launchd + 116796 [9F6284CF-8A17-36CC-9DB5-85D510A21F14]: 0x3

[debug] [Instruments] [INST STDERR] 2016-08-17 11:31:44.081 instruments[3984:305832] WebKit Threading Violation - initial use of WebKit from a secondary thread.

[HTTP] --> GET /wd/hub/status {}

[MJSONWP] Calling AppiumDriver.getStatus() with args: []

[HTTP] <-- GET /wd/hub/status - - ms - - 

[debug] [Instruments] [INST STDERR] Instruments Usage Error: Specified target process is invalid: cn.named.take
instruments, version 7.3 (60134)
usage: instruments [-t template] [-D document] [-l timeLimit] [-i #] [-w device] [[-p pid] | [application [-e variable value] [argument ...]]]

[debug] [Instruments] Instruments exited with code 255

[Instruments] Error launching instruments: Instruments crashed on startup

显示 instruments 崩掉了

[Instruments] Error: We exceeded the number of retries allowed for instruments to successfully start; failing launch
    at Object.wrappedLogger.errorAndThrow (lib/logger.js:60:13)
    at Instruments.launch$ (lib/instruments.js:220:15)
    at tryCatch (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
    at GeneratorFunctionPrototype.invoke [as _invoke] (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
    at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
    at GeneratorFunctionPrototype.invoke (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
    at run (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/node_modules/core-js/library/modules/es6.promise.js:104:47)
    at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/node_modules/core-js/library/modules/es6.promise.js:115:28
    at flush (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/node_modules/core-js/library/modules/$.microtask.js:19:5)
    at _combinedTickCallback (internal/process/next_tick.js:67:7)
    at process._tickCallback (internal/process/next_tick.js:98:9)
 [Error: We exceeded the number of retries allowed for instruments to successfully start; failing launch]
[MJSONWP] Encountered internal error running command: Error: We exceeded the number of retries allowed for instruments to successfully start; failing launch
    at Object.wrappedLogger.errorAndThrow (lib/logger.js:60:13)
    at Instruments.launch$ (lib/instruments.js:220:15)
    at tryCatch (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
    at GeneratorFunctionPrototype.invoke [as _invoke] (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
    at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
    at GeneratorFunctionPrototype.invoke (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
    at run (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/node_modules/core-js/library/modules/es6.promise.js:104:47)
    at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/node_modules/core-js/library/modules/es6.promise.js:115:28
    at flush (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/node_modules/core-js/library/modules/$.microtask.js:19:5)
    at _combinedTickCallback (internal/process/next_tick.js:67:7)
    at process._tickCallback (internal/process/next_tick.js:98:9)

共收到 5 条回复 时间 点赞

A new session could not be created. Details: The desiredCapabilities object was not valid for the following reason(s): deviceName can't be blank.

#1 楼 @tspring 我试过了,devicename 填了,之后 app 可以被部署到 ipod 上,但是没法打开

设备的 UI automation 是不是没有打开

运行 9.3 的系统
需要 appium1.5.3+ox 10.11

#4 楼 @sneaker_zhou 是的,升级了系统和 xcode 之后就 OK 了

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