xctest client proxy error with: Error: connect ECONNREFUSED 172.18.156.69:8100
See original GitHub issueos: os x 10.11.6 macaca version:1.1.2 ios driver: 1.0.36 device: iPhone6S(9.3.5) 真机运行时,大概率会反复出现此错误(同样的代码步骤可以正常运行过)。出现此提示失败后,设备上过了一段时间才会自动启动起WebDriverAgent并自动关闭。
ERROR LOG:
QA-deMac-mini:~ qa$ macaca server --verbose
>> index.js:17:12 [master] pid:6048 webdriver server start with config:
{ port: 3456,
verbose: true,
ip: '192.168.241.195',
host: 'QA-deMac-mini.local',
loaded_time: '2016-09-12 18:15:55' }
>> middlewares.js:17:10 [master] pid:6048 base middlewares attached
>> router.js:108:10 [master] pid:6048 router set
>> webdriver sdk launched
>> responseHandler.js:11:12 [master] pid:6048 Recieve HTTP Request from Client: method: POST url: /wd/hub/session, jsonBody: {"desiredCapabilities":{"platformVerison":"9.3.5","platformName":"iOS","bundleId":"com.nd.app.factory.jianggongyouth","udid":"<udid>","browserName":"firefox","version":"","javascriptEnabled":true,"platform":"ANY"}}
>> session.js:47:10 [master] pid:6048 Creating session, sessionId: e9d76ab1-ae08-4d74-890b-0f4f5f1dddda.
>> xctest-client.js:43:14 [master] pid:6048 project path: /usr/local/lib/node_modules/macaca-ios/node_modules/xctest-client/node_modules/webdriveragent/WebDriverAgent/WebDriverAgent.xcodeproj
>> macaca-ios.js:130:10 [master] pid:6048 {
"bundleId": "com.nd.app.factory.jianggongyouth",
"platformName": "iOS",
"browserName": "firefox"
}
>> xctest-client.js:183:12 [master] pid:6048 xcode version: 7.3.1
>> WebDriverAgent version: 1.0.25
>> xctest-client.js:156:14 [master] pid:6048 2016-09-12 18:16:03.293 xcodebuild[6054:27353] [MT] IDETestOperationsObserverDebug: (87020BAC-33C0-4DE0-BB81-50C355B6773B) Beginning test session 87020BAC-33C0-4DE0-BB81-50C355B6773B with Xcode 7D1014 on target <DVTiOSDevice: 0x7f85c5683720> {
deviceSerialNumber: FK1QF2JTGRYC
identifier: <udid>
deviceClass: iPhone
deviceName: My iPhone
deviceIdentifier: <udid>
productVersion: 9.3.5
buildVersion: 13G36
deviceSoftwareVersion: 9.3.5 (13G36)
deviceArchitecture: arm64
deviceTotalCapacity: 59669319680
deviceAvailableCapacity: 7193366528
deviceIsTransient: NO
ignored: NO
deviceIsBusy: NO
deviceIsActivated: YES
deviceActivationState: Activated
deviceType: <DVTDeviceType:0x7f85c53c0a90 Xcode.DeviceType.iPhone>
supportedDeviceFamilies: (
1
)
applications: (null)
provisioningProfiles: (null)
activityProgress: -2
activityTitle:
hasInternalSupport: NO
isSupportedOS: YES
developerDiskMountError: (null)
(null)
} (9.3.5 (13G36))
>> xctest-client.js:156:14 [master] pid:6048 2016-09-12 18:16:03.296 xcodebuild[6054:27355] IDETestOperationsObserverDebug: Writing diagnostic log for test session to:
/Users/qa/Library/Developer/Xcode/DerivedData/WebDriverAgent-drmzhetqodgefhaqpyureuezairh/Logs/Test/616A811A-9156-45F8-A4E1-969BE3F2DAD9/Session-2016-09-12_18:16:03-bizmtg.log
>> xctest-client.js:156:14 [master] pid:6048 MDMCreateDeltaDirectory:1920 calling MDMDirectoryDiff with:
state->old_bundle: /var/folders/7x/rvnhm1zs44j1mkq4fg6qzqqm0000gn/C/com.apple.DeveloperTools/All/Xcode/EmbeddedAppDeltas/7566f7ff6f0cd873d892945ee2a11b48/<udid>/WebDriverAgentRunner-Runner.app
state->new_bundle: /Users/qa/Library/Developer/Xcode/DerivedData/WebDriverAgent-drmzhetqodgefhaqpyureuezairh/Build/Products/Debug-iphoneos/WebDriverAgentRunner-Runner.app
state->dst_bundle: /var/folders/7x/rvnhm1zs44j1mkq4fg6qzqqm0000gn/C/com.apple.DeveloperTools/All/Xcode/EmbeddedAppDeltas/WebDriverAgentRunner-Runner.app.BC8Qop/WebDriverAgentRunner-Runner.app_sparse.ipa/Payload//WebDriverAgentRunner-Runner.app, binaryDiff flag: FALSE
dst_ipa: /var/folders/7x/rvnhm1zs44j1mkq4fg6qzqqm0000gn/C/com.apple.DeveloperTools/All/Xcode/EmbeddedAppDeltas/WebDriverAgentRunner-Runner.app.BC8Qop/WebDriverAgentRunner-Runner.app_sparse.ipa
>> xctest-client.js:156:14 [master] pid:6048 __MDMDirectoryDiff_block_invoke37:1473 calling writeDictToFile with: /var/folders/7x/rvnhm1zs44j1mkq4fg6qzqqm0000gn/C/com.apple.DeveloperTools/All/Xcode/EmbeddedAppDeltas/WebDriverAgentRunner-Runner.app.BC8Qop/WebDriverAgentRunner-Runner.app_sparse.ipa/ManifestCache.plist
>> xctest-client.js:156:14 [master] pid:6048 writeDictToFile:1278 ==== Successfully wrote Manifest cache to /var/folders/7x/rvnhm1zs44j1mkq4fg6qzqqm0000gn/C/com.apple.DeveloperTools/All/Xcode/EmbeddedAppDeltas/WebDriverAgentRunner-Runner.app.BC8Qop/WebDriverAgentRunner-Runner.app_sparse.ipa/ManifestCache.plist
>> proxy.js:54:14 [master] pid:6048 Proxy: /session:POST to http://172.18.156.69:8100/session:POST with body: {"desiredCapabilities":{"bundleId":"com.nd.app.factory.jianggongyouth","platformName":"iOS","browserName":"firefox"}}
>> proxy.js:58:18 [master] pid:6048 xctest client proxy error with: Error: connect ECONNREFUSED 172.18.156.69:8100
/usr/local/lib/node_modules/macaca-ios/node_modules/xlogger/lib/xlogger.js:169
throw new Error(res);
^
Error: >> proxy.js:58:18 [master] pid:6048 xctest client proxy error with: Error: connect ECONNREFUSED 172.18.156.69:8100
at Logger.error (/usr/local/lib/node_modules/macaca-ios/node_modules/xlogger/lib/xlogger.js:169:9)
at Request._callback (/usr/local/lib/node_modules/macaca-ios/node_modules/xctest-client/lib/proxy.js:58:18)
at self.callback (/usr/local/lib/node_modules/macaca-ios/node_modules/xctest-client/node_modules/request/request.js:199:22)
at emitOne (events.js:77:13)
at Request.emit (events.js:169:7)
at Request.onRequestError (/usr/local/lib/node_modules/macaca-ios/node_modules/xctest-client/node_modules/request/request.js:821:8)
at emitOne (events.js:77:13)
at ClientRequest.emit (events.js:169:7)
at Socket.socketErrorListener (_http_client.js:269:9)
at emitOne (events.js:77:13)
at Socket.emit (events.js:169:7)
at emitErrorNT (net.js:1269:8)
at nextTickCallbackWith2Args (node.js:442:9)
at process._tickCallback (node.js:356:17)
Issue Analytics
- State:
- Created 7 years ago
- Comments:18 (6 by maintainers)
Top Results From Across the Web
xctest client proxy error with: Error: connect ECONNREFUSED ...
xctest client proxy error with: Error : connect ECONNREFUSED ... but i take my client to connect localhost:8100, but got below error:
Read more >node proxy error Error: connect ECONNREFUSED
ECONNREFUSED means there is no server process listening at the specified port. What hostname and port are you using? Can you connect ...
Read more >connect econnrefused 127.0.0.1:8100 - You.com - You.com
Unable to start WebDriverAgent : Could not proxy command to remote server. Original error: Error: connect ECONNREFUSED 127.0.0.1:8100.
Read more >Untitled
proxy.js:63:22 [master] pid:3194 xctest client proxy error with: Error: connect ECONNREFUSED 127.0.0.1:8001 proxy.js:63:22 [master] pid:3194 xctest client ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@candialala 找到原因了,自己解决的,原因是xctest-client.js里设置的sleep时间太短了导致WDA还没启动macaca就已经开始去访问8100了,将xctest-clients.js中的yield _.sleep(10000); 的sleep时间增加就可以了,具体看你真机的启动速度,我改成了yield _.sleep(20000); 就是20秒,就可以了,不会碰到此问题了。 xctest-clients.js文件的位置在/usr/local/lib/node_modules/macaca-ios/node_modules/xctest-client/lib/xctest-client.js
@candialala 你这个错误和我的不一样,你的是TIMEDOUT,这个应该是跟这个问题一样https://github.com/facebook/WebDriverAgent/issues/288