Skip to content

[web] Cannot use renderer run-time configuration in new load API. #147610

@ditman

Description

@ditman

Steps to reproduce

  1. Create a demo Flutter app using the latest bootstrap, using the following flutter_bootstrap.js
    {{flutter_js}}
    {{flutter_build_config}}
    
    _flutter.loader.load({
      config: {
        renderer: 'canvaskit',
      },
    });
  2. Attempt to flutter run
  3. Observe the following error in the browser:
    Uncaught (in promise) FlutterLoader could not find a build compatible with configuration and environment.
    

Expected results

I'd expect the app to run.

Actual results

It seems that when not specifying a --web-renderer in the command-line, the flutter_build_config variable does not populate information for the html or canvaskit renderers, only auto; making the renderer run-time JS Parameter useless.

Code sample

(Included above)

Screenshots or Video

N/A

Logs

N/A

Flutter Doctor output

This reproduces in the latest master, and probably has always reproduced since we introduced the new load API.

Metadata

Metadata

Labels

e: flutter.jsIssues with Flutter web custom initialization through JS APIsplatform-webWeb applications specificallytoolAffects the "flutter" command-line tool. See also t: labels.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions