[Bug in Web] Rejecting promise with error
Is there an existing issue for this?
- [X] I have searched the existing issues
Flutter Quill version
9.3.19
Steps to reproduce
- Add the following to pubsec.yaml flutter_quill: 9.3.19 flutter_quill_extensions: 9.3.19
- Run the main.dart in Web platform
Expected results
The app build success.
Actual results
I am using the flutter_quill and flutter_quill_extensions in our project. It can't be biuld in Web platform. The error:[Rejecting promise with error: TypeError: Cannot set properties of undefined (setting 'nativeCommunication')]
The web page is totally white and show nothing.
We have both tested in Flutter 3.19.5 and 3.22.1.
Code sample
Code sample
flutter_quill: 9.3.19
flutter_quill_extensions: 9.3.19
Screenshots or Video
Screenshots / Video demonstration
[Upload media here]
Logs
Logs
[Paste your logs here]
I too get this error - Rejecting promise with error: TypeError: Cannot set properties of undefined (setting 'nativeCommunication') I am using flutter_quill 9.3.18 in web. Any help is much appreciated.
Attached is the error screen shot:
I have found the solution, may be you can try. just add the following code to the [your project path]\web\index.html
remenber to add it to the top of all
Solution founded
Hi
Do you know if this bug has been fixed in the latest versions of flutter_quill? It would be helpful to know if adding this script is still necessary or if the updates have resolved the issue.
Thank you.
It's a requirement of flutter_inappwebview which included by youtube_player_flutter
Which is needed by flutter_quill_extensions and documented in Platform Specific Configurations
That's why I suggested to discount the support of YouTube video support in #2276. Instead should be possible to implement in the user project without changes directly in this repo.
Loading YouTube videos directly by download URLs without using their iframe is against their terms of service (see #1916), loading iframe requires webview, and webview is not natively supported on Flutter and require platform plugin, having webview in the editor as an embed widget caused many issues and bugs even when not interacting with YouTube Video.
To configure flutter_inappwebview for web, see their Installation section
Thank you very much for your response.
You're welcome, I'm looking for your feedback about whether you prefer to not have YouTube support built-in as part of flutter_quill_extensions at the price of flexibility and avoid many issues for both the user and developer. See #2284
For anyone facing this issue, refer to flutter_inappwebview installation section for web instructions.
I did reopen this issue as it should not be a requirement of flutter_quill_extensions and should only require platform-specific configuration when needed.
We're requiring users for additional configuration for the web when we're not using flutter_inappwebview for web support. Missing the configuration setup doesn't give a clear error message.