Andriod automated tests suddenly starts failing for Appium 1.15 after few tests with Android socket hang issue

I have the following error stack for the android automation issue:

Selenium::WebDriver::Error::UnknownError: An unknown server-side error occurred while processing the command. Original error: Could not proxy command to remote server. Original error: Error: read ECONNRESET UnknownError: An unknown server-side error occurred while processing the command. Original error: Could not proxy command to remote server. Original error: Error: read ECONNRESET at JWProxy.command (/usr/local/lib/node_modules/appium/node_modules/appium-base-driver/lib/jsonwp-proxy/proxy.js:261:13) at

These scripts were working on older versions of the Appium which proves that the root cause of this error lies in the new version of appium. FYI I have also tried updating the npm and node js, I have upgraded the sdk and android studio too. I have uninstalled and reinstalled appium 1.15, tried the caps[“automationName”]=“appium”. Nothing seems to be working. Any suggestion is highly appreciated.

switch to beta :slight_smile: 1.16

Make sure the phone itself does not kill Appium server as a background process, which is using too much of the battery. Check https://github.com/appium/appium-uiautomator2-server/issues/310

Tried both. Have changed the battery settings and moved my testing app and the appium settings app to unmonitored apps. Still encountering the error.

Try to get the logcat output for the time period the connection reset happens - perhaps it contains some useful details

Got it working i have increased the newCommandTimeout: <to 20000> which fixed the error. Thank you.