Search code examples
androidcommand-lineappiumrobotframeworkui-automation

Could not proxy command to the remote server. Original error: socket hang up


[FAIL INSIDE] WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: Could not proxy command to the remote server. Original error: socket hang up Stacktrace: UnknownError: An unknown server-side error occurred while processing the command. Original error: Could not proxy command to the remote server. Original error: socket hang up

##Environments## robotframework python

Library: AppiumLibrary

Appium version:1.21.0

Desktop OS version to run appium:13.6

device: Galaxy watch 5

device system version: 11

device OS version: 3.5

This error occurs when I am testing android watch real device. I could solve this error by rebooting device or inputting the command line,

uninstall io.appium.uiautomator2.server

uninstall io.appium.uiautomator2.server.test

But is there any way I could solve this error without using command? (ex.entering some kind of error fixing code in robot file)


Solution

  • This error generally happens when you stop the running test cases via IDE, in this case sometimes, Appium doesn't free up the device and when you try to create a new session it doesn't work since device is already occupied. In order to solve this issue, you have to restart the device or run the commands mentioned by you. To avoid this issue, avoid stopping the running test cases by force and rather let the test fail so clean up processes complete properly on the device.