Error killing ADB server, going to see if it's online anyway

845 views
Skip to first unread message

sht...@gmail.com

unread,
Feb 4, 2014, 10:26:18 AM2/4/14
to appium-...@googlegroups.com
Hello All,

I am trying Appium for the first time and I hit the wall with this problem. I am out of ideas as of how to fix it.
Running sample application "ContactManager" that I've got from https://github.com/appium/appium/tree/master/sample-code.

I would be really grateful for any help.

Details are bellow ------------------------------------------

Platform: Windows 7

Environment variables:
ANDROID_HOME=C:\developer\adt-bundle-windows-x86_64-20131030\sdk
C:\Ruby200\bin;%GROOVY_HOME%\bin;C:\Program Files (x86)\jad;%ANT_HOME%/bin;%JAVA_HOME%/bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies\;C:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\;C:\developer\pstools;C:\Program Files (x86)\nodejs\;%ANDROID_HOME%\tools;%ANDROID_HOME%\platform-tools;C:\Program Files (x86)\Git\cmd


Using emulated Android started with "emulator -avd Android"

Appium server started using Appium.exe with default settings.

Executing this code in JUnit test:
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(CapabilityType.BROWSER_NAME, "Android");
capabilities.setCapability("device", "Android");
capabilities.setCapability(CapabilityType.VERSION, "4.2");
capabilities.setCapability(CapabilityType.PLATFORM, "Windows");
capabilities.setCapability("app", "C:\\developer\\source\\appium-master\\sample-code\\apps\\ContactManager\\ContactManager.apk");
capabilities.setCapability("app-package", "com.example.android.contactmanager");
capabilities.setCapability("app-activity", ".ContactManager");
driver = new RemoteWebDriver(new URL("http://127.0.0.1:4723/wd/hub"), capabilities);


Appium server output:
info: Welcome to Appium v0.14.2
info: Appium REST http interface listener started on 127.0.0.1:4723
   info  - socket.io started
debug: Appium request initiated at /wd/hub/session
debug: Request received with params: {"desiredCapabilities":{"platform":"Windows
","app":"C:\\developer\\source\\appium-master\\sample-code\\apps\\ContactManager
\\ContactManager.apk","browserName":"Android","app-package":"com.example.android
.contactmanager","device":"Android","app-activity":".ContactManager","version":"
4.2"}}
info: Using local app from desiredCaps: C:\developer\source\appium-master\sample
-code\apps\ContactManager\ContactManager.apk
info: Creating new appium session 63532427-6a93-4bb0-98d2-e099ab47adae
info: Starting android appium
debug: Using fast reset? false
info: Preparing device for session
info: Checking whether app is actually present
info: Checking whether adb is present
info: [ADB] Using adb from C:\developer\adt-bundle-windows-x86_64-20131030\sdk\p
latform-tools\adb.exe
info: Trying to find a connected android device
info: [ADB] Getting connected devices...
debug: executing: "C:\developer\adt-bundle-windows-x86_64-20131030\sdk\platform-
tools\adb.exe" devices
warn:  killed=false, code=1, signal=null
info: Could not find devices, restarting adb server...
debug: executing: "C:\developer\adt-bundle-windows-x86_64-20131030\sdk\platform-
tools\adb.exe" kill-server
warn:  killed=false, code=1, signal=null
error: Error killing ADB server, going to see if it's online anyway
info: [ADB] Getting connected devices...
debug: executing: "C:\developer\adt-bundle-windows-x86_64-20131030\sdk\platform-
tools\adb.exe" devices
warn:  killed=false, code=1, signal=null
info: Could not find devices, restarting adb server...
debug: executing: "C:\developer\adt-bundle-windows-x86_64-20131030\sdk\platform-
tools\adb.exe" kill-server
warn:  killed=false, code=1, signal=null
error: Error killing ADB server, going to see if it's online anyway
info: [ADB] Getting connected devices...
debug: executing: "C:\developer\adt-bundle-windows-x86_64-20131030\sdk\platform-
tools\adb.exe" devices
warn:  killed=false, code=1, signal=null
info: Could not find devices, restarting adb server...
debug: executing: "C:\developer\adt-bundle-windows-x86_64-20131030\sdk\platform-
tools\adb.exe" kill-server
warn:  killed=false, code=1, signal=null
error: Error killing ADB server, going to see if it's online anyway
info: [ADB] Getting connected devices...
debug: executing: "C:\developer\adt-bundle-windows-x86_64-20131030\sdk\platform-
tools\adb.exe" devices
warn:  killed=false, code=1, signal=null
info: Could not find devices, restarting adb server...
debug: executing: "C:\developer\adt-bundle-windows-x86_64-20131030\sdk\platform-
tools\adb.exe" kill-server
warn:  killed=false, code=1, signal=null
error: Error killing ADB server, going to see if it's online anyway
info: [ADB] Getting connected devices...
debug: executing: "C:\developer\adt-bundle-windows-x86_64-20131030\sdk\platform-
tools\adb.exe" devices
warn:  killed=false, code=1, signal=null
POST /wd/hub/session 200 600021ms
debug: Appium request initiated at /wd/hub/session
debug: Request received with params: {"desiredCapabilities":{"platform":"Windows
","app":"C:\\developer\\source\\appium-master\\sample-code\\apps\\ContactManager
\\ContactManager.apk","browserName":"Android","app-package":"com.example.android
.contactmanager","device":"Android","app-activity":".ContactManager","version":"
4.2"}}
info: Using local app from desiredCaps: C:\developer\source\appium-master\sample
-code\apps\ContactManager\ContactManager.apk
error: Failed to start an Appium session, err was: Error: Requested a new sessio
n but one was in progress
info: Responding to client with error: {"status":33,"value":{"message":"A new se
ssion could not be created. (Original error: Requested a new session but one was
 in progress)","origValue":"Requested a new session but one was in progress"},"s
essionId":"63532427-6a93-4bb0-98d2-e099ab47adae"}
POST /wd/hub/session 500 11ms - 278b


Platform: Windows 7

Using emulated Android started with "emulator -avd Android"

Appium server started using Appium.exe with default settings.

Executing this code in JUnit test

Java code:
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(CapabilityType.BROWSER_NAME, "Android");
capabilities.setCapability("device", "Android");
capabilities.setCapability(CapabilityType.VERSION, "4.2");
capabilities.setCapability(CapabilityType.PLATFORM, "Windows");
capabilities.setCapability("app", "C:\\developer\\source\\appium-master\\sample-code\\apps\\ContactManager\\ContactManager.apk");
capabilities.setCapability("app-package", "com.example.android.contactmanager");
capabilities.setCapability("app-activity", ".ContactManager");
driver = new RemoteWebDriver(new URL("http://127.0.0.1:4723/wd/hub"), capabilities);


Appium server output:
info: Welcome to Appium v0.14.2
info: Appium REST http interface listener started on 127.0.0.1:4723
   info  - socket.io started
debug: Appium request initiated at /wd/hub/session
debug: Request received with params: {"desiredCapabilities":{"platform":"Windows
","app":"C:\\developer\\source\\appium-master\\sample-code\\apps\\ContactManager
\\ContactManager.apk","browserName":"Android","app-package":"com.example.android
.contactmanager","device":"Android","app-activity":".ContactManager","version":"
4.2"}}
info: Using local app from desiredCaps: C:\developer\source\appium-master\sample
-code\apps\ContactManager\ContactManager.apk
info: Creating new appium session 63532427-6a93-4bb0-98d2-e099ab47adae
info: Starting android appium
debug: Using fast reset? false
info: Preparing device for session
info: Checking whether app is actually present
info: Checking whether adb is present
info: [ADB] Using adb from C:\developer\adt-bundle-windows-x86_64-20131030\sdk\p
latform-tools\adb.exe
info: Trying to find a connected android device
info: [ADB] Getting connected devices...
debug: executing: "C:\developer\adt-bundle-windows-x86_64-20131030\sdk\platform-
tools\adb.exe" devices
warn:  killed=false, code=1, signal=null
info: Could not find devices, restarting adb server...
debug: executing: "C:\developer\adt-bundle-windows-x86_64-20131030\sdk\platform-
tools\adb.exe" kill-server
warn:  killed=false, code=1, signal=null
error: Error killing ADB server, going to see if it's online anyway
info: [ADB] Getting connected devices...
debug: executing: "C:\developer\adt-bundle-windows-x86_64-20131030\sdk\platform-
tools\adb.exe" devices
warn:  killed=false, code=1, signal=null
info: Could not find devices, restarting adb server...
debug: executing: "C:\developer\adt-bundle-windows-x86_64-20131030\sdk\platform-
tools\adb.exe" kill-server
warn:  killed=false, code=1, signal=null
error: Error killing ADB server, going to see if it's online anyway
info: [ADB] Getting connected devices...
debug: executing: "C:\developer\adt-bundle-windows-x86_64-20131030\sdk\platform-
tools\adb.exe" devices
warn:  killed=false, code=1, signal=null
info: Could not find devices, restarting adb server...
debug: executing: "C:\developer\adt-bundle-windows-x86_64-20131030\sdk\platform-
tools\adb.exe" kill-server
warn:  killed=false, code=1, signal=null
error: Error killing ADB server, going to see if it's online anyway
info: [ADB] Getting connected devices...
debug: executing: "C:\developer\adt-bundle-windows-x86_64-20131030\sdk\platform-
tools\adb.exe" devices
warn:  killed=false, code=1, signal=null
info: Could not find devices, restarting adb server...
debug: executing: "C:\developer\adt-bundle-windows-x86_64-20131030\sdk\platform-
tools\adb.exe" kill-server
warn:  killed=false, code=1, signal=null
error: Error killing ADB server, going to see if it's online anyway
info: [ADB] Getting connected devices...
debug: executing: "C:\developer\adt-bundle-windows-x86_64-20131030\sdk\platform-
tools\adb.exe" devices
warn:  killed=false, code=1, signal=null
POST /wd/hub/session 200 600021ms
debug: Appium request initiated at /wd/hub/session
debug: Request received with params: {"desiredCapabilities":{"platform":"Windows
","app":"C:\\developer\\source\\appium-master\\sample-code\\apps\\ContactManager
\\ContactManager.apk","browserName":"Android","app-package":"com.example.android
.contactmanager","device":"Android","app-activity":".ContactManager","version":"
4.2"}}
info: Using local app from desiredCaps: C:\developer\source\appium-master\sample
-code\apps\ContactManager\ContactManager.apk
error: Failed to start an Appium session, err was: Error: Requested a new sessio
n but one was in progress
info: Responding to client with error: {"status":33,"value":{"message":"A new se
ssion could not be created. (Original error: Requested a new session but one was
 in progress)","origValue":"Requested a new session but one was in progress"},"s
essionId":"63532427-6a93-4bb0-98d2-e099ab47adae"}
POST /wd/hub/session 500 11ms - 278b


Thanks,
Stan

sht...@gmail.com

unread,
Feb 6, 2014, 11:56:14 AM2/6/14
to appium-...@googlegroups.com
Fixed. Problem was not related to Appium.

Jitendra Jagtap

unread,
Feb 9, 2014, 9:29:37 AM2/9/14
to appium-...@googlegroups.com
Hi, 

I am also facing the same issue. Can you please guide the work around to get rid of it?

Following are the details.


Hi,

 

Me too got stuck with same issue so long. Could you please guide me how to resolve it?

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: 

https://lh5.googleusercontent.com/-y2AssNQFlpo/UvdTk0rOb_I/AAAAAAAAID0/k3QltpT9HLI/s320/log.PNG

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

 

https://lh6.googleusercontent.com/-znRPWcJVZ1I/UvdTy4mTJVI/AAAAAAAAID8/DggAsOW6HZI/s320/device.PNG

 

 

 

Krrish

unread,
Jul 17, 2014, 4:36:35 AM7/17/14
to appium-...@googlegroups.com
Hi,
 I got stuck with the same issue.Can u please provide the details if u resolved it??
It'll be more helpful to me.
TIA
Reply all
Reply to author
Forward
Message has been deleted
0 new messages