Skip to content

Infinite spinner while trying to load property editor #8144

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

Open
kenzieschmoll opened this issue Apr 30, 2025 · 6 comments
Open

Infinite spinner while trying to load property editor #8144

kenzieschmoll opened this issue Apr 30, 2025 · 6 comments
Milestone

Comments

@kenzieschmoll
Copy link
Member

kenzieschmoll commented Apr 30, 2025

Successful load (remove .txt to load in Chrome DevTools):

successful_load.har.txt

@jwren @elliette

@kenzieschmoll kenzieschmoll added this to the M85.3 milestone Apr 30, 2025
@jwren
Copy link
Member

jwren commented Apr 30, 2025

Attaching a spinning ball case:

@kenzieschmoll
Copy link
Member Author

Attaching a spinning ball case:

I think the attachment is missing. I had to add .txt to the file extension to get github to accept it.

@DanTup
Copy link
Contributor

DanTup commented May 1, 2025

I can reproduce this in Android Studio. I saw it consistently yesterday, however today I was able to load the property editor once, however it usually fails. When it fails, the property editor connects to DTD and connects to the Service stream, but it is not told about any services (like the Editor services), and therefore doesn't initialize.

I enabled the analysis server instrumentation log and confirmed that Android Studio was calling connectToDtd. However, it appears that it's connecting to a different version to the one sent to the analysis server:

Image

When I review my running processes, I can see a single DTD instance, and I can see that DevTools was started with a DTD URI that matches the one the analysis server connected to.. However I also see another DevTools running, that does not have a --dtd-uri:

Image

Based on this, my current theory (with zero knowledge of how the plugins work) is that Android Studio is somehow spawning two DevTools servers. One is correctly being provided a DTD URI (for the DTD that Android Studio started), but the second is not, and is therefore spawning its own DTD, and that's the server being used by the Property Editor panel.

Since this is intermittent, I wonder if there is a race here, and when it works, only one DevTools server was spawned (or, both were spawned after DTD was started and therefore were provided the same/correct DTD URI).

@DanTup
Copy link
Contributor

DanTup commented May 1, 2025

I missed it in the list before, but I do also see the second instance of DTD in the process list, but it is spawned as dartaotruntime.exe instead of dart.exe (my assumption is that this is the one spawned by DevTools).

Image

I don't think I know enough about the plugins to debug this any further, but perhaps it will be useful to someone more familiar with them.

@DanTup
Copy link
Contributor

DanTup commented May 1, 2025

@jwren @alexander-doroshko I had a quick search across the plugin code to see if I could spot anything. I found that DevTools is spawned here:

https://github.com/JetBrains/intellij-plugins/blob/351d68772945e958214652001bb448d8ca549cff/Dart/src/com/jetbrains/lang/dart/ide/devtools/DartDevToolsService.kt#L32

The startService function checks serviceRunning to (presumably) guard against spawning a second copy of DevTools. However this boolean is not set to true until the server.started event arrives from the server. I think this means if there is a second call to startService() before the first one is completely up and running, it would still result in two DevTools servers running?

Fixing that (for example by setting serviceRunning=true immediately in startService) might not solve the issue if the first one spawned is the one that doesn't have the DTD URI.

@jwren
Copy link
Member

jwren commented May 1, 2025

Attaching a spinning ball case:

I think the attachment is missing. I had to add .txt to the file extension to get github to accept it.

I did as well, but it keeps getting rejected by GitHub.

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

3 participants