Questions tagged [google-cloud-firestore]

Cloud Firestore is an auto-scaling real-time document database for storing, syncing, and querying data for mobile, web and server development.

1
vote
0answers
5 views

Query documents with field in array on Cloud Firestore [duplicate]

I have a collection "MyCollection" on Cloud Firestore and I want to query all the documents where the field "MyField" (that is a string) is in the given array. Is there a way to do something like: ...
1
vote
0answers
12 views

Firestore security rules - Unique usernames

I am trying to secure the backend for my app and I can't find a solution anywhere. The documentation isn't helping either. I have 2 collections: users and usernames; I want every user to have an ...
0
votes
0answers
14 views

I'm geting Firestore error after refreshing

I'm successfully uploading an image to firebase storage and firestore and when I try to delete it, it goes smooth but when I refresh the page and try deleting an image before uploading any I got an ...
0
votes
1answer
20 views

Unable to use the logical OR operator in Firebase Firestore security rules - the condition always evaluates to `false`

I want to allow writes to /companies/{company} if the logged-in user is a manager OR the record doesn't exist. I have the following security rules: service cloud.firestore { match /databases/{...
0
votes
2answers
16 views

Wait for firestore data before calling view

Whenever my app is launched I want to get the user data from firestore. So in my app.component.ts I have: constructor(private platform: Platform, ..., private auth: AuthService, private ...
1
vote
1answer
53 views

RecyclerView Bugs?

I have a Note-App. In the Main Activity the Notes are going to be listed with a RecyclerView. To apply changes in the database I use FirestoreRecyclerOptions. But I have a big problem. First, ...
0
votes
1answer
13 views

How to declare App-level variable for being used by all the components

So I have this App with a Firestore db variable, I'm currently passing the db through the widgets' constructor. Is there any way my widget can get the App's db variable without declaring a properties ...
0
votes
0answers
21 views

Firebase Firestore Console very slow

I'm using the Firebase Firestore database for a new project. The project involves quite a lot (but not insane amounts) of data, e.g. a few arrays with a 1,000 ish elements. I can upload and download ...
0
votes
0answers
13 views

Angular-Project: Querying a single document of collection in Firestore

I tried two solutions: Firestore : Retrieve a single document FireStore Querying for a single document But I still can not access the single fields or see the data of a document when I log the ...
0
votes
0answers
11 views

Efficiently Chaining getDocument using Firestore (Swift)

The question is, how could I fix the code below so that it is properly getting all of the contact info? It is currently skipping over documents with the setup below. DB Layout: user-contacts ...
0
votes
0answers
18 views

Firebase Firestore for reservation system [on hold]

I am going to build a mobile app using Firebase Firestore to allow users to reserve requirements. I want to make sure that the requirement should only be reserved by one user even more than one user ...
0
votes
2answers
20 views

With firestore, is it possible to configure offline persistence to set 'off' in a specific document?

I need to set off the persistence in a certain document in Firestore; but all other documents should work with default configuration like this implementation. I have implemented the code; but calling ...
0
votes
1answer
19 views

AngularFire2 update creates new document field instead of updating a field

I would like to update a Firestore model containing a profile name and a list of hashtags with Angular 6. The "name" is stored as the value of a document field and the "hashtags" are stored as the ...
0
votes
0answers
15 views

Retrieve nested Cloud Firestore subcollections upon page load in Angular

I'm trying to create a simple blog example app in Angular using Google Cloud Firestore. The data in Firestore is structured like this: posts post1 name: "Post about stuff" ...
0
votes
0answers
15 views

Flutter: streambuilder status always connectionstatus.waiting

my stream connections is always waiting. I know the stream works becuase on another page it connects. Any ideas whats going wrong? thanks for the help. Widget build(BuildContext context) { return ...
0
votes
2answers
23 views

How to use async await properly

i am trying to save/update some data into my firestore document.I have implemented it successfully with out any problem.To save data i am using an async function.But i am not much familiar with async ...
1
vote
1answer
18 views

Query Page 2 Firestore / Pagination

I am using firestore for an ecommerce project I am working on. My question is how would I query page 2 directly if the user lands on it. I have 48 products on every page now I basically need the ...
0
votes
0answers
21 views

Firebase Permisson denied after updating android app from play store

I have developed an app that uses Firebase phone auth and cloud firestore database and I have published it on the play store. My problem is when I update the app from the play store I got an exception ...
0
votes
0answers
16 views

Fetch data from firebase firestore and plot histogram using highcharts when cardview clicked - android

I have an activity in which there are many card views which when clicked should fetch the data from firebase firestore and plot the data in a histogram format using highcharts in android.On each card ...
1
vote
1answer
35 views

Node.js cloud function “firestore set() inside get() if not exists” is not working correctly?

Here is I'm trying to achieve if user is exist in firestore show the data else add it to firestore And following is my code // See https://github.com/dialogflow/dialogflow-...
1
vote
2answers
17 views

Sorting Firestore Documents

Is there any possible way I can order the Cloud Firestore documents of a collection based on a number at a value of a specific field. For example in the collection ids there are documents and in each ...
0
votes
1answer
15 views

How can I get data from array data field from Cloud Firestore?

I am using Cloud Firestore and there is a array data in field. So how can I get data from array individually?
0
votes
1answer
15 views

Firestore security rules for specific document

I am trying to apply the following situation : all authenticated users have read and write access to the database except for admin document. Admin document is accessible only for him for read and ...
0
votes
1answer
14 views

When is data actually transferred in firestore? In the document snapshot? Or not until .data() or .get() is called?

I'm trying to decide how to structure permissions for an app. Much of this comes down to the question in the title. Specifically, if I call: const tasks = db.collection('tasks').where('canRead', '...
0
votes
1answer
12 views

How to access document in firestore

I have a firebase database with a users node on the top. For example I want to get the first child of that node. I am trying to access in this way, but i says that: TypeError: "this.users[0] is ...
0
votes
0answers
26 views

Storing Registration Data in Firebase

I need help with storing registration data in Firebase. I want to have email name of current logged user stored in Firebase database. Pls help me. I am writhing code where user can write on profile ...
0
votes
1answer
14 views

Firestore: How to use order by field of object of array

I have a database like this. How can I order by the timestamp field in the array? .orderBy("received[0].timestamp", "desc")
0
votes
0answers
21 views

Firestore daily quota going wild

I'm building an Angular app using the Firestore database. While developing I would normally get under 100 API calls per day, looking at the 'Cloud Firestore API Calls'. But it seems like something ...
1
vote
1answer
15 views

Firestore where clause with big dataset

I have the following structure in my firestore database: messages: m1: title: "Message 1" ... archived: false m2: title: "Message 2" ... ...
1
vote
0answers
18 views

Android firestore could not reach backend error in react native

I have been looking for the solution about this issue, but I couldn't find it until now. It is such a weird issue. I tried with react-native 0.56.0 at first, it compiles well, and then this error is ...
-1
votes
0answers
15 views

FireStore Document Changes and Update data Particular Position in Recyclerview? [on hold]

I need Update a data into Recyclerview for Particular position when I update a document from firestore in android.
0
votes
1answer
18 views

How to turn Firestore query into a Javascript array

I am trying to export a firestore function that performs a query and returns an array containing the objects in that query. I am trying to get data from a subcollection of a document, and get an ...
0
votes
2answers
28 views

Error in Javascript Promises while trying to create a function in Firebase FireStore

so I've been following this 5 part tutorial series as to how notifications can be sent from device to device using Firebase Cloud Storage and the javascript I wrote seems to be incorrect because I ...
0
votes
1answer
23 views

How to store user input as an object key in typescript?

Being new to Firestore I learned, that I should model it like this: enter link description here members { id: xyz { name: Jones; ...
0
votes
0answers
13 views

Firestore data structure for a hotel reservation system

I want to build a hotel reservation system that also will push availability to the channel manager. I want to use Firestore to store my data. I read a few articles but still pretty new to this. I am ...
0
votes
1answer
20 views

How to query relational data with GraphQL, Firebase and Gatsby

I'm building a Gatsby.js site. The site uses the gatsby-source-firestore plugin to connect to the Firestore data source. My question is this. How can I query relational data? As in, fetch data ...
0
votes
1answer
17 views

Firebase Firestore: query list of users liked my profile

I'm building Flutter app with Firebase Firestore. I'm trying to implement likes feature bug faced some platform limitations. I have a collection users. Each user has likedUsers collection where I ...
0
votes
0answers
11 views

Firebase Auth Custom Claim Security

I am making a task management app using Firestore. Now I have certain tasks and with some super-admin, admin, user-level privileges. 1: Super-Admin privilege: Can do any kind of edit, delete, add. ...
1
vote
0answers
20 views

How to stop Firestore `get` query on componentWillUnmount

okay so I'm fetching data from Firestore in componentDidMount but while it's fetching the data if I change the component I get error saying: Warning: Can't call setState (or forceUpdate) on an ...
0
votes
0answers
14 views

firestore transaction throws error for update rule which allows only has one specific field

by execution of firestore runTransaction function on the web, it occurs error below. firestore.googleapis.com/v1beta1/projects/myproject/databases/(default)/documents:commit:1 POST https://firestore....
0
votes
0answers
9 views

data modelling in firestore

I am creating a movie database app using firestore. There can be many movies each movie has any number of genres & tags, only one review The movies must be querable by each genre, tag So far I ...
1
vote
1answer
25 views

Console log a specific object attribute from Firestore in Ionic

I have a query value where i am iterating each of these items from the query and stringifying them if (item.exists) { auxint++; auxString += '{"id":"' + item.id + '","AgendaTeste":' + JSON.stringify(...
0
votes
0answers
15 views

Variables in hierarchical cloud firestore rule

I have the following rule set in cloud firestore. The structure is: /users/{userId}/years/{year}/**. I want to deny any write to the year document and its subcollections and their documents if that ...
0
votes
0answers
20 views

items and categories using FirestoreRecyclerAdapter

so i want to create something like this: example as in create a list of items that separated by categories (i have the Item class which holds every item's category) i managed to create it using ...
1
vote
1answer
22 views

I am inputting values to my Firestore database but they are not going into the correct fields

Currently I am scanning a QR code and then updating my attendance collection in Cloud Firestore. It is not putting them in the correct place and I am using a model class of type Attendance. Here is my ...
0
votes
0answers
18 views

Firebase Auth with Firestore [duplicate]

I am new to the Google Cloud platform and have been scouring the documentation to determine if Firestore/Firebase is a good fit for my next web app. I understand that because my API key to my project ...
0
votes
0answers
13 views

Firestore Phone Authentication Recovery

My future app as any other apps using firebase phone authentication may come across a situation where a user changed his phone number and/or his entire device, a new installation and a new ...
0
votes
0answers
12 views

Flutter Firestore query with startAfter

I am using Flutter (cloud_firestore) and trying to get data from Firestore after document with title 'xxx', but it returns 0 results. return Firestore.instance.collection('products') .orderBy('...
0
votes
0answers
10 views

Firebase JS Error: getToken aborted due to token change

I'm getting a Firebase error "Error: getToken aborted due to token change" while running Firestore transaction using the JavaScript library. The error doesn't get thrown every time and I couldn't find ...
1
vote
2answers
27 views

Error running app with Firestore in release mode

I have incorporated Firestore into my app for basic reads and writes to some tables. The app works fine in debug mode but when I generate the release build, the following error occurs: java.lang....