Skip to content

Restart Analysis Server exits DevTools on Flutter projects #5126

Closed

Description

@FMorschel

Describe the bug
When I run "Restart Analysis Server" from the extension, on Flutter projects (tested on a Dart-only project and it doesn't happen) I get an error from DevTools.

To Reproduce
Steps to reproduce the behavior:

  1. Run flutter create bug
  2. Open on VSCode
  3. Wait for the analysis server to finish starting
  4. Run "Restart Analysis Server"

Expected behavior
Nothing should be appearing.

Screenshots
image

Please complete the following information:

Workspace Environment
Dart Code extension: 3.90.0
Flutter extension: 3.90.0 (activated)

App: Visual Studio Code
App Host: desktop
Version: win 1.89.1

Workspace type: Flutter (LSP)

Dart (3.4.1): C:\Users\user\.puro\shared\caches\55eae6864b296dd9f43b2cc7577ec256e5c32a8d\dart-sdk
Flutter (3.22.1): C:\Users\user\.puro\envs\stable\flutter (Windows (windows-x64/windows))

Output from 'dart info'

C:\Users\user\.puro\shared\caches\55eae6864b296dd9f43b2cc7577ec256e5c32a8d\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.1 (stable) (Tue May 21 15:46:25 2024 +0000) on "windows_x64"
  • on windows / "Windows 10 Pro" 10.0 (Build 22631)
  • locale is pt-BR

Project info

  • sdk constraint: '>=2.17.0 <3.0.0'
  • dependencies: flutter
  • dev_dependencies: flutter_lints

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
Output from 'flutter doctor'

C:\Users\user\.puro\envs\stable\flutter\bin\flutter.bat doctor -v

[√] Flutter (Channel stable, 3.22.1, on Microsoft Windows [Version 10.0.22631.3593], locale pt-BR)
    • Flutter version 3.22.1 on channel stable at C:\Users\user\.puro\envs\stable\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision a14f74ff3a (7 days ago), 2024-05-22 11:08:21 -0500
    • Engine revision 55eae6864b
    • Dart version 3.4.1
    • 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.9+0--11185874)
    • 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 2023.2)
    • 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.9+0--11185874)

[√] IntelliJ IDEA Community Edition (version 2024.1)
    • IntelliJ at C:\Users\user\AppData\Local\Programs\IntelliJ IDEA Community Edition
    • Flutter plugin version 78.5.1
    • Dart plugin version 241.15845

[√] VS Code (version 1.89.1)
    • 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 (3 available)
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [Version 10.0.22631.3593]
    • Chrome (web)      • chrome  • web-javascript • Google Chrome 125.0.6422.78
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 124.0.2478.80

[√] Network resources
    • All expected network resources are available.

• No issues found!

Activity

  1. changed the title [-]`Restart Analysis Server` exits `DevTools`[/-] [+]`Restart Analysis Server` exits `DevTools` on Flutter projects[/+] on May 29, 2024
  2. toshiossada commented on Jun 19, 2024

    @toshiossada

    I upgraded to last flutter version and I've got the same error

    Doctor summary (to see all details, run flutter doctor -v):
    [√] Flutter (Channel stable, 3.22.2, on Microsoft Windows [versÆo 10.0.22631.3737], locale pt-BR)
    [√] Windows Version (Installed version of Windows is version 10 or higher)
    [√] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    [√] Chrome - develop for the web
    [√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.9.6)
    [√] Android Studio (version 2023.3)
    [√] VS Code (version 1.90.2)
    [√] Connected device (4 available)
    [√] Network resources

    • No issues found!

  3. added this to the v3.92.0 milestone on Jun 20, 2024
  4. DanTup commented on Jun 20, 2024

    @DanTup
    Member

    Sorry, I somehow missed the initial report here. The shutdown is normal because "Restart Analysis Server" is actually currently implemented as "Restart everything" (because some services depend on others). However, we shouldn't notify about shutdowns when we know that we're shutting down for a restart.

    I've fixed this (and a similar Flutter Daemon notification) so when we shut down services we don't trigger these notifications.

  5. added
    in commandsRelates to commands (usually invoked from the command Palette)
    on Jun 20, 2024
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 commandsRelates to commands (usually invoked from the command Palette)is bug

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions