Skip to content
Advertisement

Tag: firebase

firebase query at same values

I have a query: Which returns all the users with all their highscores in descending order. The problem is that there are users who got the same high scores, and now they are ordered I think randomly. So for example, if 3 users get 3000 score it just randomly orders those 3. How can I for example look at another

React native firebase handling payment flow

I am integrating payment api, I’m using firebase cloud functions as my backend and react-native in frontend, so right now i have the following code: In react-native side: firebase function to handle payment: So the question is, how can I handle long-time response/timeout error/network-loss etc in react-native side, like how should I make it more robust? especially handling long-time responses,

Firebase Firestore returns [object Object] instead of instead of a plain object

I have a custom hook called useDocument.js below which fetches the data from a firestore collection via a specific ID. Why is it that it’s returning [object Object] instead of plain object. I’ve tried accessing the name property and logging it to the console using document.name but throws up an error: Uncaught TypeError: Cannot read properties of null (reading ‘name’)

Node js Engine not upgrading for firebase function node compatibility

First failed Here is the package.json Error: package.json in functions directory has an engines field which is unsupported. Valid choices are: {“node”: 10|12|14|16} Deploys to runtimes below Node.js 10 are now disabled in the Firebase CLI. Existing Node.js 8 functions will stop executing at a future date. Update existing functions to Node.js 10 or greater as soon as possible. I

JS Firebase Database Error db.ref is not a function

Hi I am trying to implement firebase realtime database API in my website, I am following this documentation: https://firebase.google.com/docs/database/admin/save-data#node.js but I get this error: this is my code: What am I doing wrong? Could the version I am using be incorrect? Answer You’re mixing the new modular/v9 syntax of the API with the older namespaced syntax, and that won’t work.

Advertisement