Could not find a connected Android device when device is connected via tcpip

I have connected my device via tcpip (adb tcpip port, adb connect ipaddress:port)

I have two kinds of tests running.

  1. One is not using adb commands in the test
  2. Another test I am using adb commands to fetch device OS version and
    so on

When I execute the tests, first test running without any issue but the second test fails with Could not find a connected Android device

Refer Appium_log

Not sure why the test is failing when we have adb commands in the test when we execute over tcpip

Was your issue resolved, if yes how?

I’m facing similar kind of problem, but in my case during the first run i.e. without ADB commands but with Appium only I am running my script, but getting similar errors as yours.

I’m trying to do on Ubuntu.

Hi, have you found any solution? If not, how u managed to make the test with adb command, after you started the app with the commands what have you done?