Skip to content

AFS 6.1.0 : Error: Firestore has already been started and its settings can no longer be changed. #2666

@glued

Description

@glued

After upgrading our project to 6.1.0 we started seeing this error

Version info

Angular: 11.0.1

Firebase: 8.0.2

AngularFire: 6.1.0

How to reproduce these conditions

import { AngularFirestoreModule, SETTINGS } from '@angular/fire/firestore';

@NgModule({
  imports: [
    AngularFirestoreModule,
    AngularFireAuthModule,
    AngularFireStorageModule,
    AngularFireModule.initializeApp(environment.firebase),
 ],
 providers: [
 {
   provide: SETTINGS,
   useValue: { ignoreUndefinedProperties: true, cacheSizeBytes: 1048576 },
 };
]

removing settings fixes the issue...

Debug output

Errors in the JavaScript console

FirebaseError: Firestore has already been started and its settings can no longer be changed. You can only modify settings before calling any other methods on a Firestore object.

Expected behavior

no errors

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions