googlearchive / firebase-dart

Dart wrapper for Firebase
https://pub.dev/packages/firebase
402 stars 143 forks source link

Firebase syncing issue when persistance is involved #359

Closed eimantas1998 closed 3 years ago

eimantas1998 commented 3 years ago

Hello, the issue is that sometimes firebase does not return some of the documents that satisfy the query. The issue happens when internet connection goes out for a bit then comes back up, then some of new documents get synced and some of them just don't.

The query I am using:

  Stream<List<Book>> streamBooks(List<String> bookIds) =>
      _firestore
          .collectionGroup('books')
          .where(BOOK_ID, whereIn: bookIds)
          .snapshots()
          .map((snap) => snap.docs
              .map((doc) => Book.fromJson(_addDocId(doc)))
              .toList());
kevmoo commented 3 years ago

We can only help with issues specific to this package. You may want to find a Firebase-focused discussion to ask about this.