Skip to content
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

@firebase/firestore: Firestore (5.8.0): timestampsInSnapshots #1993

Open
lobin21 opened this Issue Jan 18, 2019 · 4 comments

Comments

Projects
None yet
4 participants
@lobin21
Copy link

lobin21 commented Jan 18, 2019

Version info

Angular: 7.2.1

Firebase: 5.8.0

AngularFire: 5.1.1

In the newest firebase version the timestampsInSnapshots setting defaults to true therefore it no longer needs to be set. This causes error/warning message in the browser console:

[2019-01-18T11:01:29.267Z] @firebase/firestore: Firestore (5.8.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.

@Marcusg62

This comment has been minimized.

Copy link

Marcusg62 commented Jan 19, 2019

I am new to angularfire2 and following the installation and setup guide I kept getting this error. I'm not sure if this error is preventing the code from working or if I'm just doing something wrong.

@Marcusg62

This comment has been minimized.

Copy link

Marcusg62 commented Jan 19, 2019

It doesn't seem like this is stopping any development for you, if it is you can explicitly change the version of firebase in your package.json.
image

@zbream

This comment has been minimized.

Copy link

zbream commented Jan 20, 2019

@Marcusg62

Until @angular/fire is updated, there should be no harm in clearing that setting yourself.

Wherever you import AngularFirestoreModule...

import { FirestoreSettingsToken } from '@angular/fire/firestore';

...

{ provide: FirestoreSettingsToken, useValue: {} }
@SnisarOnline

This comment has been minimized.

Copy link

SnisarOnline commented Jan 22, 2019

eg: app.module.ts

import { AngularFirestoreModule, FirestoreSettingsToken } from '@angular/fire/firestore';
@NgModule({
  declarations: [AppComponent],
  imports: [
     ...
     AngularFirestoreModule,
     ...
  ],
  providers: [{ provide: FirestoreSettingsToken, useValue: {} }],
  bootstrap: [AppComponent]
})
export class AppModule { }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.