-
Notifications
You must be signed in to change notification settings - Fork 377
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
There is an error in the type defined in the ServiceAccount #2769
Comments
I found a few problems with this issue:
|
Hi @k-redstone , |
I can confirm the same thing happened to me yesterday! While I didn’t investigate as thoroughly, I did roll back to a previous version of the admin SDK, but I still received the same error message, and I’m initializing it the same way as the OP. Thanks for taking care of it! 🙏 |
I came here to file this exact issue as I was banging my head all afternoon trying to understand how this first step was not working! Thanks @k-redstone for filing the issue. |
Yup it happened to me too, after changing to client_email and private_key its solved |
Same here! Error output: ERROR [ExceptionsHandler] Credential implementation provided to initializeApp() via the "credential" property failed to fetch a valid Google OAuth2 access token with the following error: "The incoming JSON object does not contain a client_email field". |
I encountered the same issue when upgrading to v13.0.0.
The problem doesn't occur in the latest v12.* version (v12.7.0). |
Thanks for your patience folks! This issue is now fixed in |
Describe your environment
[REQUIRED] Step 3: Describe the problem
I followed the example provided for the admin.credential.cert() function, but encountered an issue.
I'm trying to initialize the app with admin.initializeApp() using Firebase Admin SDK version 13. However, there seems to be a discrepancy between the type defined in ServiceAccount and the key values actually used for authentication.
Steps to reproduce:
The following code causes the following error.
as-is
So, after modifying the code as follows, it worked correctly.
Relevant Code:
In my opinion, the transition to version 13.0 involved switching to use google-auth-library, which seems to be causing this issue.
maybe auth.fromJSON() cause error
src/app/credential-internal.ts 456 line
google-auth-library /src/aut/jtwclient.js 206 line
The text was updated successfully, but these errors were encountered: