devtools
devtools copied to clipboard
Embedded DevTools views fail to load in VS code with WASM enabled
This is not consistently reproducible, but happens occasionally.
Repro steps (that may work):
- Switch to the latest flutter main channel
- Open DevTools to turn on the experimental wasm setting. Run
dart devtools, open the settings menu, and enable wasm. This setting will persist for you. - Close DevTools.
- Open a Flutter project in VS code (ensure you have the latest VS code)
- Open the Flutter VS code Sidebar
flutter_bootstrap.js:121 Attempting to load DevTools with skwasm renderer.
skwasm.js:33 Uncaught (in promise) DataCloneError: Failed to execute 'postMessage' on 'Worker': SharedArrayBuffer transfer requires self.crossOriginIsolated.
at skwasm.js:33:213
at new Promise (<anonymous>)
at Xe (skwasm.js:32:11)
at Array.map (<anonymous>)
at hf (skwasm.js:33:290)
at skwasm.js:30:360
at skwasm.js:34:25
at Array.forEach (<anonymous>)
at nf (skwasm.js:34:14)
at zg (skwasm.js:148:184)
@eyebrowsoffire @biggs0125 @DanTup
Looks like VS Code may not be ready for Skwasm's multi-threaded mode? (cross origin isolation is behind a flag --enable-coi).
That said, after https://github.com/flutter/flutter/pull/164748, Skwasm should switch dynamically to single-threaded mode in situations like this. When was the last time you got this error?
cc @eyebrowsoffire to correct me if I'm wrong or if he wants to add something.
@elliette to investigate if these are still happening
I have not encountered this since earlier this year, therefore closing. Will re-open if it happens again.