Skip to content

Firebase 5.10 timestampInSnapshots error #2050

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
ron4548 opened this issue Apr 20, 2019 · 1 comment · Fixed by #2051 or TypescriptID/angularfire2#58
Closed

Firebase 5.10 timestampInSnapshots error #2050

ron4548 opened this issue Apr 20, 2019 · 1 comment · Fixed by #2051 or TypescriptID/angularfire2#58

Comments

@ron4548
Copy link
Contributor

ron4548 commented Apr 20, 2019

Version info

Angular: 7.2.13

Firebase: 5.10.0

AngularFire: 5.1.2

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

How to reproduce these conditions

Just use the AngularFireStore module with the specified versions, and the error appears.

Debug output

index.esm.js:78 [2019-04-20T17:18:20.735Z]  @firebase/firestore: Firestore (5.10.0): 
  The timestampsInSnapshots setting now defaults to true and you no
  longer need to explicitly set it. In a future release, the setting
  will be removed entirely and so it is recommended that you remove it
  from your firestore.settings() call now.

image

Expected behavior

Error should not be displayed according to the following line (firestore.ts:22):
export const DefaultFirestoreSettings = (parseFloat(SDK_VERSION) < 5.8 ? {timestampsInSnapshots: true} : {}) as Settings;
https://github.com/angular/angularfire2/blob/master/src/firestore/firestore.ts

Actual behavior

Since the version is parsed to a float, version 5.10 is considered as 5.1 and therefore the timestampsInSnapshots setting is enabled explicitly.

ron4548 added a commit to ron4548/angularfire2 that referenced this issue Apr 20, 2019
Change the condition that determines whether timestampsInSnapshots setting is set to true.
This is done to order to comply with multiple digits minor versions of firebase sdk.
For example: version 5.10.0 is greater than 5.8.0

fixes angular#2050
jamesdaniels pushed a commit that referenced this issue Apr 25, 2019
Change the condition that determines whether timestampsInSnapshots setting is set to true.
This is done to order to comply with multiple digits minor versions of firebase sdk.
For example: version 5.10.0 is greater than 5.8.0

fixes #2050
@ChesterCorin
Copy link
Contributor

@jamesdaniels Any idea when this change will be included in a release, or a suggested workaround other than downgrading firebase to 5.9? Thanks for the work on solving this, and the @angular/fire package in general.

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