Skip to content

Flutter Sidebar stops working after PC wakes from sleep #5808

Closed
flutter/devtools
#9587

Description

@khusantoy

Describe the bug

To Reproduce

  1. Open Flutter DevTools from the IDE sidebar (VS Code)
  2. Select any tool (e.g., Performance, Inspector, Network, Logging)
  3. DevTools panel does not respond — no action happens and the UI becomes stuck

Expected behavior

  1. DevTools should open the selected tool immediately
  2. The UI should remain responsive and allow switching between different DevTools tabs without freezing

Screenshots
https://github.com/user-attachments/assets/bbf2e501-7cdd-4ab6-8f69-d4a4a54079d9

Please complete the following information:

You can run the Dart: Collect Diagnostic Information command from the VS Code command palette (F1) to easily capture this information or provide it manually.

  • Operating System and version: macOS Tahoe 26.1
  • VS Code version: 1.106.1 (Universal)
  • Dart extension version: 3.122.0
  • Dart/Flutter SDK version: 3.122.0
  • Target device: mobile (Android & iOS simulator)

Activity

  1. DanTup commented on Nov 19, 2025

    @DanTup
    Member

    Does this reproduce on all projects? And is it always broken from the start, or only once you perform some action (like starting the app)?

    Could you try:

    1. Click Help -> Toggle Developer Tools to open the Chromium developer tools
    2. Click on the Console tab
    3. See whether any errors are printed when you click the buttons in the sidebar

    And also:

    1. Open the command palette
    2. Run the Preferences: Open Workspace Settings (JSON) command
    3. Add the following and then save the file:
      "dart.toolingDaemonLogFile": "logs/tooling_daemon.txt",
      
    4. Run the Developer: Restart Extension Host command from the command palette to restart the extension

    This will enable a log file of traffic over DTD. Reproduce the issue and click a few buttons, and then check whether anything is in the log file. (You can remove the line from .vscode/settings.json once done).

    Thanks!

  2. added
    awaiting infoRequires more information from the customer to progress
    in flutter sidebarRelates to something in the "Flutter sidebar" that's provided via DevTools
    on Nov 19, 2025
  3. changed the title [-]Flutter DevTools keeps freezing / stops responding[/-] [+]Clicking actions in Flutter side bar does not do anything[/+] on Nov 19, 2025
  4. khusantoy commented on Nov 19, 2025

    @khusantoy
    Author
    Image

    In the console tab, I see these errors when I click actions

  5. khusantoy commented on Nov 19, 2025

    @khusantoy
    Author
  6. DanTup commented on Nov 19, 2025

    @DanTup
    Member

    Thanks! It looks like the embedded page has lost its connection to DTD. I don't suppose you've noticed if you get a prompt in the bottom right corner telling you DTD has terminated? I wonder if this could be related to #5794

    If you are seeing DTD terminate, then adding:

    "dart.toolingDaemonLogFile": "logs/tooling_daemon.txt",
    

    To your .vscode/settings.json temporarily and then reproduce the error might help check if the daemon printed any errors.

  7. khusantoy commented on Nov 19, 2025

    @khusantoy
    Author

    I haven’t seen DTD terminate, and I didn’t receive any notification about it either.

  8. DanTup commented on Nov 19, 2025

    @DanTup
    Member

    @khusantoy are you able to enable the log noted above and see if it records any errors (and if not, perhaps will at least confirm the service is still running). If it is still running, then we may have to debug this from the DevTools side to undestand why it's not connecting (or is disconnecting).

    Can you confirm if there were any other errors above the ones you included before in the developer tools console? (I'm wondering if here's any error about the connection closing, prior to these failed requests).

  9. DanTup commented on Nov 19, 2025

    @DanTup
    Member

    Could you also confirm what version of Flutter you're using? (in the original issue you only included the version of the extension, not the SDK). Thanks!

  10. khusantoy commented on Nov 25, 2025

    @khusantoy
    Author

    Flutter 3.38.3 • channel stable • https://github.com/flutter/flutter.git
    Framework • revision 19074d12f7 (4 days ago) • 2025-11-20 17:53:13 -0500
    Engine • hash 8bf2090718fea3655f466049a757f823898f0ad1 (revision 13e658725d) (4 days ago) • 2025-11-20
    20:19:23.000Z
    Tools • Dart 3.10.1 • DevTools 2.51.1

  11. DanTup commented on Nov 25, 2025

    @DanTup
    Member

    @khusantoy thanks - could you also capture the log noted above? Thanks!

  12. khusantoy commented on Nov 26, 2025

    @khusantoy
    Author
  13. 4 remaining items

  14. DanTup commented on Dec 1, 2025

    @DanTup
    Member

    @khusantoy out of interest, do you have Norton Antivirus?

    If so, this issue might be similar to what's I've been debugging at #5794 (comment)

  15. khusantoy commented on Dec 2, 2025

    @khusantoy
    Author

    No I don't use it

  16. DanTup commented on Dec 3, 2025

    @DanTup
    Member

    @khusantoy thanks for confirming. Are you able to capture the logging from the debug build provided above? Thanks!

  17. khusantoy commented on Dec 3, 2025

    @khusantoy
    Author
  18. khusantoy commented on Dec 3, 2025

    @khusantoy
    Author

    I’ve found a consistent way to reproduce the issue:

    1. Run the Flutter app and open the sidebar. Clicking the sidebar actions works normally at this point.
    2. On macOS, open the Apple menu and select Sleep.
    3. After the screen turns completely black (sleep mode starts), wake the laptop again and try clicking the sidebar actions — they no longer respond or trigger anything
  19. DanTup commented on Dec 3, 2025

    @DanTup
    Member

    @elliette I can repro this with the steps above. I think is the issue you recently described (related to flutter/devtools#9028)... I had assumed it was only related to Chrome throttling bg tabs but didn't consider the laptop going to sleep!

    If I understand that change correctly, the fix you made only applies to the property editor. I wonder if it could be made more general so that all pages would be reinitialized if the DTD connection drops?

    We could probably force a refresh from the Dart-Code side, although if we were to just do that, we could perhaps also do it from within DevTools so it's in control (eg. it could do it for any connection drop rather than only when Dart-Code thinks we awoke from sleep - assuming we can detect such a thing).

  20. added this to the v3.126.0 milestone on Dec 3, 2025
  21. removed
    awaiting infoRequires more information from the customer to progress
    on Dec 3, 2025
  22. changed the title [-]Clicking actions in Flutter side bar does not do anything[/-] [+]Flutter Sidebar stops working after PC wakes from sleep[/+] on Dec 15, 2025
  23. DanTup commented on Dec 17, 2025

    @DanTup
    Member

    I landed a change in DevTools at flutter/devtools#9587 which will detect when the DTD connection drops and automatically try to reconnect (up to 5 times, but if it still hasn't connected, you can manually trigger it to try again).

    It will show up in a future SDK release (first a DevTools release will roll into Dart, and then Dart will roll into Flutter) rather than a VS Code extension update.

  24. added
    relies on sdk changesSomething that requires changes in the Dart/Flutter SDK to ship before it will become available
    on Dec 17, 2025
  25. khusantoy commented on Jan 30, 2026

    @khusantoy
    Author

    Hi @DanTup

    Thank you for the fix! I'm still experiencing this issue frequently and would like to know when this fix will be available.

    Could you please clarify:

    1. Which Flutter SDK version will include this fix?
    2. When is the expected release date for that version?
    3. Will it be available in the beta channel first?

    This issue is significantly affecting my daily workflow, so I'm trying to understand if I should:

    • Wait for the stable release
    • Switch to the beta/dev channel
    • Or use a workaround in the meantime

    Thank you for your help!

  26. DanTup commented on Jan 30, 2026

    @DanTup
    Member

    @khusantoy I would expect the fix to be in the current beta SDKs, and therefore also in the next (non-hotfix) stable release SDK. If you test out the beta and find it's not working there, please do let me know.

    Unfortunately I don't know a way to work around this while on the current stable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    in flutterRelates to running Flutter appsin flutter sidebarRelates to something in the "Flutter sidebar" that's provided via DevToolsis bugrelies on sdk changesSomething that requires changes in the Dart/Flutter SDK to ship before it will become available

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions