android


cAT uninstalling app and device not found


I am running instrumentation tests through ADB over WiFi and I frequently run into device not found after running a percentage of total tests. I execute the tests using ./gradlew cAT and I am not sure of two things that are happening when executing these tests:
why does the cAT task need to uninstall the app while executing the tests? I cannot seem to find enough info about the internal workings of cAT
why is the device loosing connectivity? while I can understand flaky wi-fi and such external factors but it appears to be far frequent than I'd expect
Again, I run these tests from Android Studio (v1.5.1) like so:
$ ./gradlew --stacktrace cAT
Here is the exception stacktrace:
my.app.unittest.ivtapp.MyUnitTest > test016_CameraShootPhoto[142: cameraType:XYX ; setting:ISO ; precondition:MANUAL; input1: 7; expected1: 7; input2: -1; expected2: -1][SM-T230NU - 4.4.2] FAILED
Test failed to run to completion. Reason: 'Test run failed to complete. Expected 30896 tests, received 4737'. Check device logcat for details
Tests on SM-T230NU - 4.4.2 failed: Test run failed to complete. Expected 30896 tests, received 4737
Unable to uninstall my.app.unittest.ivtapp.MyUnitTest
com.android.ddmlib.InstallException: device 'X.Y.X.T:5555' not found
at com.android.ddmlib.Device.uninstallPackage(Device.java:1199)
at com.android.builder.testing.ConnectedDevice.uninstallPackage(ConnectedDevice.java:124)
at com.android.builder.internal.testing.SimpleTestCallable.uninstall(SimpleTestCallable.java:260)
at com.android.builder.internal.testing.SimpleTestCallable.call(SimpleTestCallable.java:242)
at com.android.builder.internal.testing.SimpleTestCallable.call(SimpleTestCallable.java:48)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: com.android.ddmlib.AdbCommandRejectedException: device 'X.Y.X.T:5555' not found
at com.android.ddmlib.AdbHelper.setDevice(AdbHelper.java:862)
at com.android.ddmlib.AdbHelper.executeRemoteCommand(AdbHelper.java:451)
at com.android.ddmlib.AdbHelper.executeRemoteCommand(AdbHelper.java:382)
at com.android.ddmlib.Device.executeShellCommand(Device.java:613)
at com.android.ddmlib.Device.uninstallPackage(Device.java:1193)
... 10 more
FAILURE: Build failed with an exception.
* What went wrong:
Could not receive a message from the daemon.
* Try:
Run with --info or --debug option to get more log output.
* Exception is:
org.gradle.launcher.daemon.client.DaemonConnectionException: Could not receive a message from the daemon.
at org.gradle.launcher.daemon.client.DaemonClientConnection.receive(DaemonClientConnection.java:85)
at org.gradle.launcher.daemon.client.DaemonClientConnection.receive(DaemonClientConnection.java:35)
at org.gradle.launcher.daemon.client.DaemonClient.monitorBuild(DaemonClient.java:194)
at org.gradle.launcher.daemon.client.DaemonClient.executeBuild(DaemonClient.java:162)
at org.gradle.launcher.daemon.client.DaemonClient.execute(DaemonClient.java:125)
at org.gradle.launcher.daemon.client.DaemonClient.execute(DaemonClient.java:80)
at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:43)
at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:170)
at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:237)
at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:210)
at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:35)
at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:24)
at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:206)
at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:169)
at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
at org.gradle.launcher.Main.doAction(Main.java:33)
at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
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.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:54)
at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:35)
at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
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.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:30)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:129)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
Caused by: org.gradle.messaging.remote.internal.MessageIOException: Could not read message from '/0:0:0:0:0:0:0:1:56078'.
at org.gradle.messaging.remote.internal.inet.SocketConnection.receive(SocketConnection.java:84)
at org.gradle.launcher.daemon.client.DaemonClientConnection.receive(DaemonClientConnection.java:79)
... 31 more
Caused by: java.io.StreamCorruptedException: invalid stream header: 06000001
at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:804)
at java.io.ObjectInputStream.<init>(ObjectInputStream.java:299)
at org.gradle.internal.io.ClassLoaderObjectInputStream.<init>(ClassLoaderObjectInputStream.java:27)
at org.gradle.messaging.remote.internal.Message$ExceptionReplacingObjectInputStream.<init>(Message.java:208)
at org.gradle.messaging.remote.internal.Message.receive(Message.java:56)
at org.gradle.internal.serialize.BaseSerializerFactory$ThrowableSerializer.read(BaseSerializerFactory.java:148)
at org.gradle.internal.serialize.BaseSerializerFactory$ThrowableSerializer.read(BaseSerializerFactory.java:146)
at org.gradle.launcher.daemon.protocol.DaemonMessageSerializer$LogEventSerializer.read(DaemonMessageSerializer.java:204)
at org.gradle.launcher.daemon.protocol.DaemonMessageSerializer$LogEventSerializer.read(DaemonMessageSerializer.java:180)
at org.gradle.internal.serialize.DefaultSerializerRegistry$TaggedTypeSerializer.read(DefaultSerializerRegistry.java:85)
at org.gradle.launcher.daemon.protocol.DaemonMessageSerializer$OutputMessageSerializer.read(DaemonMessageSerializer.java:292)
at org.gradle.launcher.daemon.protocol.DaemonMessageSerializer$OutputMessageSerializer.read(DaemonMessageSerializer.java:278)
at org.gradle.internal.serialize.DefaultSerializerRegistry$TaggedTypeSerializer.read(DefaultSerializerRegistry.java:85)
at org.gradle.internal.serialize.Serializers$StatefulSerializerAdapter$1.read(Serializers.java:36)
at org.gradle.messaging.remote.internal.inet.SocketConnection.receive(SocketConnection.java:77)
... 32 more

