-
Notifications
You must be signed in to change notification settings - Fork 358
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
Top-level service accessors are broken (TypeError: this.ensureApp(...).auth is not a function) #2325
Comments
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight. |
Having the same exact issue |
@CodingDoug thanks for providing workaround. The code you provided seems to be namespace API (like in the docs). Judging by client library transitioning to modular api, the same accessors are used there. Supposing what we see is a half-done migration without the proper update of docs. |
` let firebaseConfig = { initializeApp(firebaseConfig); // Initialize the Firebase app let app = initializeApp(firebaseConfig); module.exports = {
|
[READ] Step 1: Are you in the right place?
This is a bug report.
[REQUIRED] Step 2: Describe your environment
[REQUIRED] Step 3: Describe the problem
The top-level service accessors (
auth()
,firestore()
) provided by thefirebase-admin
don't work when provided an App object. However, the per-product accessors (getAuth()
,getFirestore()
) work fine.Doesn't work:
Full error when using accessors with an App instance looks like this:
However, these do work using per-product accessors:
The text was updated successfully, but these errors were encountered: