Repository: facebookarchive/WebDriverAgent

Issue #810: Error: ESOCKETTIMEDOUT (Appium v1.7.1)
Created: 2017-12-04T09:19:05Z
The problem
When runAppinBackground command send to real device. Connection to WDA timed out
and throws Encountered internal error running command: ProxyRequestError: Could not proxy command to remote server. Original error: Error: ESOCKETTIMEDOUT
Environment

Appium version (or git revision) that exhibits the issue : Appium  v1.7.1
Desktop OS/version used to run Appium : macOS High Sierra 10.13.1
Node.js version (unless using Appium.app|exe) : v8.6.0
Npm Version : 5.5.1
Mobile platform/version under test : iOS 10.3.2
Real device or emulator/simulator: iPhone 6 Plus (Real Device)
Java Version : 1.8.0_20
java-client : 5.0.3

Details
After taking app to background play and coming back to app getting error as Connection to WDA timed out.
Link to Appium logs
[MJSONWP] Calling AppiumDriver.background() with args: [{"timeout":5000},"f16006cf-bb91-4755-a0eb-30ececa0556c"]
[debug] [XCUITest] Executing command 'background'
[debug] [JSONWP Proxy] Proxying [POST /wda/deactivateApp] to [POST http://localhost:8100/session/7D8BC319-B8C6-4CFF-BAA3-4E26D55F62D5/wda/deactivateApp] with body: {"duration":5}
[debug] [XCUITest] Connection to WDA timed out
[MJSONWP] Encountered internal error running command: ProxyRequestError: Could not proxy command to remote server. Original error: Error: ESOCKETTIMEDOUT
at JWProxy.proxy$ (../../../lib/jsonwp-proxy/proxy.js:152:13)
at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at 
[HTTP] <-- POST /wd/hub/session/f16006cf-bb91-4755-a0eb-30ececa0556c/appium/app/background 500 10049 ms - 251
[HTTP] --> POST /wd/hub/session/f16006cf-bb91-4755-a0eb-30ececa0556c/element {"using":"xpath","value":"//XCUIElementTypeOther[1]/XCUIElementTypeOther[1]/XCUIElementTypeTextView"}

Duplicate issue #816: Socket Hangup issue while running Appium tests on iOS
Created: 2017-12-08T06:35:21Z
Platform details:
Appium 1.6.6 beta 4
Device iOS 11.0.3
[MJSONWP] Encountered internal error running command: ProxyRequestError: Could not proxy command to remote server. Original error: Error: socket hang up
at JWProxy.proxy$ (../../../lib/jsonwp-proxy/proxy.js:153:13)
at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
[HTTP] <-- POST /wd/hub/session/05efa98c-2920-43cf-a7b5-a71bff94b810/element/9E4AB275-F868-4083-8469-2A007B3CBC93/value 500 757 ms - 250
[HTTP] --> GET /wd/hub/session/05efa98c-2920-43cf-a7b5-a71bff94b810/screenshot {}
[debug] [MJSONWP] Calling AppiumDriver.getScreenshot() with args: ["05efa98c-2920-43cf-a7b5-a71bff94b810"]
[debug] [XCUITest] Executing command 'getScreenshot'
[debug] [JSONWP Proxy] Proxying [GET /screenshot] to [GET http://localhost:8100/session/1977C350-0164-4412-A9ED-3FD7169D3DD2/screenshot] with no body
[debug] [JSONWP Proxy] Proxying [GET /screenshot] to [GET http://localhost:8100/session/1977C350-0164-4412-A9ED-3FD7169D3DD2/screenshot] with no body
[debug] [JSONWP Proxy] Proxying [GET /screenshot] to [GET http://localhost:8100/session/1977C350-0164-4412-A9ED-3FD7169D3DD2/screenshot] with no body
[debug] [JSONWP Proxy] Proxying [GET /screenshot] to [GET http://localhost:8100/session/1977C350-0164-4412-A9ED-3FD7169D3DD2/screenshot] with no body
[debug] [JSONWP Proxy] Proxying [GET /screenshot] to [GET http://localhost:8100/session/1977C350-0164-4412-A9ED-3FD7169D3DD2/screenshot] with no body
[debug] [JSONWP Proxy] Proxying [GET /screenshot] to [GET http://localhost:8100/session/1977C350-0164-4412-A9ED-3FD7169D3DD2/screenshot] with no body
[debug] [JSONWP Proxy] Proxying [GET /screenshot] to [GET http://localhost:8100/session/1977C350-0164-4412-A9ED-3FD7169D3DD2/screenshot] with no body
[debug] [JSONWP Proxy] Proxying [GET /screenshot] to [GET http://localhost:8100/session/1977C350-0164-4412-A9ED-3FD7169D3DD2/screenshot] with no body
[debug] [JSONWP Proxy] Proxying [GET /screenshot] to [GET http://localhost:8100/session/1977C350-0164-4412-A9ED-3FD7169D3DD2/screenshot] with no body
[debug] [XCUITest] Log file for xcodebuild test: /var/folders/z/bz3z41cn74q1_jc1jlc4h26c0000gn/T/com.apple.dt.XCTest/IDETestRunSession-26C99073-D8D8-4635-8874-7665B112E8C7/WebDriverAgentRunner-B5ADEFA5-175E-4575-8876-069A1CF3FC8E/Session-WebDriverAgentRunner-2017-12-08_115743-vFesMY.log
[Xcode] 2017-12-08 11:57:43.978 xcodebuild[1417:17408] [MT] IDETestOperationsObserverDebug: (BADF700F-2659-45D1-B8C5-30D03867C573) Failed to make test runner session:
[Xcode] Error Domain=com.apple.dt.xctest.error Code=4 "Unable to find device with identifier: e72a1083c25ebf44c861e994e7b805258cf88344" UserInfo={NSLocalizedDescription=Unable to find device with identifier: e72a1083c25ebf44c861e994e7b805258cf88344}
[Xcode]
[Xcode] 2017-12-08 11:57:44.011 xcodebuild[1417:17408] Error Domain=IDETestOperationsObserverErrorDomain Code=3 "Unable to find device with identifier: e72a1083c25ebf44c861e994e7b805258cf88344 If you believe this error represents a bug, please attach the log file at /var/folders/z_/bz3z41cn74q1_jc1jlc4h26c0000gn/T/com.apple.dt.XCTest/IDETestRunSession-26C99073-D8D8-4635-8874-7665B112E8C7/WebDriverAgentRunner-B5ADEFA5-175E-4575-8876-069A1CF3FC8E/Session-WebDriverAgentRunner-2017-12-08_115743-vFesMY.log" UserInfo={NSLocalizedDescription=Unable to find device with identifier: e72a1083c25ebf44c861e994e7b805258cf88344 If you believe this error represents a bug, please attach the log file at /var/folders/z_/bz3z41cn74q1_jc1jlc4h26c0000gn/T/com.apple.dt.XCTest/IDETestRunSession-26C99073-D8D8-4635-8874-7665B112E8C7/WebDriverAgentRunner-B5ADEFA5-175E-4575-8876-069A1CF3FC8E/Session-WebDriverAgentRunner-2017-12-08_115743-vFesMY.log}
[Xcode]
[Xcode] ** TEST EXECUTE FAILED **
[Xcode]

Closing comment (2017-12-11T21:14:58Z): Duplicate of #810 ?