21

Whenever I use following command in terminal (mac os sierra)

firebase init

below three option will be displayed

❯◯ Database: Deploy Firebase Realtime Database Rules
 ◯ Functions: Configure and deploy Cloud Functions
 ◯ Hosting: Configure and deploy Firebase Hosting sites

If I select nothing and press Enter

I will get below message

First, let's associate this project directory with a Firebase project.
You can create multiple project aliases by running firebase use --add, 
but for now we'll just set up a default project.

i  .firebaserc already has a default project, skipping

i  Writing configuration info to firebase.json...
i  Writing project information to .firebaserc...

✔  Firebase initialization complete!

But when I select second option

◯ Functions: Configure and deploy Cloud Functions

I will get below message

First, let's associate this project directory with a Firebase project.
You can create multiple project aliases by running firebase use --add, 
but for now we'll just set up a default project.

i  .firebaserc already has a default project, skipping

=== Functions Setup

A functions directory will be created in your project with a Node.js
package pre-configured. Functions can be deployed with firebase deploy.


Error: HTTP Error: 401, The entered credentials were incorrect.
Amits-MacBook-Pro:firebase-functions Amit$ 

I have tried with firebase logout and then firebase login again but same error is coming

I have also used firebase list

I got below warning and then I got list of project

Amits-MacBook-Pro:firebase-functions Amit$ firebase list Warning: advanced compression encodings unavailable without ES6/C++11. Falling back to gzip.

Since long time ago I have used firebase function with another google login, now I am logout from that and started to login with different google login account but unable to do it, if I login with previouse google login still it's not working

I have also check directory where I have used firebase init no files are creating in that directory.

In demo of Firebase function they have shown that some files are created

https://www.youtube.com/watch?v=EvV9Vk9iOCQ&t=308s

Should I uninstall firebase and install it again? if yes, just let me know how to uninstall?

Siddhpura Amit
  • 14,534
  • 16
  • 91
  • 150

1 Answers1

85

I had the same Firebase Error: "HTTP Error: 401, The entered credentials were incorrect" when I was authenticated with the wrong Google account. I did firebase login --reauth and logged in with the right account. After that, the project was successfully deployed.

Tolbxela
  • 4,767
  • 3
  • 21
  • 42
  • Already done but still not done :( Might be problem with Firebase CLI – Siddhpura Amit Aug 26 '17 at 10:31
  • 4
    thank gods for people like you... this solved my issue and I would've spent ages trying to figure it out since the error is apparently caused by their very own update, and the error message directs us to a link that has NOTHING TO DO with the issue. – pete Nov 14 '18 at 06:08
  • 3
    you saved me bro – Dani Nov 21 '18 at 08:43
  • 2
    Thanks - had just logged in, but the --reauth was necessary. Thank you! – Matt Habermehl Sep 28 '19 at 12:02
  • 2
    Answer did not help the person who originally asked, so wasn't marked as correct, but it did help a lot of others, including me. Thanks! – DaReal Sep 28 '19 at 16:41
  • 2
    Now, Marked as correct, because it is helpful for lots of person, now everything is updated and I am also not getting same issue :) any way thanks to all of you – Siddhpura Amit Apr 18 '20 at 12:20