Skip to content

snapshotChanges not returning correct results after open valueChanges subscription #1963

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
tmk1991 opened this issue Dec 1, 2018 · 3 comments

Comments

@tmk1991
Copy link

tmk1991 commented Dec 1, 2018

Version info

Angular: 5.2.10

Firebase: 5.5.9

AngularFire: 5.1.0

Other (e.g. Ionic/Cordova, Node, browser, operating system): Ionic 3.9.2

How to reproduce these conditions

Steps to set up and reproduce
First open a subscription to a collection or document in the first component / page.

this.db.collection('apples').valueChanges().subscribe()

In another component, leaving the first subscription open, try to make a call to the same collection with snapshotChanges() and a queryFn.

this.db.collection('apples',queryFn).snapshotChanges().subscribe()

Replacing the second call with .get() works as expected.

Sample data and security rules

rules are set up to read all if true;

Expected behavior

Being able to leave a subscription open to a document or collection with valueChanges() and make subsequent snapshotChanges() calls to the same collection endpoint.

Actual behavior

The next document of the first opened subscription returns in the subsequent snapshotChanges() call.

@jek-bao-choo
Copy link
Contributor

#2012

@jamesdaniels
Copy link
Member

Not clear what this issue is. Cache maybe? Closing.

@jek-bao-choo
Copy link
Contributor

#2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants