-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Closed
Closed
Copy link
Labels
platform: webIssues / PRs which are specifically for web.Issues / PRs which are specifically for web.plugin: coreplugin: messagingresolution: userThis was a user issue, e.g. invalid configuration or code.This was a user issue, e.g. invalid configuration or code.type: documentationImprovements or additions to documentationImprovements or additions to documentation
Description
Bug report
Describe the bug
To comply with GDPR we are not allowed to load any scripts from a third party domain such as *.gstatic.com. Because in this case, the IP address of the user which is deemed personal information is handed over to a third party without the users consent.
Because of this, I wanted to use flutterfire_ignore_scripts as described in the setup docs.
I downloaded the js files and added them to my web/index.html.
<script src="./vendor/firebase-app.js"></script>
<script src="./vendor/firebase-messaging.js"></script>I also added the following line before flutter gets loaded.
window.flutterfire_ignore_scripts = ["core", "messaging"];Now I get an error in the console stating firebase_core is not defined
Steps to reproduce
Steps to reproduce the behavior:
- Add firebase + firebase messaging to the project
- download the
firebase-app.jsandfirebase-messaging.jsscripts and add them manually toweb/index.html - Add the
window.flutterfire_ignore_scriptsline to the file as well - Build and open the web app. Check the console to see the error
Expected behavior
firebase_core should be defined when manually including the scripts.
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, 3.13.5, on macOS 14.2.1 23C71 darwin-x64, locale en-DE)
! Warning: `dart` on your path resolves to /usr/local/Cellar/dart/3.0.4/libexec/bin/dart, which is not inside your current Flutter SDK checkout at /Users/woelkmax/fvm/versions/3.13.5. Consider adding /Users/woelkmax/fvm/versions/3.13.5/bin to the front of your path.
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 15.2)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.3)
[✓] VS Code (version 1.85.1)
[✓] Connected device (4 available)
[✓] Network resources
! Doctor found issues in 1 category.
promych
Metadata
Metadata
Assignees
Labels
platform: webIssues / PRs which are specifically for web.Issues / PRs which are specifically for web.plugin: coreplugin: messagingresolution: userThis was a user issue, e.g. invalid configuration or code.This was a user issue, e.g. invalid configuration or code.type: documentationImprovements or additions to documentationImprovements or additions to documentation