You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[web][tool] flutter build web after a --web-content-hash build leaves build/web without index.html #196452
a: buildBuilding flutter applications with the toolfound in release: 3.50Found to occur in 3.50has reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-webWeb applications specificallyteam-webOwned by Web platform teamtoolAffects the "flutter" command-line tool. See also t: labels.
flutter create --platforms=web hash_demo && cd hash_demo
flutter build web --web-content-hash
flutter build web
ls build/web/index.html
Expected results
build/web/index.html exists after every successful flutter build web.
Actual results
ls: build/web/index.html: No such file or directory. The build reports success (✓ Built build/web). Running flutter build web a second time restores index.html. Building with --web-content-hash after a plain build is fine.
flutter build web -v on the second build shows:
web_templated_files: Starting due to {InvalidatedReasonKind.buildKeyChanged ...}
web_templated_files: Complete
web_release_bundle: Starting due to {InvalidatedReasonKind.outputSetRemoval: The following outputs were removed from the output set: .../build/web/main.dart.276ca6e0.js, .../build/web/index.html, .../build/web/flutter_bootstrap.js, ...}
Likely cause
In packages/flutter_tools/lib/src/build_system/targets/web.dart, WebReleaseBundle.outputs includes {OUTPUT_DIR}/index.html and {OUTPUT_DIR}/flutter_bootstrap.js only when _hasWebContentHash. On the next plain build those paths leave the target's output set, so the build system deletes them as stale outputs, after WebTemplatedFiles (a dependency of WebReleaseBundle) has already written the new index.html. The same structure is on master today.
Why it matters
Someone trying the new flag locally and then deploying a plain build from their machine ships a site without index.html.
a: buildBuilding flutter applications with the toolfound in release: 3.50Found to occur in 3.50has reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-webWeb applications specificallyteam-webOwned by Web platform teamtoolAffects the "flutter" command-line tool. See also t: labels.
Activity
mbcorona commentedon Nov 12, 2026
Thanks for the report and the analysis @debasmitasarkar.
Routing to the web team.
kevmoo commentedon Nov 12, 2026
Looking into this NOW!
Audit stale precache_manifest.json and add S16 flag-toggle regressions (
kevmoo commentedon Nov 13, 2026
Pr out now: #196491
@debasmitasarkar – if you're able/willing to sync down a branch and verify locally, I'd appreciate it!
FWIW: I also uncovered a few other problems that I was able to clean up. Thanks again!
fix(path,patterns): clarify symlink resolution and filename patterns (#…
[flutter_tools] Preserve index.html across --web-content-hash transit…
[stable] [flutter_tools] Preserve index.html after --web-content-hash (…
[stable] [flutter_tools] Preserve index.html after --web-content-hash…