Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firebase Project Initialization Error: Failed to list available Google Cloud Platform projects

I am trying to set up an Ionic application to use an existing Firebase project and when running Firebase init in the windows console I get this message:

Error: Failed to list available Google Cloud Platform projects. See firebase-debug.log for more info.

The log shows a 401 error accessing the server.

like image 460
pasx Avatar asked Apr 12 '26 20:04

pasx


2 Answers

Why this happens is still not entirely clear to me. I used to be able to run this command from the windows console simply by running firebase login. But at least I found a workaround to solve the issue.

To fix it:

  • run Firebase login:ci which will, from the console open a browser window for you to log into the CI - Continuous Integration - server with your Google account

  • copy the token that is generated, something like 1//012abc345def...

  • in the console enter: set FIREBASE_TOKEN=1//012abc345def...

  • you can then run: firebase init --token "%FIREBASE_TOKEN%"

The set is necessary to register the token as an environment variable otherwise the process will fail at some point.

The syntax is only slightly different if you are using bash.

like image 148
pasx Avatar answered Apr 23 '26 04:04

pasx


Try to

firebase logout
firebase login
like image 33
Evgenii Vorobei Avatar answered Apr 23 '26 05:04

Evgenii Vorobei



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!