FlutterLoader could not find a build compatible with configuration and environment (wasm + canvaskit)
- Dominant language
- Dart
- Stars
- 179k
- Forks
- 31.1k
- PR merge metrics
- PR metrics pending
Description
1. Follow instructions at https://docs.flutter.dev/platform-integration/web/renderers#choosing-a-renderer-at-runtime to force "canvaskit" renderer.
```js
_flutter.loader.load({
config: {
renderer: "canvaskit",
},
});
```
2. Run `flutter run -d chrome --wasm`
Expected: flutter app runs in Chrome
Actual: chrome opens with an error in console
```
flutter_bootstrap.js Uncaught (in promise) FlutterLoader could not find a build compatible with configuration and environment.
```
The app runs correctly without `renderer: "canvaskit"` in the config and uses "skwasm" renderer.
The app runs correctly with `renderer: "skwasm"` in the config.
Building the app with `flutter build web --wasm` and running in Chrome with `renderer: "canvaskit"` results in js build being used.
Expected result is to be able to run a `wasm` build with the `canvaskit` renderer as it appears it should be possible according to the documentation at https://docs.flutter.dev/platform-integration/web/renderers
```shell
❯ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.41.3, on Fedora Linux 43 (Workstation Edition)
6.18.13-200.fc43.x86_64, locale en_US.UTF-8)
[✓] Android toolchain - develop for Android devices (Android SDK version 36.1.0)
[✓] Chrome - develop for the web
[✓] Linux toolchain - develop for Linux desktop
[✓] Connected device (2 available)
[✓] Network resources
```
Contributor guide
Assessment
This issue has not been assessed yet.