flutter / flutter/flutter-intellij
Need better recovery when flutter hangs
- Dominant language
- Java
- Stars
- 2k
- Forks
- 356
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 27
Description
My latest `flutter upgrade` hung, possibly due to network time-outs. The last two lines were:
```console
Downloading android-x86 tools... 1383.6s
Downloading android-x64 tools... 1472.0s
```
(And this *should* have been really fast internet.)
I didn't notice that immediately. When I tried to connect a device the Flutter plugin would not detect it. The device list stayed empty, or changed to `Loading...`. In any case, no devices were detected.
I tried `flutter doctor` to see what the status was and was promptly informed:
```console
Waiting for another flutter command to release the startup lock...
```
That's when I noticed the hung upgrade. I'm guessing when the plugin tried to find devices, it used a Flutter command that failed with the above message. We should detect that and report a configuration issue to the user.
And yes, babysitting the upgrade command and ensuring it finished restored device detection.
Contributor guide
Research direction
Start by tracing device discovery in the IntelliJ plugin and how it invokes Flutter commands such as `flutter doctor` while `flutter upgrade` holds the startup lock. Done means a locked or hung Flutter command is recognized and reported as a configuration issue instead of leaving the device list empty or stuck on `Loading...`.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100