Comments (5)
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:
- Create a new project, e.g.
flutter create --platforms web webrenderer
cd webrenderer
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.
@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](https://private-user-images.githubusercontent.com/67046386/336045959-2ff9e347-484f-4012-863a-c4c2d4f0e0e8.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTgxMjAxNzAsIm5iZiI6MTcxODExOTg3MCwicGF0aCI6Ii82NzA0NjM4Ni8zMzYwNDU5NTktMmZmOWUzNDctNDg0Zi00MDEyLTg2M2EtYzRjMmQ0ZjBlMGU4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjExVDE1MzExMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWQzZDZlMGEwNGNmNDgzZmIzZWQ1ODExYWQyMjZlMWRhMDQwNWRjMDk4YWRjMGM5YWFjNTBiNGYyODAzMmRmYjImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.UQYbNaHK7lXPrRwP1igfS6zWV9py5ZcQO0w4xnU4RVI)
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.
@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:
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.
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.
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)
- [Web] ScrollController throws unexpected null exception on web, when getting maxScrollExtent HOT 1
- "command 'flutter.createProject' not found" in VS Code after following Getting Started guide HOT 1
- instantiateImageCodecWithSize leaks buffer on web HOT 1
- Dialog closes when the user clicks in a text field that has a suffix icon with an onTap/onPressed method (Web only) HOT 2
- XCode Cloud MacOS build fails HOT 2
- Various Linux linux_web_engine Mac tests time out on macOS 14 HOT 3
- linux-35 lost external connection phone device. HOT 1
- [in_app_purchase_ios] Support for StoreKit 2 APIs HOT 1
- HapticFeedback: Support UINotificationFeedbackType.success/warning/error on iOS
- [ios] presence of a semantics action affects platform view positioning
- [image_picker_for_web] Wasm compatibility HOT 3
- Gesture issue after using popup when loading threejs page HOT 6
- Identical squares inside Stack widget does not perfectly overlap each other when dimensions are odd (Color bleeding?) HOT 2
- The codelab for Dart keeps going to step 9 in the flutter codelab HOT 4
- [MACOS] Backdrop filter causes flickering HOT 5
- [rfw] : TextStyle is ignored HOT 7
- [plugin][google_maps_flutter] open all info tiles from `mapController` HOT 1
- Plugin 'Dart' (version '232.10286') is not compatible with the current version of the IDE, because it requires build 232.* or older but the current build is AI-233.14808.21 Plugin 'Flutter' (version '78.2.2') is not compatible with the current version of the IDE, because it requires build 232.* or older but the current build is AI-233.14808.21 HOT 3
- TabBar overflow behaviour HOT 2
- Always serve DevTools from DDS HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flutter.