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.

Cloud Firestore is a flexible, real-time and scalable NoSQL cloud database to store and sync data for mobile, web, IoT and server development. It is integrated into both Firebase and Google Cloud Platform. Offers offline support for mobile and web. Also offers seamless integration with other Firebase and Google Cloud Platform products, including Cloud Functions.

It offers the following features:

  • Documents and collections with powerful querying
  • iOS, Android, and Web SDKs with offline data access
  • Real-time data synchronization
  • Automatic, multi-region data replication with strong consistency
  • Node, Python, Go, PHP and Java server SDKs

The official documentation can be found on Firebase and Google Cloud.

27821 questions
309
votes
6 answers

What's the difference between Cloud Firestore and the Firebase Realtime Database?

Google just released Cloud Firestore, their new Document Database for apps. I have been reading the documentation but I don't see a lot of differences between Firestore and Firebase DB. The main point is that Firestore uses documents and collections…
262
votes
13 answers

No Firebase App '[DEFAULT]' has been created - call Firebase.initializeApp() in Flutter and Firebase

I am building a Flutter application and I have integrated Firebase, but I keep getting this error when I click on a button either to register, login or logout. I have seen other people have asked the same question, but none seems to work for me. I…
Kennedy Owusu
  • 3,235
  • 2
  • 9
  • 16
235
votes
4 answers

What is Firebase Firestore 'Reference' data type good for?

I'm just exploring the new Firebase Firestore and it contains a data type called reference. It is not clear to me what this does. Is it like foreign key? Can it be used to point to a collection that is located somewhere else? If reference is an…
Jürgen Brandstetter
  • 5,058
  • 2
  • 30
  • 27
214
votes
18 answers

Cloud Firestore collection count

Is it possible to count how many items a collection has using the new Firebase database, Cloud Firestore? If so, how do I do that?
Guilherme Torres Castro
  • 13,434
  • 6
  • 54
  • 95
191
votes
12 answers

Separate dev and prod Firebase environment

I am considering using Firebase as MBaaS, however I couldn't find any reliable solution to the following problem: I would like to set up two separate Firebase environments, one for development and one for production, but I don't want to do a manual…
racs
  • 3,174
  • 2
  • 20
  • 25
178
votes
20 answers

firestore: PERMISSION_DENIED: Missing or insufficient permissions

I am getting the Error gettingdocuments.com.google.firebase.firestore.FirebaseFirestoreException: PERMISSION_DENIED: Missing or insufficient permissions. for the below code on else statement db.collection("users") .get() …
SUHAS REKHU
  • 1,833
  • 2
  • 7
  • 12
173
votes
5 answers

Difference between set with {merge: true} and update

In Cloud Firestore there are three write operations: 1) add 2) set 3) update In the docs it says that using set(object, {merge: true}) will merge object with existing one. The same happens when you use update(object) So what is the difference if…
ZuzEL
  • 10,136
  • 8
  • 36
  • 64
156
votes
12 answers

NullInjectorError: No provider for AngularFirestore

I'm learning Angular looking for help in fixing the error: I'm following this link : https://github.com/angular/angularfire2/blob/master/docs/install-and-setup.md to create a angular small app with angular2 and angularfirestore2 but when I hit ng…
Developer
  • 1,709
  • 2
  • 7
  • 15
140
votes
11 answers

Firestore query subcollections

I thought I read that you can query subcollections with the new Firebase Firestore, but I don't see any examples. For example I have my Firestore setup in the following way: Dances [collection] danceName Songs [collection] songName How…
Nelson.b.austin
  • 2,423
  • 5
  • 31
  • 52
138
votes
13 answers

How to update an "array of objects" with Firestore?

I'm currently trying Firestore, and I'm stuck at something very simple: "updating an array (aka a subdocument)". My DB structure is super simple. For example: proprietary: "John Doe", sharedWith: [ {who: "first@test.com", when:timestamp}, …
nerotulip
  • 1,788
  • 3
  • 12
  • 16
130
votes
30 answers

error NG6002: Appears in the NgModule.imports of AppModule, but could not be resolved to an NgModule class

First time using firestore and I'm getting this error. It seems to be a problem with Ivy, from my research. I don't have a lot of experience modifying tsconfig.app.json, which is the direction I've been pointed to, following other answers. The only…
Pablo Aguirre de Souza
  • 2,273
  • 3
  • 5
  • 20
126
votes
21 answers

Google Firestore: Query on substring of a property value (text search)

I am looking to add a simple search field, would like to use something like collectionRef.where('name', 'contains', 'searchTerm') I tried using where('name', '==', '%searchTerm%'), but it didn't return anything.
tehfailsafe
  • 2,491
  • 3
  • 18
  • 27
125
votes
7 answers

How to add Document with Custom ID to firestore

Is there any chance to add a document to firestore collection with custom generated id, not the id generated by firestore engine?
Harvey Dent
  • 1,313
  • 2
  • 7
  • 7
124
votes
12 answers

Google Firestore - how to get document by multiple ids in one round trip?

I am wondering if it's possible to get multiple documents by list of ids in one round trip (network call) to the Firestore.
Joon
  • 7,348
  • 5
  • 41
  • 64
115
votes
6 answers

type 'List' is not a subtype of type 'List'

I have a snippet of code which I copied from Firestore example: Widget _buildBody(BuildContext context) { return new StreamBuilder( stream: _getEventStream(), builder: (context, snapshot) { if (!snapshot.hasData) return new…
Arash
  • 8,191
  • 10
  • 44
  • 72
1
2 3
99 100