[Logcat] Logcat terminated with code 0, signal null and [WD Proxy] Got an unexpected response with status undefined: {"errno":"ECONNREFUSED","code":"ECONNREFUSED","syscall":"connect","address":"","port":8200}

appiumLogs.txt (2.1 MB)

Appium freezes during android execution runtime and no console is printed.
User need to manually abort the eclipse IDE run or Jenkins build.
Execution time : Sometimes issue is observed > 5 minutes to 2 hours (Failed to complete the regression)
This is frequently observed during the execution.
Fail to run regression or unit testing.

[Logcat] Logcat terminated with code 0, signal null
[WD Proxy] Got an unexpected response with status undefined: {“errno”:“ECONNREFUSED”,“code”:“ECONNREFUSED”,“syscall”:“connect”,“address”:“”,“port”:8200}

[WD Proxy] Replacing sessionId 2398555a-e282-4462-96a6-2b840dd0c496 with 5e1beb3b-5a97-48ce-bd19-36114858447e

Software version:

  • java -version : 1.8.0_65
  • mvn -version : Apache Maven 3.6.0
  • python --version : Python 3.7.2
  • Appium desktop windows client : 1.15.1
  • Appium jar version : 7.3.0
  • Selenium version: 3.141.59
  • TestNG : 7.1.0
  • NodeJS: node -v: v11.10.0
  • Eclipse : 4.14.0
  • Jenkins : 2.204.3

Executed from Windows machine: Eclipse IDE and Jenkins (simple job)
Windows OS Machine (RAM- 8GB, intel i5 @2.6 GHZ)

Number of devices attached : 1 real device via USB
Device Details : unrooted - Moto X4, Moto G6 Plus (4 GB and 6 GB RAM variant)

Below Code snippet for Launching Appium server programmatically

AppiumDriverLocalService appiumDriverLocalService;
AppiumServiceBuilder builder = new AppiumServiceBuilder()
.withAppiumJS(new File(testBedConfig.getAppiumPath()))
.usingDriverExecutable(new File(testBedConfig.getNodePath()))
.withArgument(GeneralServerFlag.LOG_LEVEL, “info”)
.withLogFile(new File(logFile))
appiumDriverLocalService = builder.build();
. setCapability Details
capabilities.setCapability(“deviceName”, DEVICENAME);
capabilities.setCapability(“platformName”, “Android”);
capabilities.setCapability(“appPackage”, APPPACKAGE_NAME);
capabilities.setCapability(“appActivity”, APPPACKAGE_ACTIVITY);
capabilities.setCapability(“udid”, UDID_VALUE);
capabilities.setCapability(“platformVersion”, “8.0.0”);
capabilities.setCapability(“autoAcceptAlerts”, true);
capabilities.setCapability(“screenshotWaitTimeout”, 60);
capabilities.setCapability(“automationName”, “uiautomator2”);
Driver initialize
AppiumDriver driver = new AppiumDriver(appiumDriverLocalService.getUrl(), capabilities);