[Appium Error] : could not find devices

4,640 views
Skip to first unread message

nishant shah

unread,
Nov 7, 2013, 4:57:51 AM11/7/13
to appium-...@googlegroups.com
Hi All,
I am facing following error while using appium + windows + Android

I have
a) Android Emulator started
b) Appium server running
c) On triggering the test I get following error on appium server:-

Any help would be highly appreciated 

debug: Appium request initiated at /wd/hub/session
debug: Request received with params: {"desiredCapabilities":{"newCommandTimeout"
:180,"platform":"Windows","app":"H:\\eTrackApp\\eTrack-3.0.24118.apk","browserNa
me":"Android","app-package":"com.penchant.eTrack","device":"Android","app-activi
ty":"com.penchant.eTrack.activities.StartupActivity","version":"4.3"}}
info: Using local app from desiredCaps: H:\eTrackApp\eTrack-3.0.24118.apk
info: Creating new appium session ad1b7b0c-cb17-4364-8a29-847e7dea3e25
info: Starting android appium
debug: Using fast reset? true
info: Preparing device for session
info: Checking whether app is actually present
info: Checking whether adb is present
info: [ADB] Using adb from E:\Program Files\Jenkins\tools\android-sdk\platform-t
ools\adb.exe
info: Trying to find a connected android device
info: [ADB] Getting connected devices...
error: Error: spawn ENOENT
info: Could not find devices, restarting adb server...
info: Killing ADB server so it will come back online
error: Error killing ADB server, going to see if it's online anyway
info: Trying to find a connected android device
info: [ADB] Getting connected devices...
error: Error: spawn ENOENT
info: Could not find devices, restarting adb server...
info: Killing ADB server so it will come back online
error: Error killing ADB server, going to see if it's online anyway
info: Trying to find a connected android device
info: [ADB] Getting connected devices...
error: Error: spawn ENOENT
info: Could not find devices, restarting adb server...
info: Killing ADB server so it will come back online
error: Error killing ADB server, going to see if it's online anyway
info: Trying to find a connected android device
info: [ADB] Getting connected devices...
error: Error: spawn ENOENT
info: Could not find devices, restarting adb server...
info: Killing ADB server so it will come back online
error: Error killing ADB server, going to see if it's online anyway
info: Trying to find a connected android device
info: [ADB] Getting connected devices...
error: Error: spawn ENOENT
info: Could not find devices, restarting adb server...
info: Killing ADB server so it will come back online
error: Error killing ADB server, going to see if it's online anyway
info: Trying to find a connected android device
info: [ADB] Getting connected devices...
error: Error: spawn ENOENT
info: Could not find devices, restarting adb server...
info: Killing ADB server so it will come back online
error: Error killing ADB server, going to see if it's online anyway
info: Trying to find a connected android device
info: [ADB] Getting connected devices...
error: Error: spawn ENOENT
info: Could not find devices, restarting adb server...
info: Killing ADB server so it will come back online
error: Error killing ADB server, going to see if it's online anyway
info: Trying to find a connected android device
info: [ADB] Getting connected devices...
error: Error: spawn ENOENT
info: Could not find devices, restarting adb server...
info: Killing ADB server so it will come back online
error: Error killing ADB server, going to see if it's online anyway
info: Trying to find a connected android device
info: [ADB] Getting connected devices...
error: Error: spawn ENOENT
info: Could not find devices, restarting adb server...
info: Killing ADB server so it will come back online
error: Error killing ADB server, going to see if it's online anyway
info: Trying to find a connected android device
info: [ADB] Getting connected devices...
error: Error: spawn ENOENT
info: Looked for devices 10 times. Giving up
error: Error: Could not find a connected Android device.
error: Above error isn't fatal, maybe relaunching adb will help....
info: [ADB] Waiting for device null to be ready and to respond to shell commands
 (timeout = 5)
error: Error running wait-for-device
info: Killing ADB server so it will come back online
error: Error killing ADB server, going to see if it's online anyway
info: [ADB] Getting connected devices...
error: Error: spawn ENOENT
info: [ADB] Waiting for device null to be ready and to respond to shell commands
 (timeout = 5)
error: Error running wait-for-device
error: Failed to start an Appium session, err was: Error: spawn ENOENT
info: Responding to client with error: {"status":6,"value":{"message":"A session
 is either terminated or not started (Original error: spawn ENOENT)","code":"ENO
ENT","errno":"ENOENT","syscall":"spawn","origValue":"spawn ENOENT"},"sessionId":
"ad1b7b0c-cb17-4364-8a29-847e7dea3e25"}
POST /wd/hub/session 500 72ms - 286
info: Clearing out appium devices

Long Luc

unread,
Nov 7, 2013, 5:03:55 AM11/7/13
to appium-...@googlegroups.com
Under the Android SDK Manager>Tools what do you have installed?

nishant shah

unread,
Nov 7, 2013, 5:09:20 AM11/7/13
to Long Luc, appium-...@googlegroups.com
Hi,
I have Android SDK Tools, Android SDK Platform-Tools and Android SDK Build-Tools installed


--
http://appium.io
---
You received this message because you are subscribed to a topic in the Google Groups "Appium-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/appium-discuss/KGJHH0FG04g/unsubscribe.
To unsubscribe from this group and all its topics, send an email to appium-discus...@googlegroups.com.
Visit this group at http://groups.google.com/group/appium-discuss.
For more options, visit https://groups.google.com/groups/opt_out.

nishant shah

unread,
Nov 7, 2013, 5:38:05 AM11/7/13
to Long Luc, appium-...@googlegroups.com
Hi Long Luc,
Am I missing any component above?

nishant shah

unread,
Nov 7, 2013, 5:41:09 AM11/7/13
to Long Luc, appium-...@googlegroups.com
Just for your information...if I do adb devices on command prompt then I do get a device

Long Luc

unread,
Nov 7, 2013, 5:42:51 AM11/7/13
to appium-...@googlegroups.com, Long Luc
For whatever reasons...I had to install the following
Android SDK Tools, Rev. 22.3
Android SDK Platform-tools, Rev. 19
Android SDK Build-tools, Rev. 18.1.1
Android SDK Build-tools, Rev. 17

Then executing appium.exe with "run as administrator" just incase UAC was enabled...

Aniket Gadre

unread,
Nov 7, 2013, 5:42:51 AM11/7/13
to nishant shah, Long Luc, appium-...@googlegroups.com
Are you able to see your emulator listed in devices when you manually fire adb command?


You received this message because you are subscribed to the Google Groups "Appium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to appium-discus...@googlegroups.com.



--
Best Regards,
Aniket Gadre
Test Automation Lead
Amdocs , Pune.
E-add: aniket...@amdocs.com

nishant shah

unread,
Nov 7, 2013, 6:49:40 AM11/7/13
to Long Luc, appium-...@googlegroups.com
Thanks for your inputs.
But, I tried it and didnt solve my issue :(

Aniket Gadre

unread,
Nov 7, 2013, 7:50:58 AM11/7/13
to nishant shah, Long Luc, appium-...@googlegroups.com
which version of appium are you running?


You received this message because you are subscribed to the Google Groups "Appium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to appium-discus...@googlegroups.com.



--

nishant shah

unread,
Nov 7, 2013, 7:53:05 AM11/7/13
to Aniket Gadre, Long Luc, appium-...@googlegroups.com
I tried it on 0.10.4 as well as the latest one:- 0.11.2 but no success...Still getting the same error

bhaskar kumar

unread,
Jan 9, 2014, 1:40:32 AM1/9/14
to appium-...@googlegroups.com, Aniket Gadre, Long Luc
Hi all,

I am also facing the same issue. Could you please let me know if any idea about this.

Regards,
Bhaskar.

Сергей Чумак

unread,
Jan 20, 2014, 10:47:35 AM1/20/14
to appium-...@googlegroups.com
Hi. Also have the same error. Is the latest update fix this issue ?

Sravan Kumar

unread,
Jan 28, 2014, 2:05:14 AM1/28/14
to appium-...@googlegroups.com
Hi ,

I am also facing the same issue. But able to find the devices when i execute adb devices command able to find the attached device.tried with multiple version but no use

NOTE: OS : Windows XP

Does any one have idea on it.

Jitendra Jagtap

unread,
Feb 9, 2014, 5:11:33 AM2/9/14
to appium-...@googlegroups.com
Hi,

Me to got stuck with same issue so long. Could you please guide me how to get it resolved.
Here is error information given below.

Error on eclipse console:

[TestNG] Running:
  C:\Users\shweta.kawale\AppData\Local\Temp\testng-eclipse-1071858844\testng-customsuite.xml

FAILED CONFIGURATION: @BeforeMethod setUp
org.openqa.selenium.SessionNotCreatedException: A new session could not be created. (Original error: Requested a new session but one was in progress) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 602.26 seconds
Build info: version: '2.39.0', revision: 'ff23eac', time: '2013-12-16 16:12:12'
System info: host: 'PNEITSH51025LT', ip: '14.97.212.121', os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1', java.version: '1.7.0_45'
Driver info: org.openqa.selenium.remote.RemoteWebDriver
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:193)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:145)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:554)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:216)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:111)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:129)
at Calc.setUp(Calc.java:36)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:84)
at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:564)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:213)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:653)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
at org.testng.TestRunner.privateRun(TestRunner.java:767)
at org.testng.TestRunner.run(TestRunner.java:617)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)
at org.testng.SuiteRunner.run(SuiteRunner.java:240)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1224)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1149)
at org.testng.TestNG.run(TestNG.java:1057)
at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:111)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:204)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:175)

SKIPPED CONFIGURATION: @AfterMethod teardown
SKIPPED: testCal

===============================================
    Default test
    Tests run: 1, Failures: 0, Skips: 1
    Configuration Failures: 1, Skips: 1
===============================================


===============================================
Default suite
Total tests run: 1, Failures: 0, Skips: 1
Configuration Failures: 1, Skips: 1
===============================================

[TestNG] Time taken by org.testng.reporters.jq.Main@b52598: 104 ms
[TestNG] Time taken by org.testng.reporters.JUnitReportReporter@4e76b4: 9 ms
[TestNG] Time taken by org.testng.reporters.SuiteHTMLReporter@36bc0a: 43 ms
[TestNG] Time taken by [FailedReporter passed=0 failed=0 skipped=0]: 8 ms
[TestNG] Time taken by org.testng.reporters.EmailableReporter2@124e205: 5 ms
[TestNG] Time taken by org.testng.reporters.XMLReporter@6a4268: 8 ms


Desired Capabilities: 

File appDir = new File("C:\\APPIUM");
File app = new File(appDir, "com.android.calculator2_1.0.0.apk");     
   DesiredCapabilities capabilities = new DesiredCapabilities();
   capabilities.setCapability("device", "Android");
   capabilities.setCapability(CapabilityType.BROWSER_NAME, "");
   capabilities.setCapability(CapabilityType.VERSION, "4.2.1");
   capabilities.setCapability(CapabilityType.PLATFORM, "Windows");
   capabilities.setCapability("app-package", "com.android.calculator2"); // This is package name of your app (you can get it from apk info app)
   capabilities.setCapability("app-activity", "com.android.calculator2.Calculator"); // This is Launcher activity of your app (you can get it from apk info app)
        //Create RemoteWebDriver instance and connect to the Appium server.
        //It will launch the Calculator App in Android Device using the configurations specified in Desired Capabilities
   capabilities.setCapability("app", app.getAbsolutePath());
   driver = new RemoteWebDriver(new URL("http://127.0.0.1:4723/wd/hub"), capabilities);

Error Log: 

Where as my device get detected by command prompt adb command: 

shankar garg

unread,
May 12, 2014, 2:24:59 PM5/12/14
to appium-...@googlegroups.com
Did  u guys find a solution to this problem?

Isaac Murchie

unread,
May 12, 2014, 2:28:37 PM5/12/14
to shankar garg, appium-...@googlegroups.com
Have you tried moving your Android home out of the "Program Files" tree? The space might be causing problems.


--
http://appium.io
---
You received this message because you are subscribed to the Google Groups "Appium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to appium-discus...@googlegroups.com.
Visit this group at http://groups.google.com/group/appium-discuss.
For more options, visit https://groups.google.com/d/optout.

shankar garg

unread,
May 12, 2014, 2:36:10 PM5/12/14
to appium-...@googlegroups.com, shankar garg
Hi Issac,

Could you please elaborate on this more. did not really understood what to do exactly.

Isaac Murchie

unread,
May 12, 2014, 2:40:36 PM5/12/14
to shankar garg, appium-...@googlegroups.com
Appium is trying to spawn the program E:\Program Files\Jenkins\tools\android-sdk\platform-t
ools\adb.exe. There are issues, however, with it failing when there is a space in the path, in your case, in "Program Files". If you move it to another place, or make a symbolic link to a path with no spaces in it, it should work. Make sure ANDROID_HOME is set appropriately.

Alex De Lara

unread,
May 12, 2014, 4:05:54 PM5/12/14
to appium-...@googlegroups.com, shankar garg
Like Isaac already mentions, the fact is that people still insist in using "Program Files" to install stuff on Windows when you should know that the space in the name causes grief over and over.
Lucky for you this is an easy fix because the Android Dev Tools is just a zipfile so you can move to anywhere else without space so, instead of your e:\Program Files" location, open Windows Explorer and move the entire ADT directory to (FOR EXAMPLE) e:\tools\ such as you will have

Previously: E:\Program Files\Jenkins\tools\android-sdk (bad: it contains space)

With new location: E:\tools\android-sdk (Good: no space)

And update your ANDROID_HOME and PATH variables to match the new location.

shankar garg

unread,
May 13, 2014, 11:31:28 AM5/13/14
to appium-...@googlegroups.com, shankar garg
I changed the path to android sdk. removed the spaces from folder names.
Now appium can find the device and test cases are running fine.

Thanks!!

Vinod Kumar

unread,
May 30, 2014, 8:06:27 AM5/30/14
to appium-...@googlegroups.com, shnake...@gmail.com
i tried same thing, but doesn't work.. any other changes to do.. please help
Message has been deleted

Krrish

unread,
Jul 15, 2014, 2:43:44 AM7/15/14
to appium-...@googlegroups.com, shnake...@gmail.com

Hi,

I'm also facing the same issue.Can u please post the necessary changes if u resolved this issue??

Thanks

sina

unread,
Jul 16, 2014, 6:43:08 AM7/16/14
to appium-...@googlegroups.com, shnake...@gmail.com
first check android sdk and JAVA  is properly installed or not.. then check your PATH... don't remove the older path, just edit that and add the path regarding to android sdk, platform-tools, tools.. remove all spaces from PATH if any... and then see in your command promp by typing adb devices..
Reply all
Reply to author
Forward
0 new messages