Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

firebase cli login failed

HA3
Bronze 1
Bronze 1

getting this error when i try to login into firebase cli

"

Oops!

Firebase CLI Login Failed

The Firebase CLI login request was rejected or an error occurred. Please run firebase login again or contact support if you continue to have difficulty logging in.

" i was trying to deploy a cloud function with this command firebase deploy --only functions and in response i got some permission error and to solve them i log out from firebase and then tried to log in again i got the above error and i have even installed gcloud too at that time i thought maybe there is conflict between these two i deleted the gcloud and even deleted the firebase cli tool as well and reinstalled and tried the following solutions as well but off no use

firebase login --no-localhost

firebase login --reauth

export NODE_TLS_REJECT_UNAUTHORIZED=0

and the solution available on this link  https://www.googlecloudcommunity.com/gc/Serverless/Unable-to-login-to-CLI-after-getting-The-caller-d...

and on firebase login --debug i got these error on my terminal

takrabal@takrabal-T490s:~$ firebase login --debug
i Firebase optionally collects CLI and Emulator Suite usage and error reporting information to help improve our products. Data is collected in accordance with Google's privacy policy (https://policies.google.com/privacy) and is not used to identify you.

? Allow Firebase to collect CLI and Emulator Suite usage and error reporting
information? Yes
i To change your data collection preference at any time, run `firebase logout` and log in again.

Visit this URL on this device to log in:
https://accounts.google.com/o/oauth2/auth?client_id=563584335869-fgrhgmd47bqnekij5i8b5pr03ho849e6.ap...

Waiting for authentication...
[2025-02-18T18:19:33.832Z] >>> [apiv2][query] POST https://accounts.google.com/o/oauth2/token [none]
[2025-02-18T18:19:33.834Z] >>> [apiv2][body] POST https://accounts.google.com/o/oauth2/token [omitted]
[2025-02-18T18:19:34.293Z] *** [apiv2] error from fetch(https://accounts.google.com/o/oauth2/token, {"headers":{},"method":"POST","body":{"_overheadLength":543,"_valueLength":208,"_valuesToMeasure":[],"writable":false,"readable":true,"dataSize":0,"maxDataSize":2097152,"pauseStreams":true,"_released":true,"_streams":[],"_currentStream":null,"_insideLoop":false,"_pendingNext":false,"_boundary":"--------------------------843453860164928532261900","_events":{},"_eventsCount":1}}): FetchError: request to https://accounts.google.com/o/oauth2/token failed, reason:
[2025-02-18T18:19:34.294Z] Token Fetch Error: FirebaseError: Failed to make request to https://accounts.google.com/o/oauth2/token
at RetryOperation._fn (/home/takrabal/.nvm/versions/node/v20.18.3/lib/node_modules/firebase-tools/lib/apiv2.js:261:31)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Authentication Error: Your credentials are no longer valid. Please run firebase login --reauth

For CI servers and headless environments, generate a new token with firebase login:ci
[2025-02-18T18:19:34.302Z] >>> [apiv2][query] POST https://auth.firebase.tools/attest [none]
[2025-02-18T18:19:34.303Z] >>> [apiv2][body] POST https://auth.firebase.tools/attest {"session_id":"647031e9-47e2-484b-bd9c-5362c4bf78ae"}
[2025-02-18T18:19:35.310Z] <<< [apiv2][status] POST https://auth.firebase.tools/attest 200
[2025-02-18T18:19:35.311Z] <<< [apiv2][body] POST https://auth.firebase.tools/attest {"token":"z5pmO2ga0bePDjiF74CwnxCbGChr8Qt_j3A5mCCik6E"}

 

0 1 395
1 REPLY 1

Hi @HA3

Welcome to Google Cloud Community!

I understand that you are getting an error when you try to login into Firebase CLI. Since you tried some of the solutions available, may I know if you are using any proxy or VPN? If there is, can you try to temporarily turn it off. Also, please try to use a different network connection and machine and try again.

If the issue still exists, what I recommend is to reach out or file a case to Firebase Contact Support as they have the right resources and tools to check and review your project.

Was this helpful? If so, please accept this answer as “Solution”. If you need additional assistance, reply here within 2 business days and I’ll be happy to help.