Giter VIP home page Giter VIP logo

Comments (5)

robert-virkus avatar robert-virkus commented on July 24, 2024 1

I hope the following helps:
Running a Flutter web app with the new bootstrap.js integration will crash when the --web-renderer canvaskit parameter is given in flutter run.

Steps to reproduce:

  1. Create a new project, e.g. flutter create --platforms web webrenderer
  2. cd webrenderer
  3. flutter run --web-renderer canvaskit

Expected result:
App is starting

Actual result:
App is crashing with the following error message:

This app is linked to the debug service: ws://127.0.0.1:64447/frDF0VtIu9g=/ws
dom.dart:195 Rejecting promise with error: TypeError: Cannot read properties of undefined (reading 'registerPlugins')
DomConsoleExtension$124warn @ dom.dart:195
[...]
didCreateEngineInitializer @ flutter_bootstrap.js:1
[...]
Function_apply @ client.js:5963
_callDartFunctionFast @ client.js:8360
(anonymous) @ client.js:8351
localhost/:1 Uncaught (in promise) null

js_primitives.dart:28 A message on the flutter/lifecycle channel was discarded before it could be handled.
This happens when a plugin sends messages to the framework side before the framework has had an opportunity to register a listener. See the ChannelBuffers API documentation for details on how to configure the channel to expect more messages, or to expect messages to get discarded:
https://api.flutter.dev/flutter/dart-ui/ChannelBuffers-class.html

Workaround:
Call flutter run without the --web-renderer parameter.

Affected Flutter versions: 3.22.0 and 3.22.1, tested on Windows with Chrome 125

from flutter.

darshankawar avatar darshankawar commented on July 24, 2024

@RMotive
I created new flutter project targeting web platform using latest stable version with which the app compiled and run properly without getting stuck, as shown below:

Screenshot 2024-06-03 at 4 31 21 PM

What flutter version are you on and can you provide the command or steps taken to create flutter app ?
Also, if you run the command in verbose mode ( -v), does it show any meaningful log that shows app stuck ?

from flutter.

RMotive avatar RMotive commented on July 24, 2024

@darshankawar this only happens when i set the renderer as canvaskit, i tried with HTML and it worked but when i use canvaskit it got stuck.

This is where i change the renderer:
image

Flutter doctor:
image

And this is the CML that i used to generate the example application:

flutter create -e --platforms web canvaskit_issues.

then i tried to run it using VSCode debugger (maybe it is relevant to the diagnosis).

PD: I tried again at the moment this reply was wrote and still happening.

from flutter.

darshankawar avatar darshankawar commented on July 24, 2024

And this is the CML that i used to generate the example application:

flutter create -e --platforms web canvaskit_issues.

then i tried to run it using VSCode debugger (maybe it is relevant to the diagnosis).

Thanks for the report. I'll keep the issue open for team's attention / tracking.

from flutter.

cgzdevelopments avatar cgzdevelopments commented on July 24, 2024

Hi, I'm having the same problem with Flutter V3.22.1, using flutter run -d web-server --web-renderer canvaskit.

The app compiles so it shows the normal message "press R to hot reload", but it only shows a blank screen and throws some exceptions on browser's console when I try to open it (Safari and Edge on MacOS). It was working just fine with Flutter V3.19.4.

Sorry for my bad English..

from flutter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.