I am having issue whenever I catch an error and return from a function, by code after the catch block still runs. Here is my two functions that I use: I would greatly appreciate any help for this problem, as I have been struggling with it for over 2 days now and can’t seem to find a solution. Answer In
Tag: google-cloud-firestore
How to find a user from firebase by username?
so I wrote a method to look through all the users in my firebase firestore database in react native and it looks like this: My data is listed by the user id, and one of the direct document fields is username. As you may tell, looking through every single one of the documents to find a matching username is very
react native & firestore – return vs console.log
I run into a little problem regarding firebase and probably something regarding async functions, Im still new to react-native and js, so I fail to resolve this error on my own. I have following code snipped: The firestore call and my database is alright, but the problem is within return and console.log() itself. The console.log() inside my function works perfectly
Data rendered on the screen but has error on the console (Firebase with Vue): Uncaught (in promise) TypeError: Cannot read property ‘contents’ of null
I’m trying to get lesson.contents to render on the screen but I have some errors on the console. Here is the code (I’m using Firebase with Vue 3) Then I have this error: What I’m confused is that I’m still able to render lesson.contents on the screen: I’ve been trying a few hours trying to fix it but I could
sendGrid + firebase cloud functions: Email is not sending with Callable functions
I’m new to javascript and I’m trying to send email with the firebase callable functions. the idea is to send code to user email from a cloud function when called from the iOS app. But the thing is, functions can be deployed but I’m not sure what is wrong with my code as it is not sending the email. I
How to declare a variable from a firestore query?
this piece of code works when I press save in visual studio code. But If I refresh the preview page in the browser it shows me this error: Unhandled Rejection (FirebaseError): Function Query.where() called with invalid data. Unsupported field value: undefined I think that the problem is that I’m trying to declare the variable “showUrl” in the wrong way. The
Using firebase authentication and firestore to add user
Im trying to use user to the authentication of firebase and also firestore. Whhen I click on Save, the function SavePress is activated. The first time I click on this button, the user is added to firebase authentication but user is equal to null. Only at the second time it’s work. If anyone can help me.. Here is my code
I can`t read the data after I update my rules on firestore (React Native)
the rules I set is allow read: if resource.data.uid == request.auth.uid; how I call it is like this How can i fix it? firebase rule image for the data https://1drv.ms/u/s!Ag7uBMx2FuEijuILje2xJIv8RawcFA?e=Gy6jeC Answer Rules don’t filter data on their own. Instead they merely ensure that the data that is being requested matches your rules. So your query needs to match the rules,
FIREBASE getting document data
I’m making an app and trying to get product data by it’s id inside a modal in ionic 4. I’m using typescript to do it but without luck. Because de calls to firebase are asynchronous i cannot get the data that is held in firebase and also because i’m new to subject i cannot figured out the proper way to
Firestore: Conditional query not executed
This logs the snapshot: This doesn’t: Does anyone know why? Answer Since you are combining the ‘>=’ and ‘==’ operators, Firestore needs to build an index for this query. If you catch the error with a try/catch block, you will see the corresponding error, and, even better, the error message includes a direct link to create the missing index in