Related Links

Is there a way that I can simulate an outgoing sms in an Android Emulator?
Android home menu in ICS
How can the client stay waiting for a possible server message?
How to set image in imageview in android?
Force close on orientation change with ViewPager/Fragments/ViewPagerExtensions
Creating Activities to be opened
How to create an overlay view in Android which toggles on button click
Crop saving Bitmap
Android: DateUtils.formatDateTime change date and time sequence
Crashing when loading zip using cocos2d-x
Android How to tell if Internet connection is being used?
ContentObserver for SQLite?
Google Maps, show close places to current user poisition
Indic Language Support for SDK but not PhoneGap
How to convert json string value into an ArrayList and display the values in Android ListView [duplicate]
Programmatically change RelativeLayout toRightOf to toLeftOf

Categories

HOME
google-app-engine
xml
fabricjs
search
localization
fuelux
c99
fpga
pda
jmx
rsa
camera
fftw
solaris
can
static-site
spring-data-mongodb
permissions
google-admin-sdk
gluon-mobile
rcloud
line
capistrano3
job-scheduling
html5-appcache
smartclient
digital-signature
drive
ksh
pimcore
php-mysqlidb
beta
xcode-ui-testing
shared
handler
spotipy
carrierwave
calculation
jmockit
jbutton
rselenium
gnat-gps
railstutorial.org
p4merge
memory-mapping
oim
fwrite
textsum
builder
linter
serde
dotnet-httpclient
user-defined-fields
facebook-pixel
remedy
css-transforms
baidu
django-1.10
gets
smartfoxserver
grails-plugin
custom-lists
pre-build-event
data-protection
database-relations
nullable
np-spring
realsense
kendo-upload
dllimport
file-move
sony-lifelog-api
iced-coffeescript
baasbox
airbrake
android-broadcast
rrule
xmltype
rapidsvn
iso-prolog
device-tree
named-parameters
jjaql
ray
conditionaltagsupport
xmltodict
bin
visual-studio-express
modular
hidapi
kogrid
ui-select2
superscrollorama
chart-director
panda3d
frameworkelementfactory
mapping-by-code
koken
convention
node-redis
htdocs
dot-emacs
dsl-tools
windows-identity

Resources

Encrypt Message