Getting 'The timestampsInSnapshots setting now defaults to true' firestore error in console

Go to your app.modules.ts file and add import:

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

Then add this value in your providers array:

providers: [{ provide: FirestoreSettingsToken, useValue: {} }]

In general, we configure firebase in our app in the following way:

firebase.firestore().settings({
    timestampsInSnapshots: true
});

For the above configuration, It shows the following warning:

@firebase/firestore: Firestore (6.3.5): 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.

In Order to resolve it, Just simply remove the timestampsInSnapshots attribute from the settings parameter. After fixing, your config should be changed to:

firebase.firestore().settings({});