Why do I have the error that it says invalid API keys? This is the sample .env.local In another file: This is the error: The Package.json: Answer Make sure your .env.local is placed in the root directory, and not in any subfolders like src or public. Other than that, nothing seems to be wrong with your code. Just to be
Tag: google-cloud-firestore
How to use VueUse useFirestore() with a Where QueryConstraint?
I have a Firestore users doc that looks something like this: And a Firestore websites doc that looks something like this: Now I’m trying to use the VueUse useFirestore() wrapper to display the websites doc. To do that I am referencing the currentCompanyId property of the users doc inside a where Query Constraint like so: Hard-coding the companyId value of
Admin SDK Transaction behavior on Realtime Database
I have been using Admin SDK Transaction on Firestore for a while, I know Firestore locks documents during transaction. But I am not sure it works as same as on Realtime Database because offical document keep bring me to the client side API page, Or just because it’s no difference between client sdk and admin sdk on realtime database. Answer
How do I add multiple documents in firebase 9 with javascript?
Their documentation only shows how to set multiple documents with batch, but I need to add new docs and doing it one by one with a loop seems like a bad solution Answer You can add a document using Batched Writes by creating a DocumentReference first as shown below: If you don’t want to use Batched Writes and use a
How to enable multi-tab synchronization for Firebase Web Version 9 (modular)?
I am using Firebase JavaScript Modular Web Version 9 SDK. And I have enabled offline persistence as per these docs using this: enableIndexedDbPersistence(db). Now I want to keep data synced between multiple open browser tabs. I thought I could do that in the PersistenceSettings object like this: enableIndexedDbPersistence(db, { synchronizeTabs: true }). But it turns out that synchronizeTabs property does
How To Render Data From Firebase Without Page Refresh
I’m creating a simple note taking app. The functionality I need is the ability to make a new LABEL, and then inside that label create a TITLE, with TAGS(notes) associated to that title. Right now I have it all working nicely, except when I submit the new label, and/or new title/tags, I need to refresh to see the newly added
Flutter/Firestore : How do I display data from doc in a ListTile?
I am new to Flutter/Firebase/Firestore etc.. so I am struggling a bit. I want to grab the data from the documents in my ‘users’ collection in Firestore and display it in my account information page. I have spent hours messing around with this and I am stuck. If anybody could help me out that would be wonderful! Here are some
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
FirebaseError: Missing or insufficient permissions. with getDocs()
I tried reading the first couple of answers but none seem to have the same rule with the one I currently have my hands on. When I try to call the getDocs() function (using react) I seem to be getting the error FirebaseError: Missing or insufficient permissions. what can I do to not get this error? Below is the rule
map method not running
I have an array, I push doc data from firebase into that array and I want to display a table row for each doc. The problem is that the map method won’t do anything. Answer First of all, you need to update the state by setAllScores