Total Pageviews

Wednesday, September 24, 2014

Mobile Automation: Appium/AVD/Android/Windows - Device not found error,restarting adb server.[solved]

Platform: Windows 7 64 bit
Appium Version: AppiumForWindows-0.16
Android SDK:  adt-bundle-windows-x86_64-20140702

If anyone is working on Appium automation and trying to pull up some automation on Android/Apple and if you run across any errors like below-

debug: Checking whether adb is present
debug: Using adb from C:\AndroidSDK\adt-bundle-windows-x86_64-20140702\adt-bundle-windows-x86_64-20140702\sdk\platform-tools\adb.exe
debug: Trying to find a connected android device
debug: Getting connected devices...
debug: executing: "D:\APPIUM\SDK\sdk\platform-tools\adb.exe" devices
debug: Could not find devices, restarting adb server...
debug: executing: "D:\APPIUM\SDK\sdk\platform-tools\adb.exe" kill-server
warn: code=ENOENT, errno=ENOENT, syscall=spawn
error: Error killing ADB server, going to see if it's online anyway
debug: Getting connected devices...
debug: executing: "D:\APPIUM\SDK\sdk\platform-tools\adb.exe" devices
debug: Could not find devices, restarting adb server...
debug: executing: "D:\APPIUM\SDK\sdk\platform-tools\adb.exe" kill-server
warn: code=ENOENT, errno=ENOENT, syscall=spawn
warn: code=ENOENT, errno=ENOENT, syscall=spawn
debug: Getting connected devices...
debug: executing: "D:\APPIUM\SDK\sdk\platform-tools\adb.exe" devices
debug: Could not find devices, restarting adb server...
debug: executing: "D:\APPIUM\SDK\sdk\platform-tools\adb.exe" kill-server
warn: code=ENOENT, errno=ENOENT, syscall=spawn
warn: code=ENOENT, errno=ENOENT, syscall=spawn
error: Error killing ADB server, going to see if it's online anyway
debug: Getting connected devices...
debug: executing: "D:\APPIUM\SDK\sdk\platform-tools\adb.exe" devices
debug: Could not find devices, restarting adb server...
debug: executing: "D:\APPIUM\SDK\sdk\platform-tools\adb.exe" kill-server
warn: code=ENOENT, errno=ENOENT, syscall=spawn
error: Error killing ADB server, going to see if it's online anyway

This is most probably because appium/adb cannot read (and eventually expand)Windows System32 folder. Do following steps-

1. Open  command prompt and type "path" (no quotes).
2. Check if this path is present- C:\WINDOWS\system32. If not, go to step 3.
3. Add path like this in your system variable-  %SYSTEMROOT%\System32

PS: This worked for me, try your luck!

Cheers-
Abhay

No comments:

Post a Comment