Skip to content

FlutterLoader could not find a build compatible with configuration and environment (wasm + canvaskit) #183265

Description

@lig
  1. Follow instructions at https://docs.flutter.dev/platform-integration/web/renderers#choosing-a-renderer-at-runtime to force "canvaskit" renderer.
      _flutter.loader.load({
        config: {
          renderer: "canvaskit",
        },
      });
  1. 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

❯ 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

Metadata

Metadata

Assignees

Labels

Bot is counting down the days until it unassigns the issued: docs/flutter/flutter/docs, for contributors

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions