skip to Main Content

I am using VS Code for Flutter developement since a long time and up until now, launching the web version from VS code has worked just fine. However, similar to what others have posted I now get a "Waiting for connection from debug service on Chrome…".

The Chrome window opens but the URL just says: "http://localhost:57698/" and the page is white.

If I click reload, the URL changes to "http://localhost:57698/#/" and the page loads correctly. This seem to match other peoples experience for this problem, that hot reloading or similar loads the page.

If I launch the web version from the command line with: "flutter run -d chrome" it also works fine. It is only when launching from VSCode it no longer works (and it has been ok for 2 years). I have tried to restart the whole computer as well as Chrome and VS code and I have done flutter clean, still the same. I have also tested on 2 different computers, no change. Is there some magic thing in Chrome that can get stuck or what could have happened?

My flutter doctor says that all is ok:

[✓] Flutter (Channel stable, 2.10.5, on macOS 13.2 22D49 darwin-arm, locale en-ES)
    • Flutter version 2.10.5 at /Users/johanlantz/development/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 5464c5bac7 (10 months ago), 2022-04-18 09:55:37 -0700
    • Engine revision 57d3bac3dd
    • Dart version 2.16.2
    • DevTools version 2.9.2

[✓] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
    • Android SDK at /Users/johanlantz/Library/Android/sdk
    • Platform android-32, build-tools 32.1.0-rc1
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7772763)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.2)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • CocoaPods version 1.11.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • 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 11.0.11+0-b60-7772763)

[✓] VS Code (version 1.74.3)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.58.0

[✓] Connected device (1 available)
    • Chrome (web) • chrome • web-javascript • Google Chrome 109.0.5414.119

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!

2

Answers


  1. Chosen as BEST ANSWER

    Downgrading the dart and flutter VS code plugins from 3.58.0 to 3.56.0 fixed this (on two separate MacBooks with the same issue).


  2. The latest version of the plugin switched to a new API (because an old API is being removed). Unfortunately when running on the web, it appears as if the new API is available (the VM Service version number is high enough), but the API is unfortunately not actually available.

    A fix is on the way – you can get it early by switching to the Pre-Release version of the extension:

    Dart Pre-Release Extension

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search