selendroid / selendroid

"Selenium for Android" (Test automate native or hybrid Android apps and the mobile web with Selendroid.) Join us on IRC #selendroid on freenode. Also confirm you have signed the CLA http://goo.gl/pAvxEI when making a Pull Request.
http://selendroid.io
Apache License 2.0
889 stars 435 forks source link

Error starting Selendroid session #780

Closed nitikas closed 9 years ago

nitikas commented 9 years ago

I am facing issue with the current version of selendroid. Same code, same app was working fine with previous version .

Please help.

Logs

[TestNG] Running: C:\Users\OWNER\AppData\Local\Temp\testng-eclipse--698844175\testng-customsuite.xml

FAILED: BookLaunch org.openqa.selenium.SessionNotCreatedException: Error starting Selendroid session io.selendroid.exceptions.SessionNotCreatedException: Error starting Selendroid session at io.selendroid.server.model.SelendroidStandaloneDriver.createNewTestSession(SelendroidStandaloneDriver.java:277) at io.selendroid.server.handler.CreateSessionHandler.handle(CreateSessionHandler.java:44) at io.selendroid.server.SelendroidServlet.handleRequest(SelendroidServlet.java:143) at io.selendroid.server.BaseServlet.handleHttpRequest(BaseServlet.java:67) at io.selendroid.server.http.ServerHandler.channelRead(ServerHandler.java:53) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319) at io.netty.handler.traffic.AbstractTrafficShapingHandler.channelRead(AbstractTrafficShapingHandler.java:223) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319) at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319) at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:163) at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:148) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319) at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:787) at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:125) at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:511) at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468) at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382) at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354) at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116) at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:137) at java.lang.Thread.run(Unknown Source) Caused by: io.selendroid.exceptions.AndroidSdkException: APK installation failed. Output: pkg: /data/local/tmp/resigned-PearsonEtextAndroidRUMBA.apk Failure [INSTALL_FAILED_OLDER_SDK] 1433 KB/s (6758030 bytes in 4.603s)

at io.selendroid.android.impl.AbstractDevice.install(AbstractDevice.java:146)
at io.selendroid.server.model.SelendroidStandaloneDriver.createNewTestSession(SelendroidStandaloneDriver.java:202)
... 25 more

Command duration or timeout: 179.17 seconds Build info: version: 'unknown', revision: 'unknown', time: 'unknown' System info: host: 'OWNER-VAIO', ip: '192.168.1.43', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.7.0_17' Driver info: io.selendroid.SelendroidDriver at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:204) at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:156) at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:599) at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:240) at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:126) at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:139) at io.selendroid.SelendroidDriver.(SelendroidDriver.java:72) at io.selendroid.SelendroidDriver.(SelendroidDriver.java:84) at NativeApp.Native.BookLaunch(Native.java:53) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:84) at org.testng.internal.Invoker.invokeMethod(Invoker.java:714) 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) Caused by: io.selendroid.exceptions.SessionNotCreatedException: Error starting Selendroid session io.selendroid.exceptions.SessionNotCreatedException: Error starting Selendroid session at io.selendroid.server.model.SelendroidStandaloneDriver.createNewTestSession(SelendroidStandaloneDriver.java:277) at io.selendroid.server.handler.CreateSessionHandler.handle(CreateSessionHandler.java:44) at io.selendroid.server.SelendroidServlet.handleRequest(SelendroidServlet.java:143) at io.selendroid.server.BaseServlet.handleHttpRequest(BaseServlet.java:67) at io.selendroid.server.http.ServerHandler.channelRead(ServerHandler.java:53) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319) at io.netty.handler.traffic.AbstractTrafficShapingHandler.channelRead(AbstractTrafficShapingHandler.java:223) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319) at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319) at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:163) at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:148) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319) at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:787) at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:125) at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:511) at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468) at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382) at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354) at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116) at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:137) at java.lang.Thread.run(Unknown Source) Caused by: io.selendroid.exceptions.AndroidSdkException: APK installation failed. Output: pkg: /data/local/tmp/resigned-PearsonEtextAndroidRUMBA.apk Failure [INSTALL_FAILED_OLDER_SDK] 1433 KB/s (6758030 bytes in 4.603s)

at io.selendroid.android.impl.AbstractDevice.install(AbstractDevice.java:146)
at io.selendroid.server.model.SelendroidStandaloneDriver.createNewTestSession(SelendroidStandaloneDriver.java:202)
... 25 more

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

Default suite

Total tests run: 1, Failures: 1, Skips: 0

[TestNG] Time taken by org.testng.reporters.jq.Main@34f07ec4: 56 ms [TestNG] Time taken by org.testng.reporters.SuiteHTMLReporter@79826b7a: 39 ms [TestNG] Time taken by org.testng.reporters.XMLReporter@6901dfa5: 10 ms [TestNG] Time taken by org.testng.reporters.JUnitReportReporter@368f7f42: 7 ms [TestNG] Time taken by org.testng.reporters.EmailableReporter2@3b870cfc: 6 ms [TestNG] Time taken by [FailedReporter passed=0 failed=0 skipped=0]: 6 ms

priyankshah217 commented 9 years ago

@nitikas , I am also getting same error with new selendroid. But during execution i got below exceptions as well

java.lang.SecurityException: Permission Denial: starting instrumentation ComponentInfo{io.selendroid.com.test.app.android/io.selendroid.server.ServerInstrumentation} from pid=15907, uid=15907 not allowed because package io.selendroid.com.test.app.android does not have a signature matching the target com.yt.enigma.android at android.os.Parcel.readException(Parcel.java:1425) at android.os.Parcel.readException(Parcel.java:1379) at android.app.ActivityManagerProxy.startInstrumentation(ActivityManagerNative.java:2836) at com.android.commands.am.Am.runInstrument(Am.java:615) at com.android.commands.am.Am.run(Am.java:118) at com.android.commands.am.Am.main(Am.java:81) at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method) at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:237) at dalvik.system.NativeStart.main(Native Method)

asm89 commented 9 years ago

I'm closing this issue due to inactivity. If you still experience the issue described on the latest release of selendroid feel free to file a new issue. If you do please provide a concise reproducible test case and describe what results you are seeing and what results you expect.