I have a Flutter web build (Flutter 3.x, flutter_soloud package) hosted on itch.io as an HTML5 embed. Audio never initializes console shows this repeating on every retry:
AudioService: SoLoud engine init FAILED (Null check operator used on a null value) — audio stays unavailable until a later attempt succeeds. AudioService: unlock failed (Null check operator used on a null value).
Details:
- I've already enabled itch.io's "SharedArrayBuffer support" embed option (COOP/COEP), and the error persists identically.
flutter_soloud's web backend spins up a separateworker.dart.jsWeb Worker to run the miniaudio/WASM engine off the main thread.- Build is otherwise fine —
base href="./", all assets/canvaskit/plugin files load with no 404s, the rest of the app runs normally. - The failure is a Dart null-check-operator exception (
!on a null value), not a raw JS error, meaning some Dart-side code expects a non-null result from a JS-interop call into the plugin/engine bring-up and isn't getting one.
Questions:
- Given SharedArrayBuffer support is confirmed enabled on itch's embed settings, is
crossOriginIsolatedactuallytrueat runtime inside itch's iframe? (i.e., does itch's COOP/COEP option propagate correctly to nested iframes, or only to the top-level frame?) - Does
flutter_soloud's web Worker (worker.dart.js) require anything else — e.g.Worker({type: "module"}), a same-origin script URL, or aCross-Origin-Resource-Policyheader — that itch's static file hosting might not be setting even with SharedArrayBuffer support on? - Is there a way to build/configure
flutter_soloudfor web in a single-threaded / no-Worker mode, to sidestep cross-origin-isolation requirements entirely for constrained embed hosts like itch? - Is there a known minimum browser/flutter_soloud version combination where this specific null-check failure during
SoLoud.init()is a known bug (as opposed to an environment/hosting issue)?
Happy to share the full console log, network tab, or flutter_soloud version if useful.



