Closed bluesky12345 closed 7 years ago
补充端口号更改以后概率性失败日志:
xctest-client.js:175:14 [master] pid:39085 please check project: /usr/local/lib/node_modules/macaca-ios/node_modules/xctestwd/XCTestWD/XCTestWD.xcodeproj proxy.js:55:14 [master] pid:39085 Proxy: /wd/hub/session:POST to http://127.0.0.1:8001/wd/hub/session:POST with body: {"desiredCapabilities":{"bundleId":"com.test.iphone","platformName":"ios"}} proxy.js:61:22 [master] pid:39085 xctest client proxy error with: Error: socket hang up proxy.js:61:22 [master] pid:39085 xctest client proxy error with: Error: socket hang up proxy.js:61:22 [master] pid:39085 xctest client proxy error with: Error: socket hang up proxy.js:61:22 [master] pid:39085 xctest client proxy error with: Error: socket hang up proxy.js:61:22 [master] pid:39085 xctest client proxy error with: Error: socket hang up xctest-client.js:174:14 [master] pid:39085 writeDictToFile:1278 ==== Successfully wrote Manifest cache to /var/folders/_n/sp1mz07j39df6tb2g37v0b4r0000gn/C/com.apple.DeveloperTools/All/Xcode/EmbeddedAppDeltas/5a9aae719511bb65661b0db67cb0cc95/40911ef567d57fcff5813d774fdeb108eaefde1b/ManifestCache.plist
xctest-client.js:175:14 [master] pid:39085 please check project: /usr/local/lib/node_modules/macaca-ios/node_modules/xctestwd/XCTestWD/XCTestWD.xcodeproj proxy.js:61:22 [master] pid:39085 xctest client proxy error with: Error: socket hang up proxy.js:61:22 [master] pid:39085 xctest client proxy error with: Error: socket hang up proxy.js:61:22 [master] pid:39085 xctest client proxy error with: Error: socket hang up proxy.js:61:22 [master] pid:39085 xctest client proxy error with: Error: socket hang up proxy.js:61:22 [master] pid:39085 xctest client proxy error with: Error: socket hang up proxy.js:61:22 [master] pid:39085 xctest client proxy error with: Error: socket hang up xctest-client.js:249:14 [master] pid:39085 Fail to start xctest: Error: socket hang up xctest-client.js:257:14 [master] pid:39085 killing deviceLogProc pid: 39094 xctest-client.js:262:14 [master] pid:39085 killing runnerProc pid: 39097 xctest-client.js:268:14 [master] pid:39085 killing iproxyProc pid: 39096 responseHandler.js:54:12 [master] pid:39085 Send Error Respone to Client: Error: socket hang up responseHandler.js:60:14 [master] pid:39085 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:74:11) at process._tickCallback (internal/process/next_tick.js:98: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:74:11) at process._tickCallback (internal/process/next_tick.js:98:9)
xctest-client.js:147:16 [master] pid:39085 deviceconsole exit with code: null, signal: SIGKILL xctest-client.js:213:14 [master] pid:39085 iproxy exit with code: null, signal: SIGKILL xctest-client.js:185:14 [master] pid:39085 xctest client exit with code: null, signal: SIGKILL
@bluesky12345 麻烦查找一下模拟器的错误日志, 这样可以进一步定位问题, 谢谢啦
/usr/local/lib/node_modules/macaca-ios/node_modules/.1.0.22@xctestwd/lib/proxy.js 第13行: proxyPort: 8100, 改为: proxyPort: 8001,
/usr/local/lib/node_modules/macaca-ios/node_modules/.1.0.22@xctestwd/lib/xctest-client.js 第157行: XCTESTWD_PORT=8001 改为 XCTESTWD_PORT=${this.proxyPort}
@leemony 这个需要我本地修改吗?
嗯我本地改过之后,可以运行了;之前报错跟你一样的
@leemony macaca再次升级会不会覆盖掉本次修改?
macaca-doctor version: 2.0.0
Node.js checklist:
node env: /usr/local/bin/node node version: v7.6.0
iOS checklist:
Xcode is installed at: /Applications/Xcode.app/Contents/Developer
Xcode Command Line Tools is ready, version: 2347.
xcodebuild version: 8.3.2
iproxy[usbmuxd] is installed at: /usr/local/bin/iproxy
ios_webkit_debug_proxy is installed at: /usr/local/bin/ios_webkit_debug_proxy
carthage is installed, version: 0.23.0
Installed driver list: ios: 2.0.9
会的覆盖的,这应该是个bug
@leemony 好的,我本地先尝试按照你的修改试一下,升级之后再看情况处理吧。谢谢!
@leemony 我照着改了,仍然有同样的报错
@bluesky12345 @Only7 macaca-ios 和macaca-cli 有重新安装至最新嘛,上面有贴我的环境,都更新到最新了(xctestwd 已更新到1.0.22)
@leemony 抱歉前一段时间再忙其它事情,没有验证。我参照你的建议修改后出现了InternalServerError错误。我这边macaca的版本是2.0.1。我现在准备卸载重装macaca再验证,谢谢。
npm i macaca-ios@2.0.10 -g
@leemony 是的我的xctestwd是最新1.0.22 之前运行成功过一次,测试机连了次代理关闭后,又开始报同样的错了呢,有解决办法吗?
@Only7 1.0.26
@leemony 有1.0.26了?怎么更新呢?
@Only7 npm i macaca-ios@2.0.11 -g
@leemony 升级了 照着您的方法做了两处的修改 运行成功过几次后 又开始报之前同样的错误,您对这个情况了解吗
@Only7 最新版本已经修正了那两处,不用再改了;如果你发现还能改,那你的环境还没有升级
@leemony 现在发现有时手机重启 可以解决monkey运行问题,有时重启无效,您遇到过这个问题吗?
找到了解决办法,给大家分享下: brew unlink ios-webkit-debug-proxy brew install ios-webkit-debug-proxy brew link ios-webkit-debug-proxy
@Only7 应该还有问题。我都升级到最新版本还是有这个问题,执行第二个用例就会出现socket hang up。
@zsmjluo 我多次操作都是成功的呢~
@Only7 你新版本跑真机没问题?
@Only7 通过对ios-webkit-debug-proxy解决socket hang up问题的原理是什么?不理解。没太懂它和macaca-ios的关系。
xctest-client.js:173:14 [master] pid:28978 please check project: /usr/local/lib/node_modules/macaca-ios/node_modules/xctestwd/XCTestWD/XCTestWD.xcodeproj responseHandler.js:11:12 [master] pid:28978 Recieve HTTP Request from Client[2017-07-13 15:46:37]: method: POST url: /wd/hub/session, jsonBody: {"desiredCapabilities":{"proxyPort":8900,"reuse":3,"bundleId":"xxxxx","platformName":"ios","udid":"74fb0836e738b57b44b52da131856d46d661677f","autoAcceptAlerts":true},"port":3456,"host":"127.0.0.1"} session.js:47:10 [master] pid:28978 Creating session, sessionId: 82b103b5-41ea-482e-bd91-8a09ace9ab2f. macaca-ios.js:245:12 [master] pid:28978 App "xxxxx" is already installed. xctest-client.js:52:14 [master] pid:28978 project path: /usr/local/lib/node_modules/macaca-ios/node_modules/xctestwd/XCTestWD/XCTestWD.xcodeproj macaca-ios.js:159:10 [master] pid:28978 { "bundleId": "xxxxxx", "platformName": "ios" } BundleId XCTestWD.XCTestWD does not exist.
macaca client 2.0.4 启动后一直提示 XCTestWD.XCTestWD does not exist.
Macaca Version: 2.0.1
Macaca Doctor Logs: macaca-doctor version: 2.0.0
Node.js checklist:
node env: /usr/local/bin/node node version: v7.4.0
iOS checklist:
Xcode Command Line Tools require version: 2347 and above xcodebuild version: 8.3.2 iproxy[usbmuxd] is installed at:
/usr/local/bin/iproxy
ios_webkit_debug_proxy is installed at:/usr/local/bin/ios_webkit_debug_proxy
carthage require version 0.22.0 and aboveAndroid checklist:
JAVA version is
1.8.0_111
JAVA_HOME is set to/Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home
ANDROID_HOME is not set Command Line Tools: gradle is uninstalledInstalled driver list:
ios: 2.0.8
Operate System: iOS
Programming Language: Java
端口修改前:
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:103:7)
在case代码中初始化webdriverclient时更改端口后仍然出现高概率的连接失败,app-inspector也存在高概率失败: porps.put("proxyPort", 8001);