All Questions
Tagged with google-cloud-firestore javascript
8,392 questions
0
votes
1
answer
72
views
Firestore rule to allow users to pull only chats they are members of?
I have chat documents like the following:
{
members: ['abc','def'] // 2 element list of member UIDs
// some other chat metadata
}
In firestore, I have the following rules on my collection:
...
1
vote
0
answers
100
views
Error in firebase cloud functions document trigger using V2 functions: Failed to decode protobuf and create a before snapshot
I am migrating my Firebase Cloud Functions project from v1 to v2.
Since Auth triggers are not yet available in v2, I still have auth triggers in v1 — but all my Firestore triggers are now v2.
All of ...
1
vote
0
answers
249
views
Need help: "2 Unkown: Getting metadata from plugin failed with error: Could not refresh access token: Request failed with status code 500"
I have begun creating an application (Next.JS running on Firebase App Hosting) in Firebase Studio using Gemini and everything was working fine until now that I got a notification about "Client ...
0
votes
0
answers
99
views
40% of Firebase User Registrations Missing Firestore Documents
I'm experiencing a critical issue with my NextJS/Firebase application where approximately 40% of random user registrations result in "orphaned" users - users that exist in Firebase ...
0
votes
0
answers
34
views
Routing Issue: Transition to /category/smartphones/iphone Opens index.html Instead of category.html
I have a web application running on localhost:5000 using HTML pages (index.html and category.html) with dynamic component loading (e.g., header.html) via the loadComponent function. Links in the menu (...
0
votes
1
answer
97
views
Firestore transaction with multiple writes - is my syntax okay?
I am hosting a competition where groups of players (classes in a school) compete for points.
The players play individually and earns points for both themselves and for their class.
I track individual ...
0
votes
1
answer
112
views
Getting the doc from the firestore isnt working as expected
Here is a pic of my firestore data.
I am running this query:
var settings = [];
const queryGetSettings = db.collection('Settings').doc("Category");
var query = queryGetSettings.get()
....
0
votes
1
answer
73
views
Firebase Cloud Function fails with "TypeError: func is not a function" on deployment
I'm building a football match prediction system using JavaScript and Firebase. Users can make predictions on match results, and for users who don’t submit a guess, I want to automatically assign a ...
0
votes
1
answer
53
views
How to remove a nested property from an object in Firestore
my firestore stores user data as below:
users (collection)
uid-123 (document one per user)
profile:
name: 'My Name'
options: {
x: 1,
y: ...
1
vote
1
answer
78
views
How to delete Firestore document when a user closes the web page [closed]
I have a web application utilising React and Firestore where users can create "rooms" which, when active, allow users to interact with the host. There is an option to both activate and ...
1
vote
1
answer
113
views
Firestore Security Rules: Getting all docs with field-specific "where"-query
Goal/intention
The rule should grant access to a user document (which contains some personal information like email address) and also its subcollections for movie and tv watchlists, in case the user ...
1
vote
1
answer
45
views
Getting read access for subcollections of specific document in case a field matches in the main document only
I have the following rules in Cloud Firestore:
match /users/{userId}/{documents=**} {
allow read: if request.auth.token.email in resource.data.shareWith;
// allow read: if resource.data.test == ...
-1
votes
2
answers
49
views
Finding the number of fields in a document in Firestore [duplicate]
When working with 'firebase/firestore' in a React app. I have a document identified as:
const docRef = doc(fireStoreDB,'CollectionOne','DocumentTwo');
How can I find the current number of fields in ...
1
vote
2
answers
76
views
Writing data to a child node in Firestore
When working with 'firebase/firestore' in a React app. I can successfully use code like the one below:
import {collection,addDoc,...} from 'firebase/firestore'
const collectionName = 'France',
...
0
votes
0
answers
62
views
Flutter passes data to Cloud Functions, but it still returns Data: undefined
I am trying to add a function to my mobile application to send e-mails with registration code to the users of the app and it's always failing with the same error, E-mail=undefined. I will show also ...