# Firebase admin sdk

**URL:** <https://community.firebasestudio.dev/t/firebase-admin-sdk/18162>\
**Category:** Firestore\
**Tags:** troubleshooting\
**Created:** [August 13, 2025, 3:07pm UTC](https://community.firebasestudio.dev/t/firebase-admin-sdk/18162 "2025-08-13T15:07:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nkomarius](https://sea2.discourse-cdn.com/flex002/user_avatar/community.firebasestudio.dev/nkomarius/32/9913_2.png) [@Nkomarius](https://community.firebasestudio.dev/u/Nkomarius)\
**Post date:** [August 13, 2025, 3:07pm UTC](https://community.firebasestudio.dev/t/firebase-admin-sdk/18162/1 "2025-08-13T15:07:44Z")

</div>

I’m getting this error that can’t be resolved after dozens of attempts

Error: Firebase Admin SDK initialization failed: The FIREBASE\_SERVICE\_ACCOUNT\_KEY\_JSON\_BASE64 environment variable is not set.  
at initializeFirebaseAdmin

---

<div class="post-metadata">

**Author:** ![jamesor](https://sea2.discourse-cdn.com/flex002/user_avatar/community.firebasestudio.dev/jamesor/32/5600_2.png) [@jamesor](https://community.firebasestudio.dev/u/jamesor)\
**Post date:** [August 13, 2025, 4:56pm UTC](https://community.firebasestudio.dev/t/firebase-admin-sdk/18162/2 "2025-08-13T16:56:07Z")

</div>

Try asking Gemini for instructions when it fails to fix an error by itself. By explicitly asking for instructions, you may find there is a step or two Gemini couldn’t execute on it’s own and needs for the developer to take manual action on. Give this a try and let us know how it works out.

```plaintext
"Error: Firebase Admin SDK initialization failed: The FIREBASE_SERVICE_ACCOUNT_KEY_JSON_BASE64 environment variable is not set.
at initializeFirebaseAdmin"

Provide me with very detailed and easy to follow step-by-step instructions for how to resolve this error.

```
