13.0.0 - Firebase Credential -The incoming JSON object does not contain a client_email field
mustafa-barakat opened this issue · 7 comments
Describe your environment
- Operating System version: Docker on Windows
- Firebase SDK version: 13.0.0
- Firebase Product: Firebase Admin
- Node.js version: 18+
- NPM version: 10.9
Steps to reproduce:
- Upgrade to firebase admin to 13.0.0
- When using initializeApp with credential and adding (projectId,clientEmail,privateKey)
This doesn't happen in previous versions
Error
message: '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"
Relevant Code:
import { initializeApp } from 'firebase-admin/app';
import { credential } from 'firebase-admin';
initializeApp({
credential: credential.cert({
projectId: 'PROJECTID',
clientEmail:
'EMAIL,
privateKey:
'PRIVKEY',
}),
});
I found a few problems with this issue:
- I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
- This issue does not seem to follow the issue template. Make sure you provide all the required information.
I am running into the exact same issue after the release of v13.
- Node 20
- Firebase Admin 13.0.0,
- Operating System version: node:20-bullseye-slim (debian docker)
This is how I am initialising my app:
import firebaseAdmin from "firebase-admin";
firebaseAdmin.initializeApp({
credential: firebaseAdmin.credential.cert({
projectId: "from-env",
clientEmail: "from-env",
privateKey: "from-env",
}),
},
"label-here",
);
Probably related?: #2466
I am running into the exact same issue after the release of v13.
- Node 20
- Firebase Admin 13.0.0,
- Operating System version: node:20-bullseye-slim (debian docker)
This is how I am initialising my app:
import firebaseAdmin from "firebase-admin"; firebaseAdmin.initializeApp({ credential: firebaseAdmin.credential.cert({ projectId: "from-env", clientEmail: "from-env", privateKey: "from-env", }), }, "label-here", );Probably related?: #2466
Yes, and for some reason tests were replaced
Related #2769
Thanks folks, this will be fixed in #2779
This issue is now fixed in v13.0.1
. Thanks for your patience! Please open a new issue if you run into any problems.
thanks for this
This issue is now fixed in
v13.0.1
. Thanks for your patience! Please open a new issue if you run into any problems.