Grid Hub and Nodes stops after a node is turned off or cable unplugged

Hello guys!

I facing a problem that I presume could be a bug.
I have a lot of devices in a grid (12), but it occurs with two or more devices.

Configs (for testing propouse)

  • Selenium/Appium grid with a hub and node in same machine
  • Nodes correctly configured (udid, appium post and bp port always unique)

Scenario

  • Same app executing in parallel through separated threads

Action

  • After the test execution in the devices I can do two things to throw the error:
    ** Power off the device
    ** Unplug the USB cable
    ** [For emulator] Close the window of emulator

Versions

  • Selenium Server 2.53.0
  • Appium 1.5.1

Error
on console (Eclipse)
org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: UiAUtomator shut down unexpectedly (WARNING: The server did not provide any stacktrace information)

on node closed
Unhandled rejection Error: No device connected, cannot run adb shell command "am force-stop com.eliasnogueira.buttontest"

on the other nodes
Unhandled rejection Error: Error executing adbExec. Original error: Command '/Users/eliasnogueira/android-sdk/platform-tools/adb -P 5037 -s 192.168.56.102:5555 shell am force-stop com.eliasnogueira.buttontest' exited with code 255{"stdout":"","stderr":"error: device '192.168.56.102:5555' not found\n","code":255}

What I expect
Not stop the Grid after the node stop (shutdown or unplug cable)

Full logs in the links bellow

Any help would be much appreciated! :slight_smile:

What do you mean by “node closed,” exactly? Did you mean to include this scenario under the Action section?

This feels a lot like a Selenium Grid bug rather than something Appium-specific.

@afwang to the “node closed” I mean the action to close. And yes, during the action I manually close the device
I think it’s appium specific because the exception about UiAutomator that stops everything in the grid