Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android Studio sync benchmark times out on larger projects #525

Open
TadeasKriz opened this issue Jan 2, 2024 · 3 comments
Open

Android Studio sync benchmark times out on larger projects #525

TadeasKriz opened this issue Jan 2, 2024 · 3 comments

Comments

@TadeasKriz
Copy link

We're seeing issue where the benchmark fails with:

java.lang.IllegalStateException: Timeout waiting for incoming connection from plugin.
	at org.gradle.profiler.client.protocol.Server.waitForIncoming(Server.java:50)
	at org.gradle.profiler.studio.process.StudioProcess.<init>(StudioProcess.java:39)
	at org.gradle.profiler.studio.process.StudioProcessController.maybeStartProcess(StudioProcessController.java:76)
	at org.gradle.profiler.studio.process.StudioProcessController.run(StudioProcessController.java:43)
	at org.gradle.profiler.studio.StudioGradleClient.sync(StudioGradleClient.java:78)
	at org.gradle.profiler.studio.AndroidStudioSyncAction.run(AndroidStudioSyncAction.java:36)
	at org.gradle.profiler.gradle.BuildUnderTestInvoker$InvokeAndMeasureAction.run(BuildUnderTestInvoker.java:71)
	at org.gradle.profiler.gradle.BuildUnderTestInvoker$InvokeAndMeasureAction.run(BuildUnderTestInvoker.java:51)
	at org.gradle.profiler.RunBuildStepAction.run(RunBuildStepAction.java:29)
	at org.gradle.profiler.ScenarioInvoker.runMeasured(ScenarioInvoker.java:28)
	at org.gradle.profiler.gradle.GradleScenarioInvoker.run(GradleScenarioInvoker.java:121)
	at org.gradle.profiler.studio.invoker.StudioGradleScenarioInvoker.run(StudioGradleScenarioInvoker.java:63)
	at org.gradle.profiler.studio.invoker.StudioGradleScenarioInvoker.run(StudioGradleScenarioInvoker.java:19)
	at org.gradle.profiler.Main.invoke(Main.java:140)
	at org.gradle.profiler.Main.run(Main.java:98)
	at org.gradle.profiler.Main.main(Main.java:37)

From my debugging it seems the issue is caused by indexing taking too long and because of that the GradleProfilerStartupActivity#runActivity isn't called in before Gradle Profiler times out.

@asodja
Copy link
Member

asodja commented Jan 8, 2024

That probably means that IDE was not started correctly.

What version of AS are using? There is a report that gradle-profiler doesn't work with Jellyfish, see #526.

@kirillzh
Copy link

kirillzh commented Jun 1, 2024

Seeing this on Android Studio 2023.3.1.18 with Gradle 8.7.

Tried using Gradle Profiler 0.21.0-alpha-4 which is supposed to include the fix for #526, but getting the same error.

@gabrielfeo
Copy link

gabrielfeo commented Jul 10, 2024

I also encountered this error. Profiler output was the same and in Android Studio it was:

Timeout waiting to receive class org.gradle.profiler.client.protocol.messages.StudioAgentConnectionParameters.

It seems fixed using the latest source (as of 1125b1e). Working properly with Jellyfish and Koala 2024.1.1 on a large build (480 subprojects).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants