Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 2 years ago. Improve this question I’m working on Javascript and here’s how’s my data looks like. I want the functionality where after every 24 hours,
Tag: firebase
How to get FCM token?
I am trying to get FCM token in react js application. First thing i tried is to use messaging.useServiceWorker(registration) then use messaging.getToken() and it’s working fine on localhost for firefox and google chrome, but on an HTTPS live server it works fine on firefox but in chrome it throws an error: DOMException: Failed to execute ‘subscribe’ on ‘PushManager’: Subscription failed
Firebase Functions cannot get request values sent from a simple contact form in Angular9
I am developing a simple contact form by using Angular9 + Firebase. I have no idea how to get the values from the contact form in the Firebase Function. I tried it in many ways, but I always get the “undefined” value. The following is my code. Please give me the solution if anybody knows how to do. Thank you.
How to delete all files in a firebase storage directory
I have a firebase storage path that looks like this. firebase.storage().ref(‘temp/test’) the “test” folder has about 25-50 files. I know there is not a way to delete the whole directory in firebase but Is there a way to iterate through all the files in a directory and deleting them one by one? Answer Is there a way to iterate through
can I get some documents from firestore simultaneously using Promise.all?
I want to get some documents from Firestore. in my callable cloud function, instead of waiting getting document one by one, await one by one, I use Promise.all so I can get all documents faster, like this and then I want to loop the document snapshots I just get, and here is the problem I have an error TypeError: Cannot
Method for coverting all Firestore Timestamps in a snapshot to JS dates?
How would you write a method to convert all Firestore Timestamps in a snapshot to JavaScript Dates? For example, a snapshot from a posts collection might return a couple Firestore Timestamps (createdDtTm, modifyDtTm): Converting the individual dates is simple enough by mapping over the array and using the toDate() method for each Timestamp (e.g., createDtTm.toDate()) But what is a more
How to update a value in multiples collections at once in firestore?
I’m building a forum appin Vue, basically a clone of this same site… The user can post questions, get answers to those questions and comments to those answers. I have a top level collection for questions, answers and comments respectively, and each document in those collections have a field called photoURL where I store the url of the profile image
Firebase not working on script but on main html it does (Javascript)
after pasting the given data of my database, doing retrieves correctly the data and its shown as i want, but making a function on a index.js gives me this error Uncaught ReferenceError: data is not defined at extend (index.js:59) at index.js:61 I dont get why it would work outside the function and not inside, given that window.db is a global
How to push to a child node while updating values in the parent node Firebase RealTime
I am trying to update the values in the parent node of a firebase realtime db while simultaneously pushing data to a child node, however I get the error “Reference.update failed: First argument contains a path /xyz that is ancestor of another path /xyz/…/…” And my data is structured as so: Answer Your updates contains these two keys: It helps
Not able to retrieve data from firebase firestore
I am saving data to firebase successfully But when i try to retrieve it firestore sends “No such document”. Trying to get the array of objects. Here is the db Edit: I found out that in order to access all documents you have to do it this way. It goes into the then block but then querySnapshot.forEach doesnt run Answer