-
Notifications
You must be signed in to change notification settings - Fork 340
Description
Describe the bug
Dart daemon was left hanging when IDE was closed.
To Reproduce
Steps to reproduce the behavior:
- In the terminal, I ran
flutter build appbundle. - While it was loading, I started a debug session of my Flutter app.
- Building completed from the terminal.
- After waiting longer than usual, "Running gradle assemble debug" message would not leave and at the debug console it got stuck with "Launching lib\main.dart on PHONE in debug mode..." even when the app on my phone had already started and I was able to use it completely fine.
- I tried to terminate the debug session with multiple clicks to the stop button, no use because of some bug.
- Closed the IDE instead.
- Opened Task Manager and saw that
dart.exe daemonwas still running.
Expected behavior
No dart.exe left running.
Please complete the following information:
Workspace Environment
Dart Code extension: 3.90.0
Flutter extension: 3.91.20240529 (activated)
App: Visual Studio Code
App Host: desktop
Version: win 1.90.2
Workspace type: Flutter (LSP)
Dart (3.4.3): C:\Users\user\.puro\shared\caches\edd8546116457bdf1c5bdfb13ecb9463d2bb5ed4\dart-sdk
Flutter (3.22.2): C:\Users\user\.puro\envs\stable\flutter (SM G780F (android-arm64/android))
Output from 'dart info'
C:\Users\user\.puro\shared\caches\edd8546116457bdf1c5bdfb13ecb9463d2bb5ed4\dart-sdk\bin\dart.exe info
If providing this information as part of reporting a bug, please review the information
below to ensure it only contains things you're comfortable posting publicly.
General info
- Dart 3.4.3 (stable) (Tue Jun 4 19:51:39 2024 +0000) on "windows_x64"
- on windows / "Windows 10 Pro" 10.0 (Build 22631)
- locale is pt-BR
Process info
| Memory | CPU | Elapsed time | Command line |
|---|---|---|---|
| 0 MB | -- | dart.exe | |
| 0 MB | -- | dart.exe | |
| 0 MB | -- | dart.exe | |
| 0 MB | -- | dart.exe | |
| 0 MB | -- | dart.exe | |
| 0 MB | -- | dart.exe |
Output from 'flutter doctor'
C:\Users\user\.puro\envs\stable\flutter\bin\flutter.bat doctor -v
[√] Flutter (Channel stable, 3.22.2, on Microsoft Windows [Version 10.0.22631.3737], locale pt-BR)
• Flutter version 3.22.2 on channel stable at C:\Users\user\.puro\envs\stable\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 761747bfc5 (3 weeks ago), 2024-06-05 22:15:13 +0200
• Engine revision edd8546116
• Dart version 3.4.3
• DevTools version 2.34.3
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
• Android SDK at C:\Users\user\AppData\Local\Android\sdk
• Platform android-34, build-tools 34.0.0
• Java binary at: C:\Users\user\AppData\Local\Programs\Android Studio\jbr\bin\java
• Java version OpenJDK Runtime Environment (build 17.0.10+0--11609105)
• All Android licenses accepted.
[√] Chrome - develop for the web
• Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe
[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.4.5)
• Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
• Visual Studio Community 2022 version 17.4.33403.182
• Windows 10 SDK version 10.0.19041.0
[√] Android Studio (version 2024.1)
• Android Studio at C:\Users\user\AppData\Local\Programs\Android Studio
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 17.0.10+0--11609105)
[√] VS Code (version 1.90.2)
• VS Code at C:\Users\user\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.86.0
[√] VS Code (version 1.88.0-insider)
• VS Code at C:\Users\user\AppData\Local\Programs\Microsoft VS Code Insiders
• Flutter extension version 3.64.0
[√] Connected device (4 available)
• SM G780F (mobile) • 192.168.200.50:45967 • android-arm64 • Android 13 (API 33)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.22631.3737]
• Chrome (web) • chrome • web-javascript • Google Chrome 126.0.6478.115
• Edge (web) • edge • web-javascript • Microsoft Edge 125.0.2535.85
! Device 192.168.200.50:37835 is offline.
[√] Network resources
• All expected network resources are available.
• No issues found!
Aditional info
Not completely sure, but I've seen a similar behaviour with a dart.exe (not sure it was the daemon) left hanging after the IDE got closed. Most of the time I saw this when opening two different Dart projects in two different instances of VSCode.
I was advised in Discord to enable the log for the daemon (and others) in VSCode. Will do and update this issue if that happens again.
Maybe it has something to do with concurrent analysers or something along these lines?