Closed Ahmadre closed 4 years ago
Hi. Did you ever find a fix? I've had the same bug for a long time now...
@josephmalisov actual not, I never found the reason or solution. Somehow one day it worked like magic 😂
@Ahmadre this got rid of the error for me:
firebase script MUST be the following (VERSION 7.5)
<script src="https://www.gstatic.com/firebasejs/7.5.0/firebase-app.js"></script>
@Ahmadre this got rid of the error for me: firebase script MUST be the following (VERSION 7.5)
<script src="https://www.gstatic.com/firebasejs/7.5.0/firebase-app.js"></script>
it worked for me! if you copied from firebase config tutorialit says 7.17.1... with 7.5.0 it worked. thanks!!
I have version 7.5.0 but it is still giving me the same error
I used cloud_firestore: ^0.14.0+2 and script
and it work
I used cloud_firestore: ^0.14.0+2 and script
and it work
Worked like a charm, thanks dude
if you use firebase_auth: ^0.18.0+1
, you should use src="https://www.gstatic.com/firebasejs/7.14.4/firebase-firestore.js"></script>
too.
TypeError: dart.global.firebase.firestore is not a function
at Object.firestore$ [as firestore] (http://localhost:55823/packages/firebase/src/top_level.dart.lib.js:94:55)
at new cloud_firestore_web.FirebaseFirestoreWeb.new (http://localhost:55823/packages/cloud_firestore_web/src/write_batch_web.dart.lib.js:753:37)
at Function.registerWith (http://localhost:55823/packages/cloud_firestore_web/src/write_batch_web.dart.lib.js:669:73)
at Object.registerPlugins (http://localhost:55823/packages/noted/generated_plugin_registrant.dart.lib.js:19:46)
at main (http://localhost:55823/web_entrypoint.dart.lib.js:29:35)
at main.next (
If you're using a Firebase Hosting Reserved URL (the one that starts with a __
), it won't work unless you also start up the Firebase Hosting Emulator. This conflicts with flutter run
though, so I suggest using the CDN link (the one that starts with gstatic
).
Same problem.. solved by carefully following instructions here: https://firebase.flutter.dev/docs/firestore/overview
hello, I am using everything but it shows me an error.
`Launching lib\main.dart on Chrome in debug mode... Waiting for connection from debug service on Chrome... Debug service listening on ws://127.0.0.1:57017/9pY4IO1vQUg=/ws
Running with unsound null safety
For more information see https://dart.dev/null-safety/unsound-null-safety
Debug service listening on ws://127.0.0.1:57017/9pY4IO1vQUg=/ws
TypeError: dart.global.firebase.firestore is not a function
at Object.getFirestoreInstance (http://localhost:56918/packages/cloud_firestore_web/src/interop/utils/utils.dart.lib.js:998:79)
at new cloud_firestore_web.FirebaseFirestoreWeb.new (http://localhost:56918/packages/cloud_firestore_web/src/write_batch_web.dart.lib.js:864:37)
at Function.registerWith (http://localhost:56918/packages/cloud_firestore_web/src/write_batch_web.dart.lib.js:746:73)
at Object.registerPlugins (http://localhost:56918/packages/flutter_appfirebase/generated_plugin_registrant.dart.lib.js:14:46)
at main (http://localhost:56918/web_entrypoint.dart.lib.js:30:35)
at main.next (
`<!DOCTYPE html>
Can you show us your index.html
and your pubspec.yaml
?
Because this issue is based on firebase-dart, here's the referenced issue: https://github.com/FirebaseExtended/flutterfire/issues/2805
If someone can help, I would be really thankful. I can't use firebase anymore for Flutter Web since this error.
tried several workaround, git threads, stackoverflow....