Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTTP Error: 401, The entered credentials were incorrect. Firebase Cloud Function

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?

like image 919
Siddhpura Amit Avatar asked Aug 06 '17 08:08

Siddhpura Amit


1 Answers

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.

like image 156
Tolbxela Avatar answered Sep 22 '22 17:09

Tolbxela