admc / wd

A node.js client for webdriver/selenium 2.
Other
1.53k stars 402 forks source link

Upgrade from 1.9.0 to 1.10.0 throws ECONNREFUSED #580

Open zcmgyu opened 5 years ago

zcmgyu commented 5 years ago

I upgrade to wd 1.10.0 throws a lot of error relating to ECONNNREFUSED when call to Appium Server to get status. Though it throws error code, but it still works after 10 times retry. Version 1.9.0 still work fine.

[WD Proxy] Got an unexpected response: {"errno":"ECONNREFUSED","code":"ECONNREFUSED","syscall":"connect","address":"127.0.0.1","port":8100}
[debug] [WD Proxy] Matched '/status' to command name 'getStatus'
[debug] [WD Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[WD Proxy] Got an unexpected response: {"errno":"ECONNREFUSED","code":"ECONNREFUSED","syscall":"connect","address":"127.0.0.1","port":8100}
[debug] [WD Proxy] Matched '/status' to command name 'getStatus'
[debug] [WD Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[WD Proxy] Got an unexpected response: {"errno":"ECONNREFUSED","code":"ECONNREFUSED","syscall":"connect","address":"127.0.0.1","port":8100}
[debug] [WD Proxy] Matched '/status' to command name 'getStatus'
[debug] [WD Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[WD Proxy] Got an unexpected response: {"errno":"ECONNREFUSED","code":"ECONNREFUSED","syscall":"connect","address":"127.0.0.1","port":8100}
[debug] [WD Proxy] Matched '/status' to command name 'getStatus'
[debug] [WD Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[WD Proxy] Got an unexpected response: {"errno":"ECONNREFUSED","code":"ECONNREFUSED","syscall":"connect","address":"127.0.0.1","port":8100}
[debug] [XCUITest] Log file for xcodebuild test: /Users/japanquality/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Logs/Test/Test-WebDriverAgentRunner-2019.03.18_17-51-35-+0700.xcresult/2_Test/Diagnostics/WebDriverAgentRunner-F509EF22-C583-4C0B-9803-D714912F31DE/WebDriverAgentRunner-DB2326F9-92DE-4588-817B-F450EAFF9989/Session-WebDriverAgentRunner-2019-03-18_175138-Uinaac.log
[debug] [WD Proxy] Matched '/status' to command name 'getStatus'
[debug] [WD Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[WD Proxy] Got an unexpected response: {"errno":"ECONNREFUSED","code":"ECONNREFUSED","syscall":"connect","address":"127.0.0.1","port":8100}
[debug] [WD Proxy] Matched '/status' to command name 'getStatus'
[debug] [WD Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[WD Proxy] Got an unexpected response: {"errno":"ECONNREFUSED","code":"ECONNREFUSED","syscall":"connect","address":"127.0.0.1","port":8100}
[debug] [WD Proxy] Matched '/status' to command name 'getStatus'
[debug] [WD Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[WD Proxy] Got an unexpected response: {"errno":"ECONNREFUSED","code":"ECONNREFUSED","syscall":"connect","address":"127.0.0.1","port":8100}
[debug] [WD Proxy] Matched '/status' to command name 'getStatus'
[debug] [WD Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[WD Proxy] Got an unexpected response: {"errno":"ECONNREFUSED","code":"ECONNREFUSED","syscall":"connect","address":"127.0.0.1","port":8100}
[debug] [WD Proxy] Matched '/status' to command name 'getStatus'
[debug] [WD Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [WD Proxy] Got response with status 200: "{\n  \"value\" : {\n    \"state\" : \"success\",\n    \"os\" : {\n      \"name\" : \"iOS\",\n      \"version\" : \"11.4\",\n      \"sdkVersion\" : \"12.0\"\n    },\n    \"ios\" : {\n      \"simulatorVersion\" : \"11.4\",\n      \"ip\" : \"192.168.1.27\"\n    },\n    \"build\" : {\n      \"upgradedAt\" : \"1552890370065\",\n      \"time\" : \"Mar 18 2019 13:26:27\",\n      \"productBundleIdentifier\" : \"com.facebook.WebDriverAgentRunner\"\n    }\n  },\n  \"sessionId\" : \"4E198D8F-5E11-42E4-B6F2-9E3D034EE90F\",\n  \"status\" : 0\n}"
[debug] [XCUITest] WebDriverAgent information:
[debug] [XCUITest] {
[debug] [XCUITest]   "state": "success",
[debug] [XCUITest]   "os": {
[debug] [XCUITest]     "name": "iOS",
[debug] [XCUITest]     "version": "11.4",
[debug] [XCUITest]     "sdkVersion": "12.0"
[debug] [XCUITest]   },
[debug] [XCUITest]   "ios": {
[debug] [XCUITest]     "simulatorVersion": "11.4",
[debug] [XCUITest]     "ip": "192.168.1.27"
[debug] [XCUITest]   },
[debug] [XCUITest]   "build": {
[debug] [XCUITest]     "upgradedAt": "1552890370065",
[debug] [XCUITest]     "time": "Mar 18 2019 13:26:27",
[debug] [XCUITest]     "productBundleIdentifier": "com.facebook.WebDriverAgentRunner"
[debug] [XCUITest]   }
[debug] [XCUITest] }
[debug] [XCUITest] WebDriverAgent successfully started after 10259ms
[debug] [BaseDriver] Event 'wdaSessionAttempted' logged at 1552906302514 (17:51:42 GMT+0700 (Indochina Time))
imurchie commented 5 years ago

This is not wd.

This is Appium polling to see whether the server on the device has been installed and launched. It takes a while, but eventually works.

zcmgyu commented 5 years ago

@imurchie Thanks Imurchie. Though eventually works, but it would happen if I upgraded it to 1.10.0, isn't right? I just call to same Appium Server with different wd version (1.9.0 and 1.10.0 or 1.11.1). 1.9.0 version worked fine

imurchie commented 5 years ago

I'm not sure what you mean. It will happen, in varying degrees, in all versions of Appium.

AnujDasari commented 5 years ago

@imurchie - I face the same issue and I hadn't observed this on the older versions of Appium. Is this expected behaviour? I see a delay of 50-60 seconds before the WEBDRIVERAGENT is successfully started.