基于对稳定,并行,快速几个因素的考量, Macaca 重构了底层驱动,升级大版本到 2.x。
请各位升级驱动模块和工具版本如下:
步骤:升级 macaca-cli -> 执行 macaca doctor 升级环境 -> 安装所需驱动
升级更新速度很快,加油 macaca 团队!
加油 macaca 团队! 加油 macaca 团队! 还有 python send_keys 的方法啥时候能修复?
改动好大
@xdf 升级完最新版本后报错 ,好像是 XCTESTWD 的签名问题,但是我用的是模拟器。求解!
你好, 目前我们这边驱动层项目中未设置签名,
能否到以上路径,打开 xcode 项目 XCTestWD.xcodeproj 尝试运行一下 test case “XCTestWDUITest” 看会遇到问题吗
XCTestWD 相对 FB 原版 WDA,主要做了哪些改进呢?目前就遇到了 WDA 恩多不稳定因素。
尝试失败。
XCODE 中 sign 显示 Signing for "XCTestWD" requires a development team.
用自己的 APPLEID 也构建不了 会有以下报错 缺少文件
/Users/pkfameli/Library/Developer/Xcode/DerivedData/XCTestWD-hciuvgqktqikusgizypqvqcmnddm/Build/Intermediates/XCTestWD.build/Debug-iphonesimulator/XCTestWD.build/Script-63D408691EAB64FC00198736.sh: line 2: /usr/local/bin/carthage: No such file or directory
这个是正常配置,xcode 对模拟器不需要证书配置也能运行的, 请直接选择左边面板的 testRunner() 并执行该用例 看能否执行,或者报错
如果有报错,麻烦看一下什么错误
iOS 的 name 是 udid 吗?XCTestWD 工程各项配置(bundleid、team 等),还是有报错
linker command failed...能不能给个详细的教程啊
linked command failed 请给详细的错误日志, 这样好方便排查问题. 请参考对 lmf 问题的做法, 收集一下错误日志 谢谢 :)
默认配置就好的, 不需要配置其他东西,如果在 xcode 上直接运行 test case 肯定会有错误原因的, IDE 上会给红色的小感叹号提示,请把这个信息给我, 这样我们才能更快的帮您解决问题 :)
不用去修改这个的 模拟器的话 不需要签名应该也可以跑起来,我估计你跟我是一个问题。你按照他给我的方法跑一次 testcase 试试
在更新新版本的时候,已经更新过 carthage,但是没用。现在用 brew install carthage 安装了 0.22.0 版本,您所截图的 testcase 已经能够执行了。问题已解决
不需要执行 carthage update 指令 安装好 carthage 就好, 你安装好 carthage 冲刷以下最新版 macaca 吧 cnpm i macaca-ios -g
还真自己搞了一个 wda
跑原来的官方例子目前到最后几步会出错,跑自己的 APP 进入 APP 后会报错,脚本在未升级前是完全可以跑通的,现在升级之后问题很多,请帮忙看下。
element_by_xpath(css)不知道啥时候可以 ok?
运行官网的示例是可以运行的,但是 name 定位会报错,send_keys 只能输入一个字符.
另外一个问题,ios 真机运行不起来...
@Test_Sir 我在安卓真机上运行是可以的。需要将 wd.py 升级
你好,我想请问下 macaca doctor
GRADLE_HOME is not set 这个是什么问题啊?
ios 真机真不行,app-inspector 没问题
app-inspector xpath 功能正在调整 https://github.com/macacajs/app-inspector/pull/103/files
什么时候能支持 iOS 的真机
@codeskyblue 欢迎使用
responseHandler.js:11:12 [master] pid:465 Recieve HTTP Request from Client[2017-05-22 17:31:19]: method: POST url: /wd/hub/session, jsonBody: {"desiredCapabilities":{"app":"/Users/test/Downloads/Elephant.app.zip","reuse":3,"platformName":"ios","udid":"fc99e044076957f2f7d22739baf7f52705f952c3"}}
session.js:47:10 [master] pid:465 Creating session, sessionId: fcab3729-1fbb-4371-8dfc-882c651963b9.
helper.js:194:12 [master] pid:465 Unzipping local app form /Users/test/Downloads/Elephant.app.zip
CFBundleIdentifier is com.meituan.message
Get bundleId com.meituan.message from plist /var/folders/vw/3l0zs0lx5hgbfn_jpxj011w40000gn/T/Elephant.app/Info.plist
responseHandler.js:54:12 [master] pid:465 Send Error Respone to Client: Error: spawn ios-deploy ENOENT
responseHandler.js:60:14 [master] pid:465 Error: spawn ios-deploy ENOENT
at exports._errnoException (util.js:1034:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
at onErrorNT (internal/child_process.js:367:16)
at _combinedTickCallback (internal/process/next_tick.js:80:11)
at process._tickCallback (internal/process/next_tick.js:104:9)
Error: spawn ios-deploy ENOENT
at exports._errnoException (util.js:1034:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
at onErrorNT (internal/child_process.js:367:16)
at _combinedTickCallback (internal/process/next_tick.js:80:11)
at process._tickCallback (internal/process/next_tick.js:104:9)
macaca doctor 显示正常
app-inspector 查看元素正常
/usr/local/lib/node_modules/macaca-ios/node_modules/xctestwd/XCTestWD/XCTestWD.xcodeproj 这个文件的签名已经改好了
请大神指教
我模拟器上能正常运行,真机真心跑不起来,倒腾了几天还是跑不起来
macaca 发展好快,支持!下面来看看 XCTestWD
android xpath 问题什么时候能修复,等得好焦急
@jack30639 在抓紧处理
启动不了
macaca-ios.js:151:10 [master] pid:34371 Trying to start xctestwd server...
BundleId XCTestWD.XCTestWD does not exist.xctest-client.js:175:14 [master] pid:34371 please check project: /usr/local/lib/node_modules/macaca-ios/node_modules/xctestwd/XCTestWD/XCTestWD.xcodeproj
xctest-client.js:257:14 [master] pid:34371 killing deviceLogProc pid: 34379
xctest-client.js:262:14 [master] pid:34371 killing runnerProc pid: 34382
xctest-client.js:268:14 [master] pid:34371 killing iproxyProc pid: 34381
xctest-client.js:185:14 [master] pid:34371 xctest client exit with code: 65, signal: null
升级新版
xctest-client.js:257:14 [master] pid:4752 killing deviceLogProc pid: 4761
xctest-client.js:262:14 [master] pid:4752 killing runnerProc pid: 4764
xctest-client.js:268:14 [master] pid:4752 killing iproxyProc pid: 4763
responseHandler.js:54:12 [master] pid:4752 Send Error Respone to Client: Error: socket hang up
responseHandler.js:60:14 [master] pid:4752 Error: socket hang up
at createHangUpError (_http_client.js:253:15)
at Socket.socketOnEnd (_http_client.js:345:23)
at emitNone (events.js:91:20)
at Socket.emit (events.js:185:7)
at endReadableNT (_stream_readable.js:974:12)
at _combinedTickCallback (internal/process/next_tick.js:80:11)
at process._tickCallback (internal/process/next_tick.js:104:9)
Error: socket hang up
at createHangUpError (_http_client.js:253:15)
at Socket.socketOnEnd (_http_client.js:345:23)
at emitNone (events.js:91:20)
at Socket.emit (events.js:185:7)
at endReadableNT (_stream_readable.js:974:12)
at _combinedTickCallback (internal/process/next_tick.js:80:11)
at process._tickCallback (internal/process/next_tick.js:104:9)
xctest-client.js:147:16 [master] pid:4752 deviceconsole exit with code: null, signal: SIGKILL
xctest-client.js:213:14 [master] pid:4752 iproxy exit with code: null, signal: SIGKILL
xctest-client.js:185:14 [master] pid:4752 xctest client exit with code: null, signal: SIGKILL
@xdf python 的 clear 方法不可用
@xdf 现在输入框的 xpath 不可用(iOS)
uirecorder 什么时候出,现在用的有问题,android 版本输入之后应用会退至后台,iOS 使用 ios-app-bootstrap.zip 包,只能完成登陆操作,后面的元素都找不到了
@aecho 执行 npm i macaca-cli@2.0.3 -g 试试
@aecho 再安装试试,这是警告并不是报错吧
error
执行 app-inspector -u *
提示少了 ios utils
macaca doctor 如下
麻烦看下。已经安装好几次了
@aecho 升级吧
卸载干净
npm uninstall app-inspector -g
清理缓存
npm cache clean
linux: cd /temp
sudo rm -rf npm*
windows :C:\Users\your name\AppData\Local\Temp 下 手动删除 npm 开头相关
重新安装
npm i app-inspector -g
iOS 真机,想要试一下是否可以 launch 起来测试 app,但是遇到了下面的错误,
bundleId: ‘com.xxx.xxx’
^
SyntaxError: Invalid or unexpected token
at createScript (vm.js:53:10)
at Object.runInThisContext (vm.js:95:10)
at Module._compile (module.js:543:28)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at /Users/Cherry/sample-nodejs/node_modules/mocha/lib/mocha.js:230:27
at Array.forEach (native)
at Mocha.loadFiles (/Users/Cherry/sample-nodejs/node_modules/mocha/lib/mocha.js:227:14)
at Mocha.run (/Users/Cherry/sample-nodejs/node_modules/mocha/lib/mocha.js:495:10)
at Object. (/Users/Cherry/sample-nodejs/node_modules/mocha/bin/_mocha:460:18)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.runMain (module.js:605:10)
at run (bootstrap_node.js:423:7)
at startup (bootstrap_node.js:147:9)
at bootstrap_node.js:538:3
知道原因了,囧,这个是由于输入法的原因;
建议大家都用 vs 来调试,可以比较清楚的看到错误地点; 囧。。。
不过确实也无法在真机运行起来,报了新的错误:
responseHandler.js:54:12 [master] pid:1669 Send Error Respone to Client: undefined
InternalServerError: Internal Server Error
at Object.throw (/usr/local/lib/node_modules/macaca-cli/node_modules/koa/lib/context.js:91:23)
at Object.module.exports (/usr/local/lib/node_modules/macaca-cli/node_modules/webdriver-server/lib/server/responseHandler.js:57:17)
at module.exports.throw ()
at onRejected (/usr/local/lib/node_modules/macaca-cli/node_modules/co/index.js:81:24)
at process._tickCallback (internal/process/next_tick.js:109:7)
xctest-client.js:211:14 [master] pid:1669 iproxy exit with code: null, signal: SIGKILL
1) "before all" hookresponseHandler.js:11:12 [master] pid:1669 Recieve HTTP Request from Client[2017-06-11 22:35:30]: method: DELETE url: /wd/hub/session, jsonBody: {}
responseHandler.js:23:14 [master] pid:1669 Send HTTP Respone to Client[2017-06-11 22:35:30]: 405 Method Not Allowed
2) "after all" hook0 passing (4s)
2 failing1) macaca mobile sample "before all" hook:
Error: [init({"platformName":"iOS","autoAcceptAlerts":false,"udid":"xxxxxx","bundleId":"com.xxxxx"})] The environment you requested was unavailable.
at node_modules/macaca-wd/wd/lib/webdriver.js:134:15
at Request._callback (node_modules/macaca-wd/wd/lib/http-utils.js:87:7)
at Request.self.callback (node_modules/macaca-wd/node_modules/request/request.js:368:22)
at Request. (node_modules/macaca-wd/node_modules/request/request.js:1219:14)
at IncomingMessage. (node_modules/macaca-wd/node_modules/request/request.js:1167:12)
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)2) macaca mobile sample "after all" hook:
Error: [quit()] Unexpected data in simpleCallback.
at exports.newError (node_modules/macaca-wd/wd/lib/utils.js:139:13)
at PromiseWebdriver. (node_modules/macaca-wd/wd/lib/callbacks.js:42:12)
at cb (node_modules/macaca-wd/wd/lib/webdriver.js:165:22)
at node_modules/macaca-wd/wd/lib/webdriver.js:179:5
at Request._callback (node_modules/macaca-wd/wd/lib/http-utils.js:87:7)
at Request.self.callback (node_modules/macaca-wd/node_modules/request/request.js:368:22)
at Request. (node_modules/macaca-wd/node_modules/request/request.js:1219:14)
at IncomingMessage. (node_modules/macaca-wd/node_modules/request/request.js:1167:12)
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)
我又重新执行了一下 sample 的例子,模拟器运行,发现也会出现差不多的错误;
仔细回想了今天的操作,就是按照https://testerhome.com/topics/6503中说的执行了一下;
重新装了下 uirecorder, 初始化了一下,想要真机运行,发现也会报错,提示 手机打开失败,请检查 macaca 是否配置正确;
然后还按照https://testerhome.com/topics/7494说的运行了一下,但是都不好使;
上周的时候还能投跑通模拟器,囧,莫非是我今天不小心执行什么操作给把环境整坏了?
急需 @xdf 达峰大神指点迷津啊。。。
下面是模拟器运行 demo 例子的结果:
✓ #4 should cover gestrure (26456ms)
responseHandler.js:11:12 [master] pid:3079 Recieve HTTP Request from Client[2017-06-11 23:05:04]: method: POST url: /wd/hub/session/6681ee88-a7b1-4da1-b6b6-eb2cdd5964b5/elements, jsonBody: {"using":"name","value":"list"}
proxy.js:55:14 [master] pid:3079 Proxy: /wd/hub/session/6681ee88-a7b1-4da1-b6b6-eb2cdd5964b5/elements:POST to http://localhost:8001/wd/hub/session/9EBEAB6A-C2A4-49C9-A18C-91BD2D444645/elements:POST with body: {"using":"name","value":"list"}
proxy.js:83:20 [master] pid:3079 Got response with status 200: {"sessionId":"","status":0,"value":[{"ELEMENT":"EF475BF0-542F-47D1-BC2A-8BF6A6A761ED","label":"list","type":"XCUIElementTypeStaticText"},{"ELEMENT":"D0E3C3D6-5D86-4157-8A7E-CE3DFD1DAABD","label":""...
session.js:107:14 [master] pid:3079 Send HTTP Respone to Client[2017-06-11 23:05:04]: {"sessionId":"","status":0,"value":"[{\"ELEMENT\":\"EF475BF0-542F-47D1-BC2A-8BF6A6A761ED\",\"label\":\"list\",\"type\":\"XCUIElementTypeStaticText\"},{\"ELEMENT\":\"D0E3C3D6-5D86-4157-8A7E-CE3DFD1DAABD\",\"label\":\"\",\"type\":\"XCUIElementTypeNavigationBar\"}]"}
responseHandler.js:11:12 [master] pid:3079 Recieve HTTP Request from Client[2017-06-11 23:05:04]: method: POST url: /wd/hub/session/6681ee88-a7b1-4da1-b6b6-eb2cdd5964b5/element/EF475BF0-542F-47D1-BC2A-8BF6A6A761ED/click, jsonBody: {}
proxy.js:55:14 [master] pid:3079 Proxy: /wd/hub/session/6681ee88-a7b1-4da1-b6b6-eb2cdd5964b5/element/EF475BF0-542F-47D1-BC2A-8BF6A6A761ED/click:POST to http://localhost:8001/wd/hub/session/9EBEAB6A-C2A4-49C9-A18C-91BD2D444645/element/EF475BF0-542F-47D1-BC2A-8BF6A6A761ED/click:POST with body: {}
proxy.js:83:20 [master] pid:3079 Got response with status 200: {"sessionId":"","status":0,"value":""}
session.js:107:14 [master] pid:3079 Send HTTP Respone to Client[2017-06-11 23:05:05]: {"sessionId":"","status":0,"value":""}
responseHandler.js:11:12 [master] pid:3079 Recieve HTTP Request from Client[2017-06-11 23:05:06]: method: POST url: /wd/hub/session/6681ee88-a7b1-4da1-b6b6-eb2cdd5964b5/element, jsonBody: {"using":"name","value":"Webview"}
proxy.js:55:14 [master] pid:3079 Proxy: /wd/hub/session/6681ee88-a7b1-4da1-b6b6-eb2cdd5964b5/element:POST to http://localhost:8001/wd/hub/session/9EBEAB6A-C2A4-49C9-A18C-91BD2D444645/element:POST with body: {"using":"name","value":"Webview"}
proxy.js:83:20 [master] pid:3079 Got response with status 200: {"sessionId":"","status":0,"value":{"ELEMENT":"65019776-0E2A-4CA7-8A19-6F5BF687689B","label":"Webview","type":"XCUIElementTypeButton"}}
session.js:107:14 [master] pid:3079 Send HTTP Respone to Client[2017-06-11 23:05:06]: {"sessionId":"","status":0,"value":"{\"ELEMENT\":\"65019776-0E2A-4CA7-8A19-6F5BF687689B\",\"label\":\"Webview\",\"type\":\"XCUIElementTypeButton\"}"}
responseHandler.js:11:12 [master] pid:3079 Recieve HTTP Request from Client[2017-06-11 23:05:06]: method: POST url: /wd/hub/session/6681ee88-a7b1-4da1-b6b6-eb2cdd5964b5/element/65019776-0E2A-4CA7-8A19-6F5BF687689B/click, jsonBody: {}
proxy.js:55:14 [master] pid:3079 Proxy: /wd/hub/session/6681ee88-a7b1-4da1-b6b6-eb2cdd5964b5/element/65019776-0E2A-4CA7-8A19-6F5BF687689B/click:POST to http://localhost:8001/wd/hub/session/9EBEAB6A-C2A4-49C9-A18C-91BD2D444645/element/65019776-0E2A-4CA7-8A19-6F5BF687689B/click:POST with body: {}
proxy.js:83:20 [master] pid:3079 Got response with status 200: {"sessionId":"","status":0,"value":""}
session.js:107:14 [master] pid:3079 Send HTTP Respone to Client[2017-06-11 23:05:06]: {"sessionId":"","status":0,"value":""}
responseHandler.js:11:12 [master] pid:3079 Recieve HTTP Request from Client[2017-06-11 23:05:09]: method: GET url: /wd/hub/session/6681ee88-a7b1-4da1-b6b6-eb2cdd5964b5/screenshot, jsonBody: {}
proxy.js:55:14 [master] pid:3079 Proxy: /wd/hub/session/6681ee88-a7b1-4da1-b6b6-eb2cdd5964b5/screenshot:GET to http://localhost:8001/wd/hub/session/9EBEAB6A-C2A4-49C9-A18C-91BD2D444645/screenshot:GET with body:
proxy.js:83:20 [master] pid:3079 Got response with status 200: {"sessionId":"6681ee88-a7b1-4da1-b6b6-eb2cdd5964b5","status":0,"value":"iVBORw0KGgoAAAANSUhEUgAAAu4AAAU2CAYAAADK1zMGAAAAAXNSR0IArs4c6QAAABxpRE9UAAAAAgAAAAAAAAKbAAAAKAAAApsAAAKbAADzX0Xg39YAAEAASURBV...
responseHandler.js:47:14 [master] pid:3079 Send HTTP Respone to Client[2017-06-11 23:05:09]: {"sessionId":"6681ee88-a7b1-4da1-b6b6-eb2cdd5964b5","status":0,"value":"\"iVBORw0KGgoAAAANSUhEUgAAAu4AAAU2CAYAAADK1zMGAAAAAXNSR0IArs4c6QAAABxpRE9UAAAAAgAAAAAAAAKbAAAAKAAAApsAAAKbAADzX0Xg39YAAEAASURBVHgB7J0F2OS29fXDzMwMG2yYGmZmaGADDXM2zNgwM2PDzAwNNMzMzMxQ0pef/9+daPTKNGPPzuwePc+u57VlST46lo6uruQhfvvtN6d/wkAcEAfEAXFAHBAHxAFxQBzobg4MoQrq7gpS/ah+xAFxQBwQB8QBcUAcEAfggIS7Zhw04yIOiAPigDggDogD4oA40AMckHDvgUrSKFujbHFAHBAHxAFxQBwQB8QBCXcJd42wxQFxQBwQB8QBcUAcEAd6gAMS7j1QSRpha4Qt..."}
responseHandler.js:11:12 [master] pid:3079 Recieve HTTP Request from Client[2017-06-11 23:05:09]: method: GET url: /wd/hub/session/6681ee88-a7b1-4da1-b6b6-eb2cdd5964b5/contexts, jsonBody: {}
{ Error: Command failed: which ios_webkit_debug_proxy
at ChildProcess.exithandler (child_process.js:205:12)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:194:7)
at maybeClose (internal/child_process.js:899:16)
at Socket. (internal/child_process.js:342:11)
at emitOne (events.js:96:13)
at Socket.emit (events.js:191:7)
at Pipe._handle.close as _onclose
killed: false,
code: 1,
signal: null,
cmd: 'which ios_webkit_debug_proxy' }
responseHandler.js:54:12 [master] pid:3079 Send Error Respone to Client: Error: ios_webkit_debug_proxy not found, please install.
responseHandler.js:60:14 [master] pid:3079 Error: ios_webkit_debug_proxy not found, please install.
at WebkitProxy.start (/usr/local/lib/node_modules/macaca-ios/node_modules/_node-ios-webkit-debug-proxy@1.0.1@node-ios-webkit-debug-proxy/lib/node-ios-webkit-debug-proxy.js:37:13)
at start.throw ()
at onRejected (/usr/local/lib/node_modules/macaca-cli/node_modules/co/index.js:81:24)
Error: ios_webkit_debug_proxy not found, please install.
at WebkitProxy.start (/usr/local/lib/node_modules/macaca-ios/node_modules/_node-ios-webkit-debug-proxy@1.0.1@node-ios-webkit-debug-proxy/lib/node-ios-webkit-debug-proxy.js:37:13)
at start.throw ()
at onRejected (/usr/local/lib/node_modules/macaca-cli/node_modules/co/index.js:81:24)
1) #5 should go into webview
responseHandler.js:11:12 [master] pid:3079 Recieve HTTP Request from Client[2017-06-11 23:05:10]: method: GET url: /wd/hub/session/6681ee88-a7b1-4da1-b6b6-eb2cdd5964b5/contexts, jsonBody: {}
remote-debugger.js:63:12 [master] pid:3079 Getting pages from url: http://localhost:null/json
responseHandler.js:54:12 [master] pid:3079 Send Error Respone to Client: RequestError: Error: connect ECONNREFUSED 127.0.0.1:80
responseHandler.js:60:14 [master] pid:3079 RequestError: Error: connect ECONNREFUSED 127.0.0.1:80
at new RequestError (/usr/local/lib/node_modules/macaca-ios/node_modules/_request-promise@2.0.1@request-promise/lib/errors.js:11:15)
at Request.RP$callback as _callback
at self.callback (/usr/local/lib/node_modules/macaca-ios/node_modules/_request@2.81.0@request/request.js:188:22)
at emitOne (events.js:96:13)
at Request.emit (events.js:191:7)
at Request.onRequestError (/usr/local/lib/node_modules/macaca-ios/node_modules/_request@2.81.0@request/request.js:884:8)
at emitOne (events.js:96:13)
at ClientRequest.emit (events.js:191:7)
at Socket.socketErrorListener (_http_client.js:358:9)
at emitOne (events.js:96:13)
at Socket.emit (events.js:191:7)
at emitErrorNT (net.js:1284:8)
at _combinedTickCallback (internal/process/next_tick.js:80:11)
at process._tickCallback (internal/process/next_tick.js:104:9)
RequestError: Error: connect ECONNREFUSED 127.0.0.1:80
at new RequestError (/usr/local/lib/node_modules/macaca-ios/node_modules/_request-promise@2.0.1@request-promise/lib/errors.js:11:15)
at Request.RP$callback as _callback
at self.callback (/usr/local/lib/node_modules/macaca-ios/node_modules/_request@2.81.0@request/request.js:188:22)
at emitOne (events.js:96:13)
at Request.emit (events.js:191:7)
at Request.onRequestError (/usr/local/lib/node_modules/macaca-ios/node_modules/_request@2.81.0@request/request.js:884:8)
at emitOne (events.js:96:13)
at ClientRequest.emit (events.js:191:7)
at Socket.socketErrorListener (_http_client.js:358:9)
at emitOne (events.js:96:13)
at Socket.emit (events.js:191:7)
at emitErrorNT (net.js:1284:8)
at _combinedTickCallback (internal/process/next_tick.js:80:11)
at process._tickCallback (internal/process/next_tick.js:104:9)
2) #6 should go into test
responseHandler.js:11:12 [master] pid:3079 Recieve HTTP Request from Client[2017-06-11 23:05:10]: method: GET url: /wd/hub/session/6681ee88-a7b1-4da1-b6b6-eb2cdd5964b5/contexts, jsonBody: {}
remote-debugger.js:63:12 [master] pid:3079 Getting pages from url: http://localhost:null/json
responseHandler.js:54:12 [master] pid:3079 Send Error Respone to Client: RequestError: Error: connect ECONNREFUSED 127.0.0.1:80
responseHandler.js:60:14 [master] pid:3079 RequestError: Error: connect ECONNREFUSED 127.0.0.1:80
at new RequestError (/usr/local/lib/node_modules/macaca-ios/node_modules/_request-promise@2.0.1@request-promise/lib/errors.js:11:15)
at Request.RP$callback as _callback
at self.callback (/usr/local/lib/node_modules/macaca-ios/node_modules/_request@2.81.0@request/request.js:188:22)
at emitOne (events.js:96:13)
at Request.emit (events.js:191:7)
at Request.onRequestError (/usr/local/lib/node_modules/macaca-ios/node_modules/_request@2.81.0@request/request.js:884:8)
at emitOne (events.js:96:13)
at ClientRequest.emit (events.js:191:7)
at Socket.socketErrorListener (_http_client.js:358:9)
at emitOne (events.js:96:13)
at Socket.emit (events.js:191:7)
at emitErrorNT (net.js:1284:8)
at _combinedTickCallback (internal/process/next_tick.js:80:11)
at process._tickCallback (internal/process/next_tick.js:104:9)
RequestError: Error: connect ECONNREFUSED 127.0.0.1:80
at new RequestError (/usr/local/lib/node_modules/macaca-ios/node_modules/_request-promise@2.0.1@request-promise/lib/errors.js:11:15)
at Request.RP$callback as _callback
at self.callback (/usr/local/lib/node_modules/macaca-ios/node_modules/_request@2.81.0@request/request.js:188:22)
at emitOne (events.js:96:13)
at Request.emit (events.js:191:7)
at Request.onRequestError (/usr/local/lib/node_modules/macaca-ios/node_modules/_request@2.81.0@request/request.js:884:8)
at emitOne (events.js:96:13)
at ClientRequest.emit (events.js:191:7)
at Socket.socketErrorListener (_http_client.js:358:9)
at emitOne (events.js:96:13)
at Socket.emit (events.js:191:7)
at emitErrorNT (net.js:1284:8)
at _combinedTickCallback (internal/process/next_tick.js:80:11)
at process._tickCallback (internal/process/next_tick.js:104:9)
3) #7 should works with web
responseHandler.js:11:12 [master] pid:3079 Recieve HTTP Request from Client[2017-06-11 23:05:10]: method: GET url: /wd/hub/session/6681ee88-a7b1-4da1-b6b6-eb2cdd5964b5/contexts, jsonBody: {}
remote-debugger.js:63:12 [master] pid:3079 Getting pages from url: http://localhost:null/json
responseHandler.js:54:12 [master] pid:3079 Send Error Respone to Client: RequestError: Error: connect ECONNREFUSED 127.0.0.1:80
responseHandler.js:60:14 [master] pid:3079 RequestError: Error: connect ECONNREFUSED 127.0.0.1:80
at new RequestError (/usr/local/lib/node_modules/macaca-ios/node_modules/_request-promise@2.0.1@request-promise/lib/errors.js:11:15)
at Request.RP$callback as _callback
at self.callback (/usr/local/lib/node_modules/macaca-ios/node_modules/_request@2.81.0@request/request.js:188:22)
at emitOne (events.js:96:13)
at Request.emit (events.js:191:7)
at Request.onRequestError (/usr/local/lib/node_modules/macaca-ios/node_modules/_request@2.81.0@request/request.js:884:8)
at emitOne (events.js:96:13)
at ClientRequest.emit (events.js:191:7)
at Socket.socketErrorListener (_http_client.js:358:9)
at emitOne (events.js:96:13)
at Socket.emit (events.js:191:7)
at emitErrorNT (net.js:1284:8)
at _combinedTickCallback (internal/process/next_tick.js:80:11)
at process._tickCallback (internal/process/next_tick.js:104:9)
RequestError: Error: connect ECONNREFUSED 127.0.0.1:80
at new RequestError (/usr/local/lib/node_modules/macaca-ios/node_modules/_request-promise@2.0.1@request-promise/lib/errors.js:11:15)
at Request.RP$callback as _callback
at self.callback (/usr/local/lib/node_modules/macaca-ios/node_modules/_request@2.81.0@request/request.js:188:22)
at emitOne (events.js:96:13)
at Request.emit (events.js:191:7)
at Request.onRequestError (/usr/local/lib/node_modules/macaca-ios/node_modules/_request@2.81.0@request/request.js:884:8)
at emitOne (events.js:96:13)
at ClientRequest.emit (events.js:191:7)
at Socket.socketErrorListener (_http_client.js:358:9)
at emitOne (events.js:96:13)
at Socket.emit (events.js:191:7)
at emitErrorNT (net.js:1284:8)
at _combinedTickCallback (internal/process/next_tick.js:80:11)
at process._tickCallback (internal/process/next_tick.js:104:9)
4) #8 should logout success
responseHandler.js:11:12 [master] pid:3079 Recieve HTTP Request from Client[2017-06-11 23:05:11]: method: DELETE url: /wd/hub/session/6681ee88-a7b1-4da1-b6b6-eb2cdd5964b5, jsonBody: {}
macaca-ios.js:348:10 [master] pid:3079 Stoping iOS driver...
xctest-client.js:255:14 [master] pid:3079 killing deviceLogProc pid: 3195
xctest-client.js:260:14 [master] pid:3079 killing runnerProc pid: 3194
macaca-ios.js:372:10 [master] pid:3079 iOS driver cleaned up.
session.js:80:12 [master] pid:3079 Delete session, sessionId: 6681ee88-a7b1-4da1-b6b6-eb2cdd5964b5
responseHandler.js:47:14 [master] pid:3079 Send HTTP Respone to Client[2017-06-11 23:05:11]: {"sessionId":"6681ee88-a7b1-4da1-b6b6-eb2cdd5964b5","status":0}
xctest-client.js:108:18 [master] pid:3079 simulator log process exit with code: null, signal: SIGKILL4 passing (2m)
4 failing1) macaca mobile sample #5 should go into webview:
Error: [contexts()] Not JSON response
at exports.newError (node_modules/macaca-wd/wd/lib/utils.js:139:13)
at node_modules/macaca-wd/wd/lib/callbacks.js:59:17
at node_modules/macaca-wd/wd/lib/webdriver.js:179:5
at Request._callback (node_modules/macaca-wd/wd/lib/http-utils.js:87:7)
at Request.self.callback (node_modules/macaca-wd/node_modules/request/request.js:368:22)
at Request. (node_modules/macaca-wd/node_modules/request/request.js:1219:14)
at IncomingMessage. (node_modules/macaca-wd/node_modules/request/request.js:1167:12)
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)2) macaca mobile sample #6 should go into test:
Error: [contexts()] Not JSON response
at exports.newError (node_modules/macaca-wd/wd/lib/utils.js:139:13)
at node_modules/macaca-wd/wd/lib/callbacks.js:59:17
at node_modules/macaca-wd/wd/lib/webdriver.js:179:5
at Request._callback (node_modules/macaca-wd/wd/lib/http-utils.js:87:7)
at Request.self.callback (node_modules/macaca-wd/node_modules/request/request.js:368:22)
at Request. (node_modules/macaca-wd/node_modules/request/request.js:1219:14)
at IncomingMessage. (node_modules/macaca-wd/node_modules/request/request.js:1167:12)
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)3) macaca mobile sample #7 should works with web:
Error: [contexts()] Not JSON response
at exports.newError (node_modules/macaca-wd/wd/lib/utils.js:139:13)
at node_modules/macaca-wd/wd/lib/callbacks.js:59:17
at node_modules/macaca-wd/wd/lib/webdriver.js:179:5
at Request._callback (node_modules/macaca-wd/wd/lib/http-utils.js:87:7)
at Request.self.callback (node_modules/macaca-wd/node_modules/request/request.js:368:22)
at Request. (node_modules/macaca-wd/node_modules/request/request.js:1219:14)
at IncomingMessage. (node_modules/macaca-wd/node_modules/request/request.js:1167:12)
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)4) macaca mobile sample #8 should logout success:
Error: [contexts()] Not JSON response
at exports.newError (node_modules/macaca-wd/wd/lib/utils.js:139:13)
at node_modules/macaca-wd/wd/lib/callbacks.js:59:17
at node_modules/macaca-wd/wd/lib/webdriver.js:179:5
at Request._callback (node_modules/macaca-wd/wd/lib/http-utils.js:87:7)
at Request.self.callback (node_modules/macaca-wd/node_modules/request/request.js:368:22)
at Request. (node_modules/macaca-wd/node_modules/request/request.js:1219:14)
at IncomingMessage. (node_modules/macaca-wd/node_modules/request/request.js:1167:12)
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)xctest-client.js:183:14 [master] pid:3079 xctest client exit with code: null, signal: SIGKILL
Test completed!
sudo rm -rf npm* 是让你到 缓存目录 /temp 清除 npm 缓存。。。。 你执行路径执行错了 把 npm 误删除了吧 重新安装 nodejs 吧那
执行用例时,macaca 服务端报以下错误,,macaca 版本为 2.0.4
UIAutomatorWD->http://localhost:9005<-UIAutomatorWD
INSTRUMENTATION_STATUS_CODE: 0
UIAutomatorWD http server ready
uiautomator-client.js:56:14 [master] pid:1388responseHandler.js:54:12 [master] pid:1388 Send Error Respone to Client: get
apk mainifest failed with: Error: Command failed: D:\Users\vincent01.chen\AppDat
a\Local\Android\sdk\build-tools\25.0.2\aapt.exe dump badging D:\Users\vincent01.
chen\AppData\Local\Temp\app-official-debug
ERROR: dump failed because no AndroidManifest.xml found
InternalServerError: Internal Server Error
at Object.throw (D:\Users\vincent01.chen\AppData\Roaming\npm\node_modules\
macaca-cli\node_modules_koa@1.1.2@koa\lib\context.js:91:23)
at Object.module.exports (D:\Users\vincent01.chen\AppData\Roaming\npm\node
_modules\macaca-cli\node_modules_webdriver-server@1.0.77@webdriver-server\lib\s
erver\responseHandler.js:57:17)
at throw (native)
at onRejected (D:\Users\vincent01.chen\AppData\Roaming\npm\node_modules\ma
caca-cli\node_modules_co@4.6.0@co\index.js:81:24)
at process._tickCallback (internal/process/next_tick.js:109:7)
请问下:
The following build commands failed:
Check dependencies
(1 failure)
xctest-client.js:179:14 [master] pid:3744 please check project: /usr/local/lib/node_modules/macaca-ios/node_modules/_xctestwd@1.1.8@xctestwd/XCTestWD/XCTestWD.xcodeproj
xctest-client.js:263:14 [master] pid:3744 killing deviceLogProc pid: 16725
xctest-client.js:268:14 [master] pid:3744 killing runnerProc pid: 16726
xctest-client.js:189:14 [master] pid:3744 xctest client exit with code: 65, signal: null
xctest-client.js:150:16 [master] pid:3744 devicelog exit with code: null, signal: SIGKILL
xctest-client.js:255:14 [master] pid:3744 Fail to start xctest: undefined
responseHandler.js:56:12 [master] pid:3744 Send Error Respone to Client: undefined
InternalServerError: Internal Server Error
at Object.throw (/usr/local/lib/node_modules/macaca-cli/node_modules/_koa@1.1.2@koa/lib/context.js:91:23)
at Object.module.exports (/usr/local/lib/node_modules/macaca-cli/node_modules/_webdriver-server@1.0.79@webdriver-server/lib/server/responseHandler.js:59:17)
at throw (native)
at onRejected (/usr/local/lib/node_modules/macaca-cli/node_modules/_co@4.6.0@co/index.js:81:24)
at process._tickCallback (internal/process/next_tick.js:109:7)
这个错误是什么原因
请问下,使用 uirecorder 录制手机 app 为什么提示:
? 测试脚本文件名: sample/app.js
? App路径 (扩展名: apk, app, zip): C:\Users\Desktop\android_app_bootstrap-debug.apk
录制服务器监听在端口: 9765
DevTools listening on ws://127.0.0.1:12487/devtools/browser/b1b9ff29-2d17-4112-a127-a477d93d819d
手机打开失败,请检查macaca是否配置正确? Internal Server Error
Chrome打开失败!
{ Error: read ECONNRESET
at exports._errnoException (util.js:1029:11)
at TCP.onread (net.js:575:26) code: 'ECONNRESET', errno: 'ECONNRESET', syscall: 'read' }
今天升级了下 macaca 和 app-inspector 后,app-inspecor -u devicesid 报错了,如下 log,有没哪位大神遇到过这问题的呢?@xdf
C:\Users\kavin>macaca doctor
macaca-doctor version: 2.0.4
Node.js checklist:
node env: C:\nodejs\node.exe
node version: v8.9.4
Android checklist:
JAVA version is 1.8.0_144
JAVA_HOME is set to C:\Program Files\Java\jdk1.8.0_144
ANDROID_HOME is set to D:\android-sdk-windows
Platforms is set to D:\android-sdk-windows\platforms\android-27
ADB tool is set to D:\android-sdk-windows\platform-tools\adb.exe
GRADLE_HOME is set to D:\gradle-4.5
Installed driver list:
android: 2.0.46
@xdf
环境貌似没有问题。
执行:
'npm install app-inspector -g '
会报错
检查了 Carthage 也没有问题呢: