Skip to content

initializeApp #3452

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
conectafoot opened this issue Oct 28, 2023 · 5 comments
Closed

initializeApp #3452

conectafoot opened this issue Oct 28, 2023 · 5 comments

Comments

@conectafoot
Copy link

conectafoot commented Oct 28, 2023

The "Firebase Options" interface of the "initializeApp" function does not have the "locationId" attribute.

"dependencies": {
"@angular/animations": "^16.2.0",
"@angular/cdk": "^16.2.10",
"@angular/common": "^16.2.0",
"@angular/compiler": "^16.2.0",
"@angular/core": "^16.2.0",
"@angular/fire": "^16.0.0",
"@angular/forms": "^16.2.0",
"@angular/material": "^16.2.10",
"@angular/platform-browser": "^16.2.0",
"@angular/platform-browser-dynamic": "^16.2.0",
"@angular/router": "^16.2.0",
"rxjs": "~7.8.0",
"tslib": "^2.3.0",
"zone.js": "~0.13.0"
},

  "...Object literal may only specify known properties, and 'locationId' does not exist in type 'FirebaseOptions'.

Overload 2 of 3, '(options: FirebaseOptions, config?: FirebaseAppSettings | undefined): FirebaseApp', gave the following error.
Argument of type '{ projectId: string; appId: string; storageBucket: string; locationId: string; apiKey: string; authDomain: string; messagingSenderId: string; measurementId: string; }' is not assignable to parameter of type 'FirebaseOptions'.
Object literal may only specify known properties, and 'locationId' does not exist in type 'FirebaseOptions'.ts(2769)"

@google-oss-bot
Copy link

This issue does not seem to follow the issue template. Make sure you provide all the required information.

@Hendercraft
Copy link

Hey, you just have to remove locationId and it's value from the app.module.ts, for some reason they managed to initialize it even though it's not needed, after that you're app should compile just fine

@Sapython
Copy link

As pointed out by @Hendercraft this will simply resolve your issue. And if it has please close this issue.

@conectafoot
Copy link
Author

thanks

@fredsa
Copy link

fredsa commented Jun 20, 2024

https://firebase.google.com/docs/reference/js/app.firebaseoptions.md#firebaseoptions_interface does not include locationId as an option.

A fix for this issue would be either:

  1. If "locationId" is truly not needed, make it so that running ng add @angular/fire does not add the field to the ApplicationConfig in app.config.ts.
  2. Update FirebaseOptions to include locationId, and update the Firebase docs to document this field.

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

No branches or pull requests

5 participants