Skip to content

flutter/flutter workspace change broke flutter test ... --wasm #170433

Description

@stuartmorgan-g

The flutter/flutter -> flutter/packages roller got way behind, and we're working through blockers trying to get it caught up again. We're now stuck rolling to/past #169556, because it seems to have broken flutter test, but only (AFAICT) for wasm tests.

STR:

  • Check out the current Flutter main, or 70aa4b3
  • Check out flutter/packages
  • cd packages/animations (it doesn't have to be animations specifically, that's just one of many that fail)
  • Run flutter test --color --platform=chrome --wasm

The result is https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8712360320909426353/+/u/Run_package_tests/Dart_unit_tests_-_web__wasm_/stdout

Downloading packages...
+ async 2.13.0
+ boolean_selector 2.1.2
+ characters 1.4.0
+ clock 1.1.2
+ collection 1.19.1
+ fake_async 1.3.3
+ flutter 0.0.0 from sdk flutter
+ flutter_test 0.0.0 from sdk flutter
+ leak_tracker 11.0.1
+ leak_tracker_flutter_testing 3.0.10
+ leak_tracker_testing 3.0.2
+ matcher 0.12.17
+ material_color_utilities 0.11.1 (0.13.0 available)
+ meta 1.16.0 (1.17.0 available)
+ path 1.9.1
+ sky_engine 0.0.0 from sdk flutter
+ source_span 1.10.1
+ stack_trace 1.12.1
+ stream_channel 2.1.4
+ string_scanner 1.4.1
+ term_glyph 1.2.2
+ test_api 0.7.6
+ vector_math 2.2.0
+ vm_service 15.0.2
Changed 24 dependencies!
2 packages have newer versions incompatible with dependency constraints.
Try `flutter pub outdated` for more information.
Resolving dependencies in `./example`...
Downloading packages...
Got dependencies in `./example`.
Error: Error when reading '../../.dart_tool/package_config.json': No such file or directory
Error: Couldn't resolve the package 'flutter_test' in 'package:flutter_test/flutter_test.dart'.
Error: Couldn't resolve the package 'animations' in 'package:animations/src/shared_axis_transition.dart'.
Error: Couldn't resolve the package 'flutter' in 'package:flutter/material.dart'.
Error: Couldn't resolve the package 'vector_math' in 'package:vector_math/vector_math_64.dart'.
Error: Couldn't resolve the package 'animations' in 'package:animations/src/modal.dart'.
Error: Couldn't resolve the package 'animations' in 'package:animations/animations.dart'.
Error: Couldn't resolve the package 'flutter' in 'package:flutter/widgets.dart'.
Error: Couldn't resolve the package 'animations' in 'package:animations/src/fade_scale_transition.dart'.
Error: Couldn't resolve the package 'animations' in 'package:animations/src/open_container.dart'.
Error: Couldn't resolve the package 'animations' in 'package:animations/src/fade_through_transition.dart'.
../../../../t/flutter_tools.YYHHPC/flutter_test.MUMOBJ/main.dart:13:8: Error: Not found: 'package:flutter_test/flutter_test.dart'
import 'package:flutter_test/flutter_test.dart';
       ^
org-dartlang-app:///shared_axis_transition_test.dart:7:8: Error: Not found: 'package:flutter_test/flutter_test.dart'
import 'package:flutter_test/flutter_test.dart';
       ^
org-dartlang-app:///modal_test.dart:9:8: Error: Not found: 'package:flutter_test/flutter_test.dart'
import 'package:flutter_test/flutter_test.dart';
[... many many more "Not found" errors]

The exact same command without the --wasm flag works fine still.

Activity

  1. added
    a: tests"flutter test", flutter_test, or one of our tests
    fyi-webFor the attention of Web platform team
    team-toolOwned by Flutter Tool team
    on Jun 11, 2025
  2. stuartmorgan-g commented on Jun 11, 2025

    @stuartmorgan-g
    ContributorAuthor

    Speculatively assigning to team-tool. I'll try debugging locally to figure out what is looking for package_config.json, but I wanted to get this filed in parallel.

  3. stuartmorgan-g commented on Jun 11, 2025

    @stuartmorgan-g
    ContributorAuthor

    Found by source inspection:
    https://github.com/flutter/flutter/pull/169556/files#diff-2ee4b59e46c7814ad25528996ab34be1f41ee550541f39bbd9fda75edad1bf52L222

    '--packages=../../.dart_tool/package_config.json',

    (which is in the _compileWasm method of web_test_compiler.dart)

    /cc @mosuem @matanlurey as the PR authors and reviewers. It looks like this will break any Flutter clients trying to test in wasm mode, in which case we need to make sure this doesn't reach stable.

  4. added a commit that references this issue on Jun 11, 2025
  5. self-assigned this
    on Jun 11, 2025
  6. added
    P1High-priority issues at the top of the work list
    on Jun 11, 2025
  7. added theissue type on Jun 11, 2025
  8. matanlurey commented on Jun 11, 2025

    @matanlurey
    Contributor

    Thanks, I'll have a fix out.

  9. added a commit that references this issue on Jun 25, 2025
  10. github-actions commented on Jun 27, 2025

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  11. locked as resolved and limited conversation to collaborators on Jun 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work lista: tests"flutter test", flutter_test, or one of our testsc: regressionIt was better in the past than it is nowfyi-webFor the attention of Web platform teamteam-toolOwned by Flutter Tool team

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions