Skip to content

flutter test --platform chrome hangs on "Loading x_test.dart" on Windows #162798

Description

@DanTup

Steps to reproduce

On Windows:

  • flutter create webtestapp
  • cd webtestapp
  • flutter test --platform chrome

Expected results

The test should run and complete.

Actual results

The test never runs, the output stalls forever (or at least longer than I've had the patience to wait) on "loading D:/Dev/Temp Projects/webtestapp/test/widget_test.dart".

Image

With -v:

Image

Note: I do see a Chrome process spawned that is presumably the headless version that should be running the tests:

Image

I see this on my local PC, but also on GitHub Actions where I was trying to enable Windows tests for DevTools.

Code sample

Code sample

No code required, just use the default flutter create app as noted in steps to reproduce.

Screenshots or Video

Screenshots / Video demonstration

Image

Image

Logs

Logs
PS D:\Dev\Temp Projects\webtestapp> flutter test -v --platform chrome
[   +1 ms] executing: [D:\Dev\Google\Flutter\Flutter main/] git -c log.showSignature=false log -n 1 --pretty=format:%H
[  +30 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[        ] b007899d3a7a072e880e3984856c777cc9c5082b
[        ] executing: [D:\Dev\Google\Flutter\Flutter main/] git tag --points-at b007899d3a7a072e880e3984856c777cc9c5082b
[  +30 ms] Exit code 0 from: git tag --points-at b007899d3a7a072e880e3984856c777cc9c5082b
[        ] executing: [D:\Dev\Google\Flutter\Flutter main/] git describe --match *.*.* --long --tags b007899d3a7a072e880e3984856c777cc9c5082b
[  +90 ms] Exit code 0 from: git describe --match *.*.* --long --tags b007899d3a7a072e880e3984856c777cc9c5082b
[        ] 3.29.0-0.0.pre-148-gb007899d3a
[   +1 ms] executing: [D:\Dev\Google\Flutter\Flutter main/] git symbolic-ref --short HEAD
[  +25 ms] Exit code 0 from: git symbolic-ref --short HEAD
[        ] master
[  +49 ms] executing: [D:\Dev\Google\Flutter\Flutter main/] git rev-parse --abbrev-ref --symbolic @{upstream}
[  +25 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{upstream}
[        ] origin/master
[        ] executing: [D:\Dev\Google\Flutter\Flutter main/] git ls-remote --get-url origin
[  +24 ms] Exit code 0 from: git ls-remote --get-url origin
[        ] git@github.com:DanTup/flutter.git
[  +90 ms] Found 1 files which will be executed as Widget Tests.
[   +3 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[        ] Artifact Instance of 'LegacyCanvasKitRemover' is not required, skipping update.
[   +1 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[  +20 ms] Artifact Instance of 'MaterialFonts' is not required, skipping update.
[        ] Artifact Instance of 'GradleWrapper' is not required, skipping update.
[        ] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[   +1 ms] Artifact Instance of 'FlutterSdk' is not required, skipping update.
[        ] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FontSubsetArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'PubDependencies' is not required, skipping update.
[  +20 ms] Skipping pub get: version match.
[  +74 ms] Generating D:\Dev\Temp Projects\webtestapp\android\app\src\main\java\io\flutter\plugins\GeneratedPluginRegistrant.java
[ +263 ms] No packages with native assets. Skipping native assets compilation.
[   +2 ms] Writing native assets json to file:///D:/Dev/Temp%20Projects/webtestapp/build/native_assets/windows/native_assets.json.
[   +1 ms] Writing D:\Dev\Temp Projects\webtestapp\build\native_assets\windows\native_assets.json done.
[  +52 ms] Stopping scan for flutter_test_config.dart; found project root at D:\Dev\Temp Projects\webtestapp
[   +4 ms] D:\Dev\Google\Flutter\Flutter main\bin\cache\dart-sdk\bin\dartaotruntime.exe D:\Dev\Google\Flutter\Flutter
main\bin\cache\dart-sdk\bin\snapshots\frontend_server_aot.dart.snapshot --sdk-root D:\Dev\Google\Flutter\Flutter main\bin\cache\flutter_web_sdk/
--incremental --target=dartdevc --experimental-emit-debug-metadata -DFLUTTER_WEB_USE_SKIA=true -DFLUTTER_WEB_USE_SKWASM=false --output-dill
C:\Users\danny\AppData\Local\Temp\flutter_tools.dab1be9f\flutter_test.8458c2a8\out --packages D:\Dev\Temp
Projects\webtestapp\.dart_tool\package_config.json -Ddart.vm.profile=false -Ddart.vm.product=false --enable-asserts --track-widget-creation
--filesystem-root D:\Dev\Temp Projects\webtestapp\test --filesystem-root
C:\Users\danny\AppData\Local\Temp\flutter_tools.dab1be9f\flutter_test.8458c2a8\ --filesystem-scheme org-dartlang-app --initialize-from-dill
build\80b1a4cf4e7b90e1ab5f72022a0bc624.cache.dill.track.dill --platform
file:///D:/Dev/Google/Flutter/Flutter%20main/bin/cache/flutter_web_sdk/kernel/ddc_outline_sound.dill --verbosity=error --sound-null-safety
[   +6 ms] <- compile org-dartlang-app:///main.dart
00:00 +0: loading D:/Dev/Temp Projects/webtestapp/test/widget_test.dart                                                                              [+5415 ms] Loading test suite test\widget_test.dart.
[        ] Serving tests at http://localhost:65227/static/index.html?managerUrl=ws%3A%2F%2Flocalhost%3A65227%2F0&debug=false
[        ] Launching Chromium (url = http://localhost:65227/static/index.html?managerUrl=ws%3A%2F%2Flocalhost%3A65227%2F0&debug=false, headless =
true, skipCheck = false, debugPort = null)
[        ] Will use Chromium executable at C:\Program Files\Google\Chrome\Application\chrome.exe
[  +91 ms] [CHROME]:
[        ] [CHROME]: DevTools listening on ws://127.0.0.1:65229/devtools/browser/9fd6810e-f331-4c95-823e-ae63e856435e
[ +169 ms] Running test suite test\widget_test.dart.
00:22 +0: loading D:/Dev/Temp Projects/webtestapp/test/widget_test.dart

Flutter Doctor output

Doctor output
PS D:\Dev> flutter doctor -v
[!] Flutter (Channel master, 3.29.0-1.0.pre.148, on Microsoft Windows [Version 10.0.26100.2894], locale en-GB) [1,912ms]
    • Flutter version 3.29.0-1.0.pre.148 on channel master at D:\Dev\Google\Flutter\Flutter main
    ! Warning: `dart` on your path resolves to D:\Tools\Dart\Stable\bin\dart.exe, which is not inside your current Flutter SDK checkout at
      D:\Dev\Google\Flutter\Flutter main. Consider adding D:\Dev\Google\Flutter\Flutter main\bin to the front of your path.
    • Upstream repository git@github.com:DanTup/flutter.git
    • FLUTTER_GIT_URL = git@github.com:DanTup/flutter.git
    • Framework revision b007899d3a (8 days ago), 2025-01-29 14:40:21 +0200
    • Engine revision b007899d3a
    • Dart version 3.8.0 (build 3.8.0-24.0.dev)
    • DevTools version 2.42.0
    • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and
      upgrades.

[✓] Windows Version (11 Pro 64-bit, 24H2, 2009) [1,068ms]

[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0-rc3) [3.4s]
    • Android SDK at C:\Users\danny\AppData\Local\Android\sdk
    • Platform android-35, build-tools 35.0.0-rc3
    • Java binary at: C:\Program Files\Android\Android Studio\jbr\bin\java
      This is the JDK bundled with the latest Android Studio installation on this machine.
      To manually set the JDK path, use: `flutter config --jdk-dir="path/to/jdk"`.
    • Java version OpenJDK Runtime Environment (build 17.0.9+0--11185874)
    • All Android licenses accepted.

[✓] Chrome - develop for the web [60ms]
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[✓] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.10.5) [59ms]
    • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
    • Visual Studio Community 2022 version 17.10.35122.118
    • Windows 10 SDK version 10.0.22621.0

[✓] Android Studio (version 2023.2) [13ms]
    • Android Studio at C:\Program Files\Android\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)

[✓] VS Code (version 1.96.4) [12ms]
    • VS Code at C:\Users\danny\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.105.20250203

[✓] VS Code (version 1.93.0-insider) [11ms]
    • VS Code at C:\Users\danny\AppData\Local\Programs\Microsoft VS Code Insiders
    • Flutter extension version 3.95.20240801

[✓] Connected device (3 available) [106ms]
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [Version 10.0.26100.2894]
    • Chrome (web)      • chrome  • web-javascript • Google Chrome 132.0.6834.160
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 131.0.2903.112

[✓] Network resources [514ms]
    • All expected network resources are available.

! Doctor found issues in 1 category.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work lista: tests"flutter test", flutter_test, or one of our testsplatform-webWeb applications specificallyplatform-windowsBuilding on or for Windows specificallyteam-toolOwned by Flutter Tool teamtoolAffects the "flutter" command-line tool. See also t: labels.triaged-toolTriaged by Flutter Tool team

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions