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
Commit b15326d
Browse filesBrowse the repository at this point in the historyBrowse files
[flutter_tools] Pause web server requests until initial compilation finishes
When launching an application using `flutter run -d web-server`, the HTTP server begins listening as soon as `WebDevFS.create()` starts `WebAssetServer`. However, the application compilation in `_updateDevFS()` has not yet completed.
If a client requests the page before compilation finishes, DWDS attempts to read module metadata while `_webMemoryFS.mergedMetadata` is still null. DWDS then injects an empty module list into the bootstrap script and permanently memoizes that 0 modules exist, causing the page to only load `dart_sdk.js` and hang on a blank white screen. Additionally, if the client connects to DWDS before `webDevFS.connect()` starts listening, the `connectedApps` broadcast event is dropped.
This adds a readiness completer to `WebAssetServer` and a Shelf middleware to pause incoming requests until initial compilation completes and the DWDS connection listener is attached.
Fixesflutter#191957
0 commit comments