Closed chessasuke closed 3 years ago
Hi @chessasuke
I wasn't able to reproduce this issue, worked just fine on release, profile, and debug. You should probably upgrade to the latest stable 2.2.2
.
That being said this issue looks like it's more suited for https://github.com/flutter/flutter/issues anyway
Thank you
It still gives errors after the upgrade. I opened an issue in the flutter repository too though not sure where it should be. If I don't add the firebase libraries it works ok, so it seems like some conflict with that script for PWA.
How exactly have you added the firebase libraries? Have you carefully followed https://firebase.flutter.dev/docs/installation/web?
yes, this is the first time it gives errors and the error disappears if I comment out that default script.
This is the body part of the index file:
<body>
<!-- This script installs service_worker.js to provide PWA functionality to
application. For more information, see:
https://developers.google.com/web/fundamentals/primers/service-workers -->
<script>
<!-- THE DEFAULT SCRIPT CAUSING ISSUES HERE -->
</script>
<script src="https://www.gstatic.com/firebasejs/8.6.5/firebase-app.js"></script>
<script src="https://www.gstatic.com/firebasejs/8.6.5/firebase-analytics.js"></script>
<script>
// My Firebase configuration here
var firebaseConfig = {
...
};
// Initialize Firebase
firebase.initializeApp(firebaseConfig);
firebase.analytics();
</script>
<script src="main.dart.js" type="application/javascript"></script>
</body>
Well I can't reproduce this with the official example and your stacktrace only contains canvaskit drawing stack lines so I think it's safe to leave it open in the flutter repository rather than here.
Bug report
Describe the bug The script to provide PWA functionality causes errors on profile/release mode when using canvaskit.
The default script when creating a new project
Errors:
Flutter doctor
Run
flutter doctor
and paste the output below:Click To Expand
``` Doctor summary (to see all details, run flutter doctor -v): [√] Flutter (Channel stable, 2.2.1, on Microsoft Windows [Version 10.0.19042.1052], locale es-ES) [√] Android toolchain - develop for Android devices (Android SDK version 30.0.3) [√] Chrome - develop for the web [√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.7.5) [√] Android Studio (version 3.6) [√] IntelliJ IDEA Community Edition (version 2019.2) [√] VS Code (version 1.55.2) [√] Connected device (3 available) • No issues found! ```