Appium Could not find online devices (Encountered internal error running command: Error: Could not find a connected Android device)

Hello Appium community,

I’m encountering an issue while using Appium Inspector and running mobile automation tests with Selenium in Python. Strangely, everything was working perfectly yesterday, but today, I’m facing an error that I’ve never encountered before. I would greatly appreciate your help in resolving this issue.

Here’s the error message I’m receiving:

[ADB] Using ‘adb.exe’ from ‘C:\Users\User\AppData\Local\Android\Sdk\platform-tools\adb.exe’
[debug] [ADB] Running ‘C:\Users\User\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 start-server’
[AndroidDriver] Retrieving device list
[debug] [ADB] Trying to find a connected Android device
[debug] [ADB] Getting connected devices
[debug] [ADB] Could not find online devices
[debug] [ADB] Reconnecting adb (target offline)
[debug] [ADB] Running ‘C:\Users\User\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 reconnect offline’
[debug] [ADB] Getting connected devices
[debug] [ADB] Could not find online devices
[debug] [ADB] Reconnecting adb (target offline)
[debug] [ADB] Running ‘C:\Users\User\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 reconnect offline’
[debug] [ADB] Getting connected devices
[debug] [ADB] Could not find online devices
[debug] [ADB] Reconnecting adb (target offline)

It appears that Appium is having trouble recognizing my Android device. However, when I run ‘adb devices’ separately, the device is listed as connected and online.

Could you please provide guidance on how to troubleshoot and resolve this issue? I’m using Appium with Selenium in Python, and I’ve tried the following steps:

  • Restarted the Appium server.
  • Confirmed that the USB debugging mode is enabled on my Android device.
  • Checked the ADB executable and port settings in Appium Inspector.
  • Restarted my computer.

Any insights or suggestions you can provide would be greatly appreciated. Thank you in advance!

what shows when it happen

adb devices -l
List of devices attached
ASCARLH010M60900053    device usb:36896768X product:ScarletWitch_00EEA model:Nokia_X10 device:SCW_sprout transport_id:1621
ASCARLH010M60900151    device usb:36831232X product:ScarletWitch_00EEA model:Nokia_X10 device:SCW_sprout transport_id:1618
....

show like this:

C:\Users\User>adb devices -l
List of devices attached
RR8NC07Y94Y            device product:a51nsxx model:SM_A515F device:a51 transport_id:2

and at the appium inspector show this:

Try to enable also File Transfer in USB mode on phone. No more ideas :frowning:

I have already tried doing it, but there has been no effect. :frowning:

Are you using the most recent driver version?

Yes, i used latest ADB (Android Debug Bridge version 1.0.41) and appium (2.1.3)

I mean the version of uiauomator2 driver

Windows doesn’t have a ‘which’ command, but it does have a ‘where’ command. What is the output of ‘where adb’ on the command line?

how appium installed on your computer? is it windows or mac? what java version?