42,870
questions
-3
votes
0
answers
19
views
how do view id datas in firebase [closed]
import { initializeApp } from "https://www.gstatic.com/firebasejs/10.13.0/firebase-app.js";
import { addDoc, collection, getFirestore, getDocs, deleteDoc, doc} from "https://www.gstatic....
0
votes
0
answers
40
views
SwiftUI with FirebaseFirestore
I've googled a lot but haven't found an answer yet. I'm a beginner who just started programming SwiftUI with Xcode. This is a very simple example. I tested with Xcode 15.4, Firebase 11.1.0, ISO 17.5 ...
0
votes
0
answers
13
views
Firestore security rules - securing collection group subpath based on resource.data
I have a Firestore collection group query like so:
collectionGroup('test').where('businessId', '==', '123').get()
I'm trying to secure it.
I have read I need to use wildcards to secure collection ...
-1
votes
0
answers
14
views
Is It a Best Practice to Use Direct Script Calls Instead of API Routes for Fetching Data in Astro? [closed]
I’m newbie on Astro and am trying to fetch data from a Firestore database. Initially, I created an API route to handle data fetching, but I ran into issues with using the browser's fetch function on ...
0
votes
1
answer
18
views
Firestore error "User document does not exist"
I'm working on a project similar to Linktree and have implemented Firebase for authentication and Firestore for the database. The authentication system is functioning correctly, and user data is being ...
0
votes
1
answer
16
views
Firebase: How do I inform the client that the CloudFunction executed [duplicate]
When a CloudFunction is started by an EventTrigger:
onDocumentCreated, onDocumentUpdated, onDocumentDeleted,
onDocumentWritten
... the code execution may be successful .then(...) or unsuccessful ....
0
votes
1
answer
30
views
Firestore Security Rules: (minimal) code that doesn't work against these rules
I'm working on setting up Firestore security rules, but I'm facing an issue where my custom function getUserOrganization() doesn't seem to return the correct value when used in matching conditions. ...
0
votes
0
answers
16
views
Firestore Security Rules: How to Securely Allow Users to Access Members Based on Group Assignment?
I'm working on a Firebase Firestore project where I have three collections: users, groups, and members. Each user can belong to one or more groups, and each member belongs to a specific group. I want ...
0
votes
0
answers
10
views
Facing issue while trying to read collection from firestore using Firebase Kotlin SDK
I am facing ClassNotFoundException while reading collection. I have added all the needed dependencies in gradle file. I did the sign in process with custom token.
Exception I am getting is mentioned ...
0
votes
2
answers
26
views
Adding exemptions in Firebase automatic indexing
I'm storing data in firebase with this structure:
/aggregate_data/{user id}/{product id}/data
The aggregate_data collection is the root collection ID and the rest subcollections and documents under it ...
0
votes
0
answers
44
views
How to accurately determine if a Firestore document does not exist using StreamBuilder in Flutter?
In Flutter/Dart, using Firebase Firestore, when setting up a StreamBuilder using a Stream of DocumentSnapshot objects like this:
@override
Widget build(BuildContext context) {
return ...
0
votes
0
answers
36
views
How to use StreamProvider with a FireBase QuerySnapshot
I'm following a very old tutorial which use StreamProvider. The API has changed quite a bit and now has an intitialData argument but I don't know what to assign it.
The class Home.dart looks like ...
0
votes
2
answers
55
views
What is the best practice for storing documents in Firestore? [closed]
A Car has a Brand. So, many Cars have the same Brand.
How do you do to map these objects to store in the Firestore? What is the best practice for that?
We need to think that a Brand can change, so we ...
-3
votes
0
answers
38
views
API to create recurring notifications in Firebase node express [closed]
Title: Why is my API endpoint not pushing FCM notifications with schedule?
Body:
I'm working on a Node.js/Express API endpoint to schedule push notifications using Firebase Cloud Messaging (FCM). ...
0
votes
1
answer
31
views
in Firebase firestore. are collection names case sensitive
i want to ask in Firebase firestore. are collection names case sensitive.
I know keys and values in firestore are case sensitive, but I'm not sure if collection names are.
I tried searching on ...
0
votes
0
answers
9
views
Not able to access gcp firestore while using it from docker, Getting "'@type': type.googleapis.com/google.rpc.ErrorInfo"
docker run --rm gcr.io/google.com/cloudsdktool/google-cloud-cli:stable sh -c "gcloud firestore databases list"
ERROR: (gcloud.firestore.databases.list) [[email protected]....
0
votes
0
answers
19
views
"Your connection is not private" ERROR in firebase for some wifis [closed]
I am using firebase/firestore for the backend in my react-native app. The problem is, when I connect to some public wifi networks, the images don't load. When I copy paste the url in browser, i.e ...
0
votes
1
answer
3k
views
How to Use a New Firebase Firestore Database (Multi-Region 'nam5') in a Flutter Project
Problem:
I have an existing Firebase project where I've created a new Firestore database in the 'nam5' multi-region location, named 'newDb', to improve efficiency. However, I am facing issues with ...
0
votes
0
answers
22
views
(on MacOS, Android Studio Koala) 'package:firebase_core/firebase_core.dart' => Target of URI doesn't exist ERROR
I have set up flutterfire CLI and logged in, tried -flutter pub get , -flutter clean, -flutter pub add firebase_core, -flutterfire configure, -flutter clean, -flutter channel stable. I've restarted my ...
0
votes
0
answers
22
views
TypeError: this._firestore.native.documentGet is not a function (it is undefined)
I'm trying to implement a "recommended friends" feature, and users have "following" and "followers" lists in firestore database. For some reason I keep running into this ...
0
votes
2
answers
39
views
Error getting data from firestore: _TypeError(type Future<List> is not a subtype of type List in type cast
I’m having trouble getting a List<Event> to display in the Calendar I’m developing. Despite calling it from Firestore, I’m not able to retrieve the list of events. I suspect the issue may be ...
0
votes
0
answers
39
views
API is working at development, but in production fails
I am trying to run my site in nextjs (typescript) with my API. When I run it in development, the API works, but when I run on production (vercel), it throws a timeout.
In the API call, I pass one ...
-1
votes
0
answers
41
views
Very strange React Native Firestore issue - Error: [firestore/permission-denied] [duplicate]
TLDR: My react native mobile app randomly starts having this permission denied error when calling firestore emulator on localhost. It would be working at first but then randomly stops working without ...
0
votes
1
answer
59
views
How to get the authenticated user with uid through onDocumentCreatedWithAuthContext
All Firebase users in my app has a document in the Profile collection.
All my profile document ids are equal to user.uid when I created them in Flutter like this.
Within the profile document, there ...
0
votes
1
answer
37
views
The data on my firebase dosen't display on my website [closed]
I'm creating a blogging website and the data(images, title, and date) on my Firebase doesn't display on my website.
let blogId = decodeURI(location.pathname.split("/").pop());
// Define ...
0
votes
0
answers
42
views
How do I create a Firestore document using ESP8266?
I'm pretty new at firebase and in my arduino project, where I use an ESP8266 01S module, I want to hardcode an Id, representing the Arduino project. Then with that Id I want to create if not already ...
-1
votes
1
answer
74
views
How to Insert an Array of Objects into Firestore [closed]
I want to insert an array of objects as a field in a Firestore document. What I have is:
struct Race {
...other properties
results: [RunnerResult]
}
struct RunnerResult { ... }
func saveRace(...
-4
votes
0
answers
27
views
FireStore "NotIn" Query not recognized SWIFT [closed]
I have the following query code:
let collectionToCheck = db.collection("OpenChats")
// Create a query against the collection.
collectionToCheck.whereField("Incident ...
0
votes
1
answer
23
views
Firestore snapshot cursor with timestamp vs document
I have an infinite scroll list in my app. On page load, I subscribe to the initial 50 items and then when a users scroll down I subscribe to the next 50 items and so on.
const firestoreQuery = query(
...
0
votes
1
answer
28
views
Firestore query with orderBy and limit in infinite scroll list
I have an infinite scroll table of items in my app. Once the table is rendered, I subscribe to first 20 items. This is the query in my listener:
const firestoreQuery = query(
collectionGroup(firestore,...
0
votes
1
answer
15
views
How do I filter chats messages for multiple users in vue and firebase?
Hi I am trying to create a chat feature between multiple users, but each chat must be only shared between the two members that are talking, I have done chats in the past that have been between an ...
0
votes
1
answer
18
views
Why am I not seeing any return results for my firestore vector embedding search?
I have made a composite index as per the firebase docs
gcloud alpha firestore indexes composite create \
--project=[Insert Project Name Here]
--collection-group=elements --query-scope=COLLECTION \
--...
5
votes
1
answer
543
views
Google Cloud Run Firestore: [ERR_BUFFER_OUT_OF_BOUNDS]: "length" is outside of buffer bounds
I'm using the Google Cloud Run Firestore integration, which worked fine until recently. I can't do any CRUD operations aynmore, while I'm able to authenticate.
This only occurs on the Google Cloud Run ...
0
votes
1
answer
18
views
Deploying indexes to a specific firestore database
I have the following index in my firestore.indexes.json
"indexes": [
{
"collectionGroup": "programsForQuery",
"queryScope": "COLLECTION&...
0
votes
0
answers
19
views
Why is there no option for User's collection when I'm trying to add firestore rules in FlutterFlow
This is my users collection and I have already populated it with sample data. However looking up on a youtube tutorial and the document I am supposed to be using Users collection so only users can ...
0
votes
0
answers
27
views
Connecting firestore using laravel
i have been trying to connect firestore using laravel 11 but it is not working, i have tried laravel 11,10 and 9 but to no avail. if i run my php artisan serve after creating code to insert into ...
0
votes
0
answers
24
views
Grpc.Core.RpcException: Status(StatusCode="Unauthenticated" exception
I create a simple c# app to query data in Firestore. The code is as follows:
string path = AppDomain.CurrentDomain.BaseDirectory + @"data\firebase.json";
FirestoreDb db = FirestoreDb.Create(&...
0
votes
1
answer
25
views
docs changes in a specific collection in firebase in my flutter app
I have already implemented the logic but when the listener triggered after updating only one document or adding or deleting it the whole docs fetched to me but is their any way to fetch only the ...
0
votes
1
answer
35
views
What's the system that I can create a new collection of a document in Firebase Firestore?
I explored the docs but couldn't figure out that how can I create a new collection of, suppose this default user which is located in users collection. Now I created a collection for this document ...
0
votes
1
answer
30
views
Add a List of Document References into a flutter/firebase document field
I got this code:
var testList = <String>[];
await db
.collection('tests')
.where('user', arrayContainsAny: [db.doc('users/' + uid)])
.get()
.then((value) {
...
0
votes
0
answers
26
views
Flutter set dynamic home in Main.dart
A user in my app goes through registration (using Firebase as backend) before accessing the app. I have a global class method where variables are stored.
class AppData {
static var _appdata = ...
1
vote
2
answers
33
views
I created a function to write with Firebase, but there is a problem with implementing the search function
I made a writing function with Firebase, but when I search for the title if it's "ice cream", it comes out when I search for "ice cream", but it doesn't come out when I search for &...
1
vote
1
answer
67
views
Google Datastore/Firestore - generational timestamp
Is it scalable to index a daily timestamp on an entity that only increases in value once per day? In essence, similar to a generation field as explained in the best practice docs here (although that ...
0
votes
1
answer
29
views
Whats the process for updating existing user data in Firestore when a new feature requires data to be added/different? [closed]
I've found several other posts asking similar questions but they all have a specific code element to them and this question is much more on process or best practice with regards to Firebase and NOSQL ...
1
vote
0
answers
45
views
Firebase docData stream emits identical object values multiple times in a row
This is my code:
import { doc, docData } from '@angular/fire/firestore';
const gameDocRef = doc(this.firestore, 'game', game.id);
const game$ = docData(gameDocRef, { idField: 'id' })
Somehow the ...
0
votes
0
answers
20
views
What does the ! do in dart [duplicate]
_firestore.collection('users').doc(userCredential.user!.uid).set({
In this line, what does the ! next to user do - This is with dart and firestore
I'm just curious and want to know what it does from ...
0
votes
1
answer
23
views
Modeling a game leaderboard with Firestore - does this count as a monotonically increasing field?
I have a video game model where I have a User collection in Firestore where each document has a score field. I want to query to get all users sorted by their score, from highest score to lowest. To do ...
0
votes
0
answers
20
views
Firestore cycle for and update function are not in sync
I'm new to firestore cloud functions. I'm trying to write a function that based on the change of one collection should be updated the data of another collection.
I create cycle for on the ingredients, ...
0
votes
1
answer
32
views
Access Firestore subcollection in Flutter
I have a Flutter chat application.
The structure of FireStore is:
chats (collection) > roomId (random generated id, which is a document) > users (collection) > email (email of the user, which ...
0
votes
0
answers
20
views
flutter app fire base firestore database configuration error for run time app
Accessing hidden method Lsun/misc/Unsafe;->putObject(Ljava/lang/Object;JLjava/lang/Object;)V (greylist, linking, allowed)
2
: Accessing hidden method Lsun/misc/Unsafe;->putLong(Ljava/lang/Object;...