Firebase-tools: firebase init error even though I reauthenticated

Created on 12 Jun 2017  路  16Comments  路  Source: firebase/firebase-tools

Error: 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

C:\Oracle\tester>firebase login --reauth
? Allow Firebase to collect anonymous CLI usage information? No

Visit this URL on any device to log in:
https://accounts.google.com/o/oauth2/auth?client_id=563584335869-fgrhgmd47bqnekij5i8b5pr03ho849e6.apps.googleusercontent.com&scope=email%20openid%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcloudplatformprojects.readonly%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Ffirebase%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcloud-platform&response_type=code&state=320698024&redirect_uri=http%3A%2F%2Flocalhost%3A9005

Waiting for authentication...

C:\Oracle\tester>firebase init

 ######## #### ########  ######## ########     ###     ######  ########
 ##        ##  ##     ## ##       ##     ##  ##   ##  ##       ##
 ######    ##  ########  ######   ########  #########  ######  ######
 ##        ##  ##    ##  ##       ##     ## ##     ##       ## ##
 ##       #### ##     ## ######## ########  ##     ##  ######  ########

You're about to initialize a Firebase project in this directory:

C:\Oracle\tester

Before we get started, keep in mind:

  • You are currently outside your home directory

? Are you ready to proceed? Yes
? Which Firebase CLI features do you want to setup for this folder? Press Space to select features, then Enter to confirm your choices. Hosting: Configure and deploy F
irebase Hosting sites

=== Project Setup

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.

Error: 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

C:\Oracle\tester>

question

Most helpful comment

Had the same problem when running firebase deploy even after reauthenticating
I had VPN connected.

  • Disconnecting from the VPN worked for me

All 16 comments

this is also happening to me. (edit, this was because I used the project name, not the id).

I have the same issue. I get this message when running firebase init, but also with firebase list and any other command.

I can get the list command running, using firebase list --token "$FIREBASE_TOKEN". The init command however still crashes during initialization of the cloud functions folder.

hey @serdartkm I've had a similar or maybe the same issue also.

Here is what helped for me:
https://github.com/firebase/firebase-tools/issues/342#issuecomment-314994814

Add the --no-localhost flag, to see if it works for you, E.g:

firebase login:ci --no-localhost

The firebase SDK will also use your default gcloud credentials if you're using the google cloud sdk.
This file $PWD/application_default_credentials.json can be reset using gcloud auth application-default login

Hy i receive the message
Error: Authentication Error: Your credentials are no longer valid. Please run firebase login --reauth
and i just disable my antivirus (kaspersky) to able to run firebase deploy

This seems like there's a few solutions in this thread, but since there's been not a lot of recent activity, we're closing this bug.

If anyone is still having issues with authentication, please open a new bug with the appropriate information! Thanks!

You can logout with firebase logout and login in with firebase login. It solves the problem with ease.

Had the same problem when running firebase deploy even after reauthenticating
I had VPN connected.

  • Disconnecting from the VPN worked for me

Help, I need to use VPN because I'm in China and there is no way to connect to google services without VPN.. any suggestions ?

Sorry for the false alarm.. I found my problem is because I was behind Proxy. All I needed to do was just to disable Proxy from my System Preferences. Simple but crazy.. took my entire morning..

Sorry for the false alarm.. I found my problem is because I was behind Proxy. All I needed to do was just to disable Proxy from my System Preferences. Simple but crazy.. took my entire morning..

Hi, could you provide a specific instruction about how to disable Proxy in the System Preferences? Many thanks!

hey @Katherine2013 , which OS are you working with, by default, you may want to ensure you are not using a VPN at this stage.

Hi @lemndev , I'm with macOS and unfortunately I'm using VPN in China. I'm stuck with Firebase login right now. I believe the problem is from proxy settings. Is there anyway to solve it? Have tried many solutions but failed. Many thanks!

hey @Katherine2013 , personally i haven't used MacOS as a daily driver for even past 2 hours so i wouldn't lie that i know how to deal with that. I however landed on https://support.wickr.com/hc/en-us/articles/360008497154-Disabling-proxy-settings-on-macOS which i hope you find useful

@lemndev Will try. Thanks anyway. Hope you safe in this special period.

Was this page helpful?
0 / 5 - 0 ratings