I am doing a project in React, where after I type a value and then click on search button, the app searches if the id exists in the database. If so, it displays the result of the search in the same page. I am having trouble assigning the value of the search and then displaying it. When I try to
Tag: google-cloud-firestore
Undefined from promise using .then() JavaScript
I am trying to get data from Firestore using multiple queries, but the returned data is always undefined, even though console.log(data) in .then() block shows the data exist. Answer You have to return the promise in your function getPeers(): EDIT: A little advice when handling errors in async functions, in your code you have the catch() handler with a console.log:
Query documents in firestore from an array of ID’s
I was wondering how I can query documents from a firestore collection from an array of ID’s? I only want the documents in the collection that are in the array of ID’s. I looked at another answer and think my approach is correct, however, I am getting an error. The error happens because the function is not finding any documents
Firebase Cloud Function finished with status: ‘response error’
I have a cloud function that is returning a lot of data (50’000 documents) as objects. When I run it I get the error finished with status: ‘response error’. This only happens when I export all of the data, when a limit (up to 20’000) is applied it works without problem. This lets me think that the response might be
React Native Firestore remove object in array
I cannot delete object inside my array of object in a document from Firestore. Here my Document I have tried that } Here the error msg: Someone can help me ? Or do you have any ideas how can i do for delete and update a object inside an array ? EDIT: Is fix, it was bad formating of JS
Firestore denying permission to create/push collection
I am new to firebase / firestore and am trying to create a new collection upon login and authenticating a user, on client side and using React. I read a few other articles here and I set the db rules to true for both read and write, but yet, I keep getting an error on the Firestore db, while it
How to get users document id in Firestore using Javascript?
how to get only the last document id in Firestore? i tried the result i’m getting wrong id thats not in the orders document!! This is my documents : Answer You are running db.collection(‘users’).doc(user.uid).collection(‘orders’).doc() twice which creates 2 different DocumentReferences and hence they are different. If you are trying to get the document that you just added try this:
Firebase 9(modular sdk web ) replacement for fieldPath
I am using the below code with the Firebase SDK 8. I want to replace it code with the modular SDK. So I have written, But somehow I could not find the syntax to get the FieldPath. From the reference, I can read that, which is imported with But when I am using it, it results in an error. Does
Uncaught Error in snapshot listener: FirebaseError: no matching index found
I’m getting the above error when running the following query. I’ve not seen it before, can’t find any documentation about it, and I’m not doing anything unusual or anything I’ve not done before. Can anyone shed any light on it, please? It is a ‘new’ query in that I’ve just added it to the code, so I might expect the
Delete user using firebase Admin SDK
How do I delete a user from my admin panel using the firebase Admin SDK? I’m getting this error when trying to delete it: Uncaught (in promise) ReferenceError: uid is not defined at eval (ManageCustomer.vue?b113:262) What am I doing wrong? This is my code in index.js from functions Here is my client side code Answer You are not accessing the