Skip to content

ERROR [_FirebaseError: initializeFirestore() Updating to 19.0.0-rc.0 #3580

Closed
@mvergarair

Description

@mvergarair

Updating to 19.0.0-rc.0 produces the following error:

ERROR [_FirebaseError: initializeFirestore() has already been called with different options. To avoid this error, call initializeFirestore() with the same options as when it was originally called, or call getFirestore() to return the already initialized instance.] {
  code: 'failed-precondition',
  customData: undefined,
  toString: [Function (anonymous)]
}

App config:

export const appConfig: ApplicationConfig = {
  providers: [
    provideRouter(routes, withComponentInputBinding()), provideClientHydration(),
    provideFirebaseApp(() => initializeApp(environment.FIREBASE_CONFIG)),
    provideAuth(() => getAuth()),
    provideFirestore(() => initializeFirestore(getApp(), {
      localCache: persistentLocalCache({
        tabManager: persistentMultipleTabManager(),
      }),
    })),
    provideAuth(() => getAuth()),
    provideFunctions(() => getFunctions()),
    provideAnimations(),
    MatDialog,
  ]
};

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