Firebase Error: The Entered Credentials Were Incorrect
Watch out if you've updated Firebase recently — you might get hit with this login error. Fortunately, there's a way to fix it.
Join the DZone community and get the full member experience.
Join For FreeI have been playing around with Firebase lately. If you don't know what it is, you should! In short, it is a set of services: Realtime Database, Storage, Static hosting, Authentication, and more. Free for the first 100 concurrent users. Check it out here .
Yesterday, as I was deploying a new version of a new project of mine, I got a message saying there was a new firebase-tools available. I, being the "if it works, an update will make it work better" kind of guy, immediately installed the update — which came with an interesting catch! I could no longer deploy my project. The error I got was this:
Error: The entered credentials were incorrect.
Well, that's easy! All I need to do is log in again. firebase login
didn't really help. I was already logged in. Logging out (firebase logout
) and logging back in didn't do the trick either.
I found this bug — https://github.com/firebase/firebase-tools/issues/166 — which describes my experience exactly, but it didn't help at all. My .firebaserc
file was configured correctly. Also, firebase list
displayed the right ID. So no luck here.
Running firebase deploy --debug
has made it clear why it doesn't work — it was trying to deploy to an old project ID, which I no longer use and was nowhere to be found in any of my configuration files. A problem!
The solution was found deep in the source code of firebase-tools (this file to be exact). Reading the source, it seems like there is an option to have more than one project ID to each project. And you can set which project you are using right now using the firebase use $projectId
command. Running this command with the correct project ID solved the problem.
So, in case you have the same problem:
- Check you are logged in correctly using
firebase login
- Check the project ID in the
.firebaserc
file andfirebase list
are correct. - run
firebase use projectId
- ??????
- Profit!
Published at DZone with permission of Raanan Weber, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.
Comments