1

I get the following Error when I try to use:

Firebase init

In my Angular App: Failed to list Firebase projects. See firebase-debug.log for more info.

I have set up serveral projects and I get the same error when I use

Firebase projects:list

I already tried solutions such as

login --reauth                 logout login

Thanks!

Here´s the debug.log: debug.log as image


[debug] [2020-07-21T14:09:20.588Z] ----------------------------------------------------------------------
[debug] [2020-07-21T14:09:20.590Z] Command:       C:\scoop\apps\nodejs-lts\current\node.exe C:\scoop\apps\nodejs-lts\current\bin\node_modules\firebase-tools\lib\bin\firebase.js init
[debug] [2020-07-21T14:09:20.590Z] CLI Version:   8.6.0
[debug] [2020-07-21T14:09:20.590Z] Platform:      win32
[debug] [2020-07-21T14:09:20.590Z] Node Version:  v12.18.2
[debug] [2020-07-21T14:09:20.592Z] Time:          Tue Jul 21 2020 16:09:20 GMT+0200 (GMT+02:00)
[debug] [2020-07-21T14:09:20.592Z] ----------------------------------------------------------------------
[debug] [2020-07-21T14:09:20.592Z] 
[debug] [2020-07-21T14:09:20.601Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
[debug] [2020-07-21T14:09:20.601Z] > authorizing via signed-in user
[info] 
     ######## #### ########  ######## ########     ###     ######  ########
     ##        ##  ##     ## ##       ##     ##  ##   ##  ##       ##
     ######    ##  ########  ######   ########  #########  ######  ######
     ##        ##  ##    ##  ##       ##     ## ##     ##       ## ##
     ##       #### ##     ## ######## ########  ##     ##  ######  ########

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

  C:\Users\s17QQIW\Desktop\csgombling@latest

[info] 
=== Project Setup
[info] 
[info] First, let's associate this project directory with a Firebase project.
[info] You can create multiple project aliases by running firebase use --add, 
[info] but for now we'll just set up a default project.
[info] 
[debug] [2020-07-21T14:09:48.497Z] > refreshing access token with scopes: ["email","https://www.googleapis.com/auth/cloud-platform","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","openid"]
[debug] [2020-07-21T14:09:48.497Z] >>> HTTP REQUEST POST https://www.googleapis.com/oauth2/v3/token  
 <request body omitted>
[debug] [2020-07-21T14:09:48.611Z] 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
[debug] [2020-07-21T14:09:48.725Z] FirebaseError: 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
    at Object.<anonymous> (C:\scoop\persist\nodejs-lts\bin\node_modules\firebase-tools\lib\auth.js:23:32)
    at Module._compile (internal/modules/cjs/loader.js:1138:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
    at Module.load (internal/modules/cjs/loader.js:986:32)
    at Function.Module._load (internal/modules/cjs/loader.js:879:14)
    at Module.require (internal/modules/cjs/loader.js:1026:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at Object.<anonymous> (C:\scoop\persist\nodejs-lts\bin\node_modules\firebase-tools\lib\commands\login.js:20:14)
    at Module._compile (internal/modules/cjs/loader.js:1138:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
    at Module.load (internal/modules/cjs/loader.js:986:32)
    at Function.Module._load (internal/modules/cjs/loader.js:879:14)
    at Module.require (internal/modules/cjs/loader.js:1026:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at loadCommand (C:\scoop\persist\nodejs-lts\bin\node_modules\firebase-tools\lib\commands\index.js:5:19)
    at module.exports (C:\scoop\persist\nodejs-lts\bin\node_modules\firebase-tools\lib\commands\index.js:89:20)
[error] 
[error] Error: Failed to list Firebase projects. See firebase-debug.log for more info.


lordfungus
  • 13
  • 1
  • 4
  • You don't have to use an image. You can copy the relevant text directly into the question so it's easier to read and search. – Doug Stevenson Jul 22 '20 at 06:23
  • The debug log was always considered to be code, so I wasnt allowed to post with it inside. – lordfungus Jul 22 '20 at 06:27
  • So you're saying you're not allowed to paste code into a Stack Overflow question? – Doug Stevenson Jul 22 '20 at 06:34
  • The debug.log is not really code, but in the question it is recoginzed as code and therefore I am not allowed to post it. (Edit:) I highlighted it as code in order to be able to post it, if that is ok? – lordfungus Jul 22 '20 at 06:56
  • If you took the advice of the error message and ran `firebase login --reauth`, but it still doesn't work, then you should contact Firebase support for assistance. https://support.google.com/firebase/contact/support – Doug Stevenson Jul 22 '20 at 15:47

1 Answers1

1

Once you login there is a screen with a localhost url:

enter image description here

If I close the screen I get the same errors as you are getting. I logued out from firebase doing firebase logout and login again with firebase login. After, I left the screen with the successful login and the cli commands where working.

feralamillo
  • 819
  • 8
  • 10