Repository navigation
Closed
Labels
Description
- Repo with reduced test case package: https://github.com/greglittlefield-wf/build_runner_test_repro
- Dart SDK: 3.13.4 (stable)
testpackage version: 1.32.0
When using test 1.32.0, tests fail to load when using build_runner test or dart run test --precompiled:
% dart run build_runner test
...
00:00 +0 -1: loading test/simple_test.dart [E]
Failed to load "test/simple_test.dart": Failed to load script at http://localhost:56407/AcDQNcKo4-Y=/test/simple_test.dart.browser_test.dart.js.The compiled JS file exists in the build output, but something goes wrong when loading it.
This also reproduces when using dart run test --precompiled directly:
% ./tool/precompile_and_test.sh
+ BUILD_OUTPUT=build_output
+ dart run build_runner build -o test:build_output
...
Built with build_runner/aot in 17s; wrote 1694 outputs.
+ JS_FILE=build_output/simple_browser_test.dart.browser_test.dart.js
+ '[' '!' -f build_output/simple_browser_test.dart.browser_test.dart.js ']'
+ echo '==> Compiled JS found: build_output/simple_browser_test.dart.browser_test.dart.js'
==> Compiled JS found: build_output/simple_browser_test.dart.browser_test.dart.js
+ dart run test --precompiled build_output
Building package executable... (2.6s)
Built test:test.
00:00 +0 -1: loading test/simple_browser_test.dart [E]
Failed to load "test/simple_browser_test.dart": Failed to load script at http://localhost:57474/_kkR2lMeqzw=/test/simple_browser_test.dart.browser_test.dart.js.
To run this test again: /Users/greglittlefield/.asdf/installs/dart/3.13.4/dart-sdk/bin/dart test test/simple_browser_test.dart -p chrome --plain-name 'loading test/simple_browser_test.dart'
00:00 +0 -1: Some tests failed.This issue does not reproduce when using test 1.31.2. Pinning to that old version changes only the following packages, and appears to work around the issue:
< test 1.31.2 (was 1.32.0) (1.32.0 available)
< test_api 0.7.13 (was 0.7.14) (0.7.14 available)
< test_core 0.6.19 (was 0.6.20) (0.6.20 available)
This issue seemed like it could also be reported to github.com/dart-lang/build, but since it seemed like a regression in test packages, starting here made sense to me.
Activity
jakemac53 commentedon Sep 22, 2026
Most likely a result of #2724 - I thought I did a quick manual test of that but maybe not?