Find orphaned subcollection documents

The firestore docs say: When you delete a document that has associated subcollections, the subcollections are not deleted. They are still accessible by reference. For example, there may be a...

Firestore Token retrieval failed: INVALID_SENDER

I am not receiving any callback from interfaces such as addOnSuccessListener, addOnFailureListener,addOnCompleteListener. Dependencies: classpath 'com.google.gms:google-services:3.2.1' ...

Check if string already exists in a field in cloudfirestore field and flutter

I have a collection called IDS in cloudfirestore, inside it, there is a document called IDs,inside this document I have fields starting with ID1 to reach almost ID14000,The user enters his id...

How to check a collection exists or not in firestore?

How can I check if a collection exists or not in firestore? There is a method to check document exist. Such as: this.afs.doc('users/' + userId).ref.get().then((doc) => { if (doc.exists)...

Firebase Firestore Time Stamp (how to implement)

having an issue when trying to document the time of submission (so i can later filter by it) get submitted to firebase. Let me show what I have at the moment (in a working state) -- Currently, I...

whenComplete() method not working as expected - Flutter Async

In my Flutter app, I am trying to run some code after an async function is completed by using the whenComplete() method. The problem is the code in my whenComplete() method is getting executed...

How to filter a List in Dart

I'm getting my DocumentSnapshots from Firebase and I'm trying to delete the document where the user ID match but the userList is always returning the 4 records. List<DocumentSnapshot> userList =...

Email: [Firebase] Client access to your Cloud Firestore database expiring in X day(s)

I got an email that indicates I was developing in "test mode", but that it left my database completely open to the internet. The default rules I initially accepted look like this: rules_version =...

Convert DatetimeWithNanoseconds to date format in python firestore

I am trying to convert a firestore timestamp into milliseconds or a date format using python to perform a calculation using this date. Trying to parse it to date returns. TypeError: strptime()...

Why am I getting No Provider for a Service in Angular when i have specified the service as a provider in the Feature Module

I have a problem where my application giving an error: No Provider for Data Service. This typically happens when you have forgotten to list your service as a provider either in the app module or...

How to create unique image ID each time upload is pressed using Flutter/Firebase?

I'm trying to make an image upload button and link it to Firebase such that each time the button is pressed, the image is sent to Firebase Storage. Here are the relevant snippets of my code: //...

What's the best way to paginate and filters large set of data in Firebase?

I have a large Firestore collection with 10,000 documents. I want to show these documents in a table by paging and filtering the results at 25 at a time. My idea, to limit the "reads" (and...

How to navigate from Error dialog with flutter

I'm using Firebase with Flutter. After I retrieve documents as a contents list, I don't know how to handling screen. The code is in StreamBuilder. I would like to show dialog at first, and after...

Swift 5 Firestore: Checking if collection exists in database

I'm trying to check if a certain collection exists in my Firestore database, and here is my code for doing so: let db = Firestore.firestore() ...

Firebase Firestore is failing over wifi on physical device with error: Could not reach Cloud Firestore backend

When trying to get a document from Firestore, if the device is connected through Wifi the connection fails with the following error message: W/Firestore( 4903): (21.4.3) [OnlineStateTracker]:...

Firebase security rules cross project

Project A has Firebase Authentication and Project B has Firebase Firestore. Both Authentication and Firestore are working correctly using: https://firebase.google.com/docs/projects/multiprojects...

How to access a different collection within a firebase function

I promise i thoroughly checked through all the previous asked questions and there isn't anything similar to this. I have a firebase function that listens to onCreate on a firestore...

Firebase error: Function failed on loading user code (node.js)

I am a relative noob with Firebase my first time using it and following along with a tutorial. The tutorial is a bit outdated and I have been fixing bugs as I have been going, but this one has got...

Retrieving user email from Firebase in Flutter

In my AuthProvider class where I handle my sign in, sign, out authentications, I created 2 functions that returns a Future String like so Future<String> currentUser() async { FirebaseUser...

Flutter: Unhandled Exception: Bad state: field does not exist within the DocumentSnapshotPlatform

I am new to flutter and i am building a social media App through tutorial which i am now customizing. Now I tried to add more input fields to a users profile page then i started getting the...

databaseURL not found in firestore sdk snippet

I made a cloud firestore with Google Analytics enabled and I didn't find the databaseURL attribute in Firestore SDK snippet Here's the CDN: <script...

Error: 16 UNAUTHENTICATED: Failed to retrieve auth metadata with error: Could not refresh access token

The complete error is as follows: Unhandled error Error: 16 UNAUTHENTICATED: Failed to retrieve auth metadata with error: Could not refresh access token: Unsuccessful response status code. Request...

LateInitializationError: Field '[email protected]' has not been initialized

Getting this when trying to initialize data. The following LateError was thrown building UserProfile(dirty, state: _UserProfileState#752a9): LateInitializationError: Field '[email protected]'...

type '_JsonQuerySnapshot' is not a subtype of type 'Map<String, dynamic>' in type cast"

I have issues to display data from Firebase. Here is the code I used in my FutureBuilder. This is the error that I got "The following _CastError was thrown building...

Next.js dynamic routes with Firestore collection

I'm looking for a way to have a dynamic route that displays for every document in a Firestore collection using Server-side Rendering. For example, a document called foo would exist at test.com/foo...

How to unsubscribe from a Firestore stream using the Vue onInvalidate callback?

I am using Vue 3 to create a Firebase composable that subscribes to an onSnapshot() stream. And I am trying to unsunscribe from that stream by calling the returned unsubscribe() function inside...

Firestore/Firebase not working with Next.js

Hey y'all really struggling here. I am trying use firebase in my Next.js app, specifically for the api. It works fine when I build production locally, and on local development. But once I deploy...

Cannot import firebase into react.js project. "Module not found: Error: Package path . is not exported from package"

I am trying to implement firebase into my react.js project. For the sake of following instructions I am currently using firebase version 7.15.5 (at least I think because both my .json files say...

Firebase onSnapshot in react error, "Expected type 'bc', but it was: a custom he object"

I was following this tutorial https://www.sitepoint.com/reddit-clone-react-firebase/. Earlier it was really simple just call onSnapshot after the document is fetched, but here it is a separate...

Firebase v9 and Nuxt 2.15.8 - SyntaxError: Cannot use import statement outside a module

I'm migrating my codebase to use the firebase version 9 SDK and started to get this error once I started using v9 firestore. I've already migrated the auth part of my and that works perfectly. I...