firebase-tools icon indicating copy to clipboard operation
firebase-tools copied to clipboard

Failed to authenticate, have you run firebase login?

Open Liker777 opened this issue 5 years ago • 4 comments

I cross reference this stackoverflow question also since it is not resolved yet.

firebase-tools:

Platform:

[REQUIRED] Test case

I am following instructions for Firebase functions. I have successful login from my console, however when I am trying to deploy functions, terminal gives an error: enter image description here

oleg@oleg-HP-EliteBook-8460p:~/Desktop/Oleg/projects/firebase-functions$ firebase login

Already logged in as [my user email]

oleg@oleg-HP-EliteBook-8460p:~/Desktop/Oleg/projects/firebase-functions$ sudo firebase deploy --only functions

Error: Failed to authenticate, have you run firebase login? (node:11224) MetadataLookupWarning: received unexpected error = Unsuccessful response status code. Request failed with status code 403 code = 403 Having trouble? Try firebase [command] --help

So the error is kind of controversial. Firstly, Firebase says that I am already successfully logged in. Right next, Firebase says that I am not logged in... I suspect there should be some setting for user name or something like that in kind of local firebase.json file or other files, but I didn't find it.. Or should I change something in the Firebase Console?

[REQUIRED] Steps to reproduce

[REQUIRED] Expected behavior

[REQUIRED] Actual behavior

Liker777 avatar Jun 18 '21 10:06 Liker777

This issue does not seem to follow the issue template. Make sure you provide all the required information.

google-oss-bot avatar Jun 18 '21 10:06 google-oss-bot

I filed the fields of the template by they disappear for some reason..

Liker777 avatar Jun 18 '21 10:06 Liker777

@Liker777 the difference is that you're running firebase login and then sudo firebase deploy. You should never need to use sudo with Firebase.

samtstern avatar Jun 18 '21 10:06 samtstern

@Liker777 the difference is that you're running firebase login and then sudo firebase deploy. You should never need to use sudo with Firebase.

Thanks a lot! Without sudo, it works differently.

Liker777 avatar Jun 18 '21 10:06 Liker777