Macaca app-inspector -u YOUR-DEVICE-ID 报错,求大神指教

罂粟 · 2017年02月08日 · 最后由 达峰的夏天 回复于 2017年05月16日 · 1932 次阅读

在命令行运行 app-inspector -u YOUR-DEVICE-ID 报如下错误:

xctest-client start with port: 8900
WebDriverAgent version: 1.0.41
app-inspector:66:44 [master] pid:1660 undefined
(node:1660) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: >> app-inspector:66:44 [master] pid:1660 undefined

求大神指教,这是什么错误引起的

共收到 25 条回复 时间 点赞

请问这个问题解决了吗?我也遇到了同样的问题

app-inspector -u YOUR-DEVICE-ID --verbose
打印详细信息看看 log

重新签名了吗?

23楼 已删除

#1 楼 @Trinity 解决了,加上--verbose 查看了日志,找到问题所在

#2 楼 @michael_wang 谢谢哦,就是通过这个参数解决的

#3 楼 @eybens 恩,重新签名了,iOS 版本不一致导致的

@sunshine22 签名的问题?IOS 版本不一致是指?
我现在用 xcode8.1 +ipad 10.2.1,也遇到这样的问题,已经重装过 app-inspector 了,问题还是没有解决

罂粟 #18 · 2017年02月16日 Author

#8 楼 @Sandu1213 加上这个参数 verbose 看哪里报错了

罂粟 #10 · 2017年02月16日 Author

#9 楼 @sunshine22 从运行命令行开始往下看

Testing failed:
Signing for "WebDriverAgentRunner" requires a development team. Select a development team in the project editor.
Code signing is required for product type 'UI Testing Bundle' in SDK 'iOS 10.1'
@sunshine22 这个错误,用 xcode 直接编译安装是没问题了,用命令行 app-inspector -u udid 就报这个签名错误,这个跟我的 Xcode 版本有关么?

@sunshine22 我已经解决这个问题了,多谢!(具体步骤就是按 verbose 里的报错地方去解决,我的是签名问题,之前搞错工程了,下的多弄混淆了。。)

The following build commands failed:
CompileC /Users/CHAOsDelacroix/Library/Developer/Xcode/DerivedData/WebDriverAgent-ceakatlydgitcjebccsbdhchgrpn/Build/Intermediates/WebDriverAgent.build/Debug-iphoneos/WebDriverAgentLib.build/Objects-normal/arm64/FBScreenshotCommands.o WebDriverAgentLib/Commands/FBScreenshotCommands.m normal arm64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
请问楼主我这是什么问题啊,刚接触自动化还不太懂,不要嫌我的问题幼稚才好

Testing failed:

xctest-client.js:171:14 [master] pid:68873 please check project: /usr/local/lib/node_modules/app-inspector/node_modules/webdriveragent/WebDriverAgent/WebDriverAgent.xcodeproj
xctest-client.js:170:14 [master] pid:68873 'XCUISiriService' is partial: introduced in iOS 10.3
Could not build module 'XCTest'

其实,appium 官主有个工具的。https://github.com/mykola-mokhnach/Appium-iOS-Inspector
使用方法:
1.启动脚本 Remote 后设置个断点。
2.下载这个网页,点击后即可显示出结构来

文字 回复

这个工具是用来获取元素的吗,该怎么使用呢,求指教

文字 回复

赞一个。Macaca app-inspector 各种安装,始终处于 waiting 状态。这个马上就找到了,操作还简单方便~~

小茗同学 回复

遇到同样的问题,找到解决方法了吗

报错,有人遇过么

>> xctest-client.js:181:14 [master] pid:3690 xctest client exit with code: 65, signal: null
>> xctest-client.js:209:14 [master] pid:3690 iproxy exit with code: null, signal: SIGKILL
>> xctest-client.js:145:16 [master] pid:3690 deviceconsole exit with code: null, signal: SIGKILL
>> xctest-client.js:257:14 [master] pid:3690 Fail to start xctest: undefined
>> app-inspector:66:44 [master] pid:3690 undefined
(node:3690) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: >> app-inspector:66:44 [master] pid:3690 undefined

xctest-client.js:181:14 [master] pid:3690 xctest client exit with code: 65, signal: null

xctest-client.js:209:14 [master] pid:3690 iproxy exit with code: null, signal: SIGKILL
xctest-client.js:145:16 [master] pid:3690 deviceconsole exit with code: null, signal: SIGKILL

xctest-client.js:171:14 [master] pid:16242 please check project: /usr/local/lib/node_modules/app-inspector/node_modules/webdriveragent/WebDriverAgent/WebDriverAgent.xcodeproj
proxy.js:56:14 [master] pid:16242 Proxy: /session:POST to http://127.0.0.1:8900/session:POST with body: {"desiredCapabilities":{}}
proxy.js:62:22 [master] pid:16242 xctest client proxy error with: Error: socket hang up
proxy.js:62:22 [master] pid:16242 xctest client proxy error with: Error: socket hang up
proxy.js:62:22 [master] pid:16242 xctest client proxy error with: Error: socket hang up
proxy.js:62:22 [master] pid:16242 xctest client proxy error with: Error: socket hang up
proxy.js:62:22 [master] pid:16242 xctest client proxy error with: Error: socket hang up
proxy.js:62:22 [master] pid:16242 xctest client proxy error with: Error: socket hang up
proxy.js:62:22 [master] pid:16242 xctest client proxy error with: Error: socket hang up
proxy.js:62:22 [master] pid:16242 xctest client proxy error with: Error: socket hang up
proxy.js:62:22 [master] pid:16242 xctest client proxy error with: Error: socket hang up
proxy.js:62:22 [master] pid:16242 xctest client proxy error with: Error: socket hang up
proxy.js:62:22 [master] pid:16242 xctest client proxy error with: Error: socket hang up
xctest-client.js:257:14 [master] pid:16242 Fail to start xctest: Error: socket hang up
xctest-client.js:265:14 [master] pid:16242 killing deviceLogProc pid: 16245
xctest-client.js:270:14 [master] pid:16242 killing runnerProc pid: 16248
xctest-client.js:276:14 [master] pid:16242 killing iproxyProc pid: 16247
app-inspector:66:44 [master] pid:16242 Error: socket hang up
at createHangUpError (_http_client.js:302:15)
at Socket.socketOnEnd (_http_client.js:394:23)
at emitNone (events.js:91:20)
at Socket.emit (events.js:188:7)
at endReadableNT (_stream_readable.js:975:12)
at _combinedTickCallback (internal/process/next_tick.js:80:11)
at process._tickCallback (internal/process/next_tick.js:104:9)
(node:16242) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: >> app-inspector:66:44 [master] pid:16242 Error: socket hang up
at createHangUpError (_http_client.js:302:15)
at Socket.socketOnEnd (_http_client.js:394:23)
at emitNone (events.js:91:20)
at Socket.emit (events.js:188:7)
at endReadableNT (_stream_readable.js:975:12)
at _combinedTickCallback (internal/process/next_tick.js:80:11)
at process._tickCallback (internal/process/next_tick.js:104:9)
(node:16242) DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
xctest-client.js:145:16 [master] pid:16242 deviceconsole exit with code: null, signal: SIGKILL
有人遇到我这个问题吗 请大神指导

小茗同学 回复

更新 xctest-client 包

app-inspector:66:44 [master] pid:424 undefined
(node:424) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: >> app-inspector:66:44 [master] pid:424 undefined

罂粟 回复

xctest-client.js:181:14 [master] pid:3690 xctest client exit with code: 65, signal: null
xctest-client.js:209:14 [master] pid:3690 iproxy exit with code: null, signal: SIGKILL
xctest-client.js:145:16 [master] pid:3690 deviceconsole exit with code: null, signal: SIGKILL
xctest-client.js:257:14 [master] pid:3690 Fail to start xctest: undefined
app-inspector:66:44 [master] pid:3690 undefined
(node:3690) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: >> app-inspector:66:44 [master] pid:3690 undefined
我的也是这个报错,能帮忙看下怎么解决吗?真机跑起来闪退

Sencho Kong 回复

怎么更新?

1 保证 android-sdk build-tools 25.0.2 安装 android support repository
2 gradle 配置正常

3 npm uninstall macaca-android -g
npm cache clean
cd /tmp
sudo rm -rf npm*

4 再 npm i macaca-android -g 保证安装日志都是 build successful

5 保证 安装完 macaca-android 后 有这个文件 node-global\node_modules\macaca-android\node_modules\uiautomatorwd\app\build\outputs\apk\app-debug.apk

6 再安装 app-inspector 就 OK 了

详见 https://github.com/alibaba/macaca/issues/550

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