Fixed
Status Update
Comments
vs...@google.com <vs...@google.com> #2
I think we can close this, I suspect it's actually just a symptom of
API 34
16:39:03.486 I GreetingScreen composed
16:39:03.576 I GreetingScreen focus=true
16:39:09.165 I GreetingScreen onDispose
16:39:09.165 I ListScreen composed
16:39:09.214 I ListScreen focus=true
16:39:12.236 I GreetingScreen composed
16:39:12.269 I GreetingScreen focus=false
16:39:35.427 I GreetingScreen onDispose
API 35
16:39:52.460 I GreetingScreen composed
16:39:52.551 I GreetingScreen focus=true
16:40:09.212 I ListScreen composed
16:40:09.272 I ListScreen focus=true
16:40:10.118 I GreetingScreen onDispose
16:40:11.049 I GreetingScreen composed
16:40:11.061 I GreetingScreen focus=true
16:40:16.482 I GreetingScreen onDispose
th...@gmail.com <th...@gmail.com> #3
Added a few more tests, the underlying HFC machinery seems to be working.
vs...@google.com <vs...@google.com> #4
Project: platform/frameworks/support
Branch: androidx-main
Author: Sergio Sancho <
Link:
Adding test to HFC
Expand for full commit details
Adding test to HFC
Relnote: Adding tests
Test: Added.
Bug: 395548918
Change-Id: I1ce54d56ef24665053a6179816aefd70cb9d9453
Files:
- M
wear/compose/compose-foundation/src/androidTest/kotlin/androidx/wear/compose/foundation/HierarchicalFocusCoordinatorTest.kt
Hash: ed5e91166781ad305868bbb9e2d1ad76df317c6b
Date: Mon Feb 10 16:54:32 2025
th...@gmail.com <th...@gmail.com> #5
Good news! Wear Compose has been updated to ab/13046075 in https://critique.corp.google.com/cl/732905175 and this bug has been affected.
th...@gmail.com <th...@gmail.com> #6
I spoke too soon. Event with ADB_INSTALL_TIMEOUT, I still have TimeoutException. I should have run more build before announcing my success. Now even with ADB_INSTALL_TIMEOUT I still have TimeoutException from time to time.
So I dig around the issue a little bit. First, with the line number of the stacktrace I was able to confirm that the version of ddmlib that I use is this one:
https://android.googlesource.com/platform/tools/base/+/bc733f18ec99fe5e14804ec062edc98039d67685/ddmlib/src/main/java/com/android/ddmlib/Device.java
While looking at the code, I found out that the ADB_INSTALL_TIMEOUT is NOT used when syncing the package to the device. So that explains why I had a timeout exception before 4 minutes (the value of ADB_INSTALL_TIMEOUT).
Then I followed the code and found that the timeout value used is the one stored in DdmPreferences.
So in my gradle file, I have added "com.android.ddmlib.DdmPreferences.setTimeOut(30000)". Success! I have run over 25 builds without getting the exception once!
Just to confirm my finding, I have check the maven code and their version of the timeout setting does exactly the same thing:
https://github.com/SierraGolf/maven-android-plugin/commit/fa06e72f6d24fad20a50ad4367a881678cee1ec6
----
TL;DR Feature Request:a dd an adbInstalltimeout setting in gradle that set the value in DdmPreferences.setTimeOut()
So I dig around the issue a little bit. First, with the line number of the stacktrace I was able to confirm that the version of ddmlib that I use is this one:
While looking at the code, I found out that the ADB_INSTALL_TIMEOUT is NOT used when syncing the package to the device. So that explains why I had a timeout exception before 4 minutes (the value of ADB_INSTALL_TIMEOUT).
Then I followed the code and found that the timeout value used is the one stored in DdmPreferences.
So in my gradle file, I have added "com.android.ddmlib.DdmPreferences.setTimeOut(30000)". Success! I have run over 25 builds without getting the exception once!
Just to confirm my finding, I have check the maven code and their version of the timeout setting does exactly the same thing:
----
TL;DR Feature Request:a dd an adbInstalltimeout setting in gradle that set the value in DdmPreferences.setTimeOut()
vs...@google.com <vs...@google.com> #7
Ah, good catch. I'll update ddmlib to possibly set ddm preferences based on that so that you don't have to do it in code. For the Gradle stuff, could you create a separate bug ("ability to change adb install timeout from gradle script")?
vs...@google.com <vs...@google.com> #8
+jedo recently added options that you can set in the build.gradle to control timeouts.
https://android-review.googlesource.com/#/c/128145/
je...@google.com <je...@google.com> #9
yes this is fixed and released in 1.1.0
adbOptions {
timeOutInMs 5000 // 5 seconds in ms.
}
adbOptions {
timeOutInMs 5000 // 5 seconds in ms.
}
pa...@gmail.com <pa...@gmail.com> #10
just tested it with gradle 1.1.0 and the adbOptions are not included. I guess it's for the 1.2.0 release because the change was merged into branc `studio-1.2-dev`.
I'm currently using `com.android.ddmlib.DdmPreferences.setTimeOut(30000)` and it works perfectly as a workaround until 1.2.0 is out.
I'm currently using `com.android.ddmlib.DdmPreferences.setTimeOut(30000)` and it works perfectly as a workaround until 1.2.0 is out.
je...@google.com <je...@google.com> #11
ah correct, I somehow was convinced it was in 1.1.0 branch. sorry for the confusion.
hi...@gmail.com <hi...@gmail.com> #13
This problem is not solved because adding adbOptions's timeOutInMs does not call DdmPreferences.setTimeOut.
DdmPreferences.setTimeOut is the global adb read/write packet timeout setting.
In 'at com.android.ddmlib.SyncService.doPushFile(SyncService.java:671)', DdmPreferences.getTimeOut() is called and used to set timeout.
DdmPreferences.setTimeOut is the global adb read/write packet timeout setting.
In 'at com.android.ddmlib.SyncService.doPushFile(SyncService.java:671)', DdmPreferences.getTimeOut() is called and used to set timeout.
ha...@gmail.com <ha...@gmail.com> #14
[Comment deleted]
bl...@gmail.com <bl...@gmail.com> #15
[Comment deleted]
bl...@gmail.com <bl...@gmail.com> #16
Can confirm adboptions doesn't fix this, com.android.ddmlib.DdmPreferences.setTimeOut(120000) fixes the issue for CircleCI at least.
eu...@gmail.com <eu...@gmail.com> #17
Here is what we have in build.gradle:
android{
...
adbOptions {
timeOutInMs 5 * 60 * 1000 // 5 minutes
}
}
At the same time, I see on jenkins:
com.android.ddmlib.InstallException
at com.android.ddmlib.Device.installPackage(Device.java:853)
at com.android.builder.testing.ConnectedDevice.installPackage(ConnectedDevice.java:91)
at com.android.builder.testing.ConnectedDevice$installPackage$0.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:128)
at com.android.build.gradle.internal.tasks.InstallVariantTask.install(InstallVariantTask.groovy:123)
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.internal.reflect.JavaMethod.invoke(JavaMethod.java:75)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.doExecute(AnnotationProcessingTaskFactory.java:226)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:219)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:208)
at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:589)
at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:572)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35)
at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:64)
at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:42)
at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53)
at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
at org.gradle.api.internal.AbstractTask.executeWithoutThrowingTaskFailure(AbstractTask.java:310)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.executeTask(AbstractTaskPlanExecutor.java:79)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:63)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:51)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54)
at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40)
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.TimeoutException
at com.android.ddmlib.AdbHelper.read(AdbHelper.java:767)
at com.android.ddmlib.SyncService.doPushFile(SyncService.java:695)
at com.android.ddmlib.SyncService.pushFile(SyncService.java:380)
at com.android.ddmlib.Device.syncPackageToDevice(Device.java:1069)
at com.android.ddmlib.Device.installPackage(Device.java:844)
... 35 more
:app:installDebug FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:installDebug'.
> com.android.builder.testing.api.DeviceException: com.android.ddmlib.InstallException
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 1 mins 51.437 secs
It is happening on linux build machine with android gradle plugin version 1.3.0
android{
...
adbOptions {
timeOutInMs 5 * 60 * 1000 // 5 minutes
}
}
At the same time, I see on jenkins:
com.android.ddmlib.InstallException
at com.android.ddmlib.Device.installPackage(Device.java:853)
at com.android.builder.testing.ConnectedDevice.installPackage(ConnectedDevice.java:91)
at com.android.builder.testing.ConnectedDevice$installPackage$0.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:128)
at com.android.build.gradle.internal.tasks.InstallVariantTask.install(InstallVariantTask.groovy:123)
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.internal.reflect.JavaMethod.invoke(JavaMethod.java:75)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.doExecute(AnnotationProcessingTaskFactory.java:226)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:219)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:208)
at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:589)
at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:572)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35)
at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:64)
at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:42)
at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53)
at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
at org.gradle.api.internal.AbstractTask.executeWithoutThrowingTaskFailure(AbstractTask.java:310)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.executeTask(AbstractTaskPlanExecutor.java:79)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:63)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:51)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54)
at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40)
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.TimeoutException
at com.android.ddmlib.AdbHelper.read(AdbHelper.java:767)
at com.android.ddmlib.SyncService.doPushFile(SyncService.java:695)
at com.android.ddmlib.SyncService.pushFile(SyncService.java:380)
at com.android.ddmlib.Device.syncPackageToDevice(Device.java:1069)
at com.android.ddmlib.Device.installPackage(Device.java:844)
... 35 more
:app:installDebug FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:installDebug'.
> com.android.builder.testing.api.DeviceException: com.android.ddmlib.InstallException
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 1 mins 51.437 secs
It is happening on linux build machine with android gradle plugin version 1.3.0
an...@gmail.com <an...@gmail.com> #18
same problem on gradle 2.3:
build.gradle config:
adbOptions {
timeOutInMs 5 * 60 * 1000 // 5 minutes
}
output for ./gradlew installProdDebug
...
:app:installProdDebug
Installing APK 'app-prod-debug.apk' on 'radxa_rock_pro - 4.4.2'
06:03:24 E/Device: Error during Sync: timeout.
with adb works fine (adb connect xxx.xxx.xxx.xxx:5555 && adb install xxx.apk)
System details:
./gradlew --version
------------------------------------------------------------
Gradle 2.3
------------------------------------------------------------
Build time: 2015-02-16 05:09:33 UTC
Build number: none
Revision: 586be72bf6e3df1ee7676d1f2a3afd9157341274
Groovy: 2.3.9
Ant: Apache Ant(TM) version 1.9.3 compiled on December 23 2013
JVM: 1.7.0_80 (Oracle Corporation 24.80-b11)
OS: Debian Linux 3.16.0-4-amd64 amd64
lsb_release Debian GNU/Linux 8.2 (jessie) Release: 8.2
build.gradle config:
adbOptions {
timeOutInMs 5 * 60 * 1000 // 5 minutes
}
output for ./gradlew installProdDebug
...
:app:installProdDebug
Installing APK 'app-prod-debug.apk' on 'radxa_rock_pro - 4.4.2'
06:03:24 E/Device: Error during Sync: timeout.
with adb works fine (adb connect xxx.xxx.xxx.xxx:5555 && adb install xxx.apk)
System details:
./gradlew --version
------------------------------------------------------------
Gradle 2.3
------------------------------------------------------------
Build time: 2015-02-16 05:09:33 UTC
Build number: none
Revision: 586be72bf6e3df1ee7676d1f2a3afd9157341274
Groovy: 2.3.9
Ant: Apache Ant(TM) version 1.9.3 compiled on December 23 2013
JVM: 1.7.0_80 (Oracle Corporation 24.80-b11)
OS: Debian Linux 3.16.0-4-amd64 amd64
lsb_release Debian GNU/Linux 8.2 (jessie) Release: 8.2
Description
:app:connectedAndroidTestDebug
E/Device: Error during Sync: timeout.
Unable to install /Users/jenkins/workspace/test_gradle_master/android_app/app/build/outputs/apk/app-debug.apk
com.android.ddmlib.InstallException
at com.android.ddmlib.Device.installPackage(Device.java:840)
at com.android.builder.testing.ConnectedDevice.installPackage(ConnectedDevice.java:83)
at com.android.builder.internal.testing.SimpleTestCallable.call(SimpleTestCallable.java:125)
at com.android.builder.internal.testing.SimpleTestCallable.call(SimpleTestCallable.java:47)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: com.android.ddmlib.TimeoutException
at com.android.ddmlib.AdbHelper.write(AdbHelper.java:819)
at com.android.ddmlib.SyncService.doPushFile(SyncService.java:671)
at com.android.ddmlib.SyncService.pushFile(SyncService.java:380)
at com.android.ddmlib.Device.syncPackageToDevice(Device.java:1036)
at com.android.ddmlib.Device.installPackage(Device.java:831)
... 9 more
We had a similar issue with our server when we did our build using Maven. Fortunately, the maven plugin has a settings named 'adbConnectionTimeout'. Increasing the value from 5000 ms to 10 000ms solved our problem.
Would it be possible to add this setting to the gradle build as well?