Closed Albert-Jan closed 3 days ago
@Albert-Jan Thank you for reporting this issue. I've replicated the code for the example Firestore app in this branch: issue/13019, and I didn't find any issues. Can you try this branch and see if you still have problems?
Thanks for your response; I updated my pubspec to rely on the cloud_firestore of the custom branch. I also performed a flutter clean to make sure it was properly compiled.
cloud_firestore: git: url: https://github.com/firebase/flutterfire.git ref: issue/13019 # branch name path: packages/cloud_firestore/cloud_firestore
Unfortunately, it did not work as expected, and the same bug happened. I double checked and downgrading to cloud_firestore: 4.17.4
does work as expected without any code changes.
Can you try running the example app found at this branch and test it with the provided configuration? Then, integrate your Firebase configuration into the example app and test again.
Hey @Albert-Jan - I think I was able to reproduce, fairly sure it is the same as this issue: https://github.com/firebase/flutterfire/pull/13029
I had a quick look. This might be the problem. Is there a branch I can test this against?
@Albert-Jan Sure, do you mind testing this branch to see if it fixes your issue, please? https://github.com/firebase/flutterfire/tree/firestore-13019
Let me know how it goes 🙏
For testing, I think updating pubspec.yaml to something like this ought to work:
dependencies:
cloud_firestore_web:
git:
url: https://github.com/FirebaseExtended/flutterfire.git
ref: firestore-13019
path: packages/cloud_firestore/cloud_firestore_web
@Albert-Jan - did you have a chance to test this?
I still have the issue where registering twice to the same document simply does not work on the web (in debug mode at least)
cloud_firestore: 4.17.4
In my testing I'm listening to 2 documents in 2 locations. It seems subscribing a second time is cancelling the first one (i.e. no more data received on the first subscriber).
Is there an existing issue for this?
Which plugins are affected?
Cloud Firesotre
Which platforms are affected?
Web
Description
After updating Flutter Firestore from version 4.X to 5.X, the web version, the stream no longer emits a value. Downgrading makes the same code work as expected. The future of the same document works without a problem.
Reproducing the issue
Listen to a stream:
Stream<Project> listenProject(String projectId) => _service.doc(FirestorePath.project(projectId)).snapshots().map((DocumentSnapshot<Map<String, dynamic>> data) => Project.fromMap(data.data()!));
Future loads just fine:
Future<Project> getProject(String projectId) async => _service.doc(FirestorePath.project(projectId)).get().then((DocumentSnapshot<Map<String, dynamic>> data) => Project.fromMap(data.data()!));
Firebase Core version
3.1.1
Flutter Version
3.22.2
Relevant Log Output
Flutter dependencies
No response
Additional context and comments
No response