How to reduce ESOCKETTIMEDOUT timeout option in appium server
See original GitHub issueThe problem
I am trying to select “Date Picker” value in IOS device with “setValue” command and able to select value but it throw error message as shown below and take lot of time for http request to go to next step.
Environment
- Appium version (or git revision) that exhibits the issue: 1.6.3
- Desktop OS/version used to run Appium: Mac 10.11.6
- Node.js version (unless using Appium.app|exe): 6.9.2
- Mobile platform/version under test: IOS 10.0.2
- Real device or emulator/simulator: Iphone 6
- Appium CLI or Appium.app|exe: Appium CLI
Details
I would like to reduce ESOCKETTIMEDOUT timeout option while executing appium server. public void setValue(IOSElement els, String value){ try{ els.setValue(value); }catch(WebDriverException e){ System.out.println("WebDriverException exception message "); } }
Link to Appium logs
debug] [MJSONWP] Responding to client with driver.implicitWait() result: null
[HTTP] <-- POST /wd/hub/session/071dd04a-38a6-412d-aef3-c97eb90c66d6/timeouts/implicit_wait 200 2 ms - 76
[HTTP] --> POST /wd/hub/session/071dd04a-38a6-412d-aef3-c97eb90c66d6/appium/element/5FB7B19F-CC31-48E3-B919-8F9F426BE651/value {"id":"5FB7B19F-CC31-48E3-B919-8F9F426BE651","value":"2016"}
[debug] [MJSONWP] Calling AppiumDriver.setValueImmediate() with args: ["2016","5FB7B19F-CC31-48E3-B919-8F9F426BE651","071dd04a-38a6-412d-aef3-c97eb90c66d6"]
[debug] [XCUITest] Executing command 'setValueImmediate'
[XCUITest] There is currently no way to bypass typing using XCUITest. Setting value through keyboard
[debug] [JSONWP Proxy] Proxying [GET /element/5FB7B19F-CC31-48E3-B919-8F9F426BE651/attribute/type] to [GET http://localhost:8100/session/C913959C-840F-4401-AC65-0EA594F665B2/element/5FB7B19F-CC31-48E3-B919-8F9F426BE651/attribute/type] with no body
[debug] [JSONWP Proxy] Got response with status 200: "{\n \"value\" : \"XCUIElementTypePickerWheel\",\n \"sessionId\" : \"C913959C-840F-4401-AC65-0EA594F665B2\",\n \"status\" : 0\n}"
[debug] [JSONWP Proxy] Proxying [POST /element/5FB7B19F-CC31-48E3-B919-8F9F426BE651/value] to [POST http://localhost:8100/session/C913959C-840F-4401-AC65-0EA594F665B2/element/5FB7B19F-CC31-48E3-B919-8F9F426BE651/value] with body: {"value":["2","0","1","6"]}
[debug] [iProxy] recv failed: Resource temporarily unavailable
[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:126: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/071dd04a-38a6-412d-aef3-c97eb90c66d6/appium/element/5FB7B19F-CC31-48E3-B919-8F9F426BE651/value 500 240200 ms - 251
[HTTP] <-- POST /wd/hub/session/071dd04a-38a6-412d-aef3-c97eb90c66d6/appium/element/5FB7B19F-CC31-48E3-B919-8F9F426BE651/value 500 240200 ms - 251
[HTTP] --> POST /wd/hub/session/071dd04a-38a6-412d-aef3-c97eb90c66d6/timeouts/implicit_wait {"ms":0}
[debug] [MJSONWP] Calling AppiumDriver.implicitWait() with args: [0,"071dd04a-38a6-412d-aef3-c97eb90c66d6"]
[debug] [XCUITest] Executing command 'implicitWait'
[debug] [BaseDriver] Set implicit wait to 0ms
[debug] [MJSONWP] Responding to client with driver.implicitWait() result: null
Issue Analytics
- State:
- Created 7 years ago
- Comments:14 (5 by maintainers)
Top Results From Across the Web
Timeouts - Appium
Edit this Doc Set Timeouts. Configure the amount of time that a particular type of operation can execute for before they are aborted ......
Read more >Is there a way to increase session time? - Appium Discuss
[debug] [UIAuto] Closing socket server. [Appium] Closing session, cause was 'New Command Timeout of 60 seconds expired. Try customizing the timeout using the...
Read more >Implicit Wait - Appium
Set Implicit Wait Timeout; Example Usage; Description; Support; Appium Server; Appium Clients; HTTP API Specifications; Endpoint; URL Parameters ...
Read more >How to increase timeout for Appium Settings installation ...
I am experiencing a timeout during Appium Settings installation in CI using the Android v26 emulator and TestNG for capabilities and etc.
Read more >Desired Capabilities - Appium
newCommandTimeout, How long (in seconds) Appium will wait for a new command from ... Settings. appPackage, Java package of the Android app you...
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
Hi Guys, Kindly refer recommended java snippet on taking snapshot on cucumber.io website (https://cucumber.io/docs/reference), notice that- it recommends using above method: getScreenshotAs(OutputType.BYTES);
Is there any way to get it fixed ? Thanks
Resolved : In my case this was resolved, I was using the take screen shot option by calling the
getScreenshotAs(OutputType.BYTES);
and this was working fine on desktop browser version, but same script when executing on Android device (hybrid app) it causing the issues and giving me the ESOCKETTIMEOUT error. I did the debug step by step and just commented this line. Now scripts are executing fine with out issues. Surpirsingly getScreenshot method is not working in both Android and Iphone real devices for Hybrid apps