Firebase init error: Unable to authorize access to project [PROJECT ID]

error invalid project selection please verify project
firebase login syntax error
firebase projects list
firebase pull project
firebase reauth
firebase command requires scopes
error: authentication error: your credentials are no longer valid please run firebase login --reauth
paste authorization code here

I'm trying to initialize firebase functions for an iPhone app.

I have two separate accounts that I have different firebase projects on.

I ran firebase init, but I get an error

Error: Unable to authorize access to project[PROJECT ID]

where the project ID is a project id for a project in the account im not using.

I used

Firebase use --add

and it worked perfectly.

I ran

Firebase list

and the project I want to init is listed there. But when I ran the init again I got the same error with the wrong project ID still.

ps. the other project ID doesn't come up in Firebase list

EDIT: I logged out of the different account and am logged into the correct account.

You should check the alias. Aren't you just setting your project for staging? After Firebase use --add, you should do like

What alias do you want to use for this project? (e.g. staging) default

and also

What alias do you want to use for this project? (e.g. staging) dev

In other words, you have to switch all the alias to the project you re trying to use.

This worked for me!

step 5 doesn't work with firebase version 3.10.0 · Issue #241 , You should check the alias. Aren't you just setting your project for staging? After Firebase use --add, you should do like. What alias do you want to use for this  Try running this after you go through your firebase init. firebase use --add From there you can select your instance, for example: your-project-name-instance I had the same issue, and running that command and selecting the instance allowed me to do the deploy.

Firebase login to the account that has the project.

Error: Authentication required · Issue #160 · firebase/firebase-tools , I ran firebase init, but I get an error Error: Unable to authorize access to project[​PROJECT ID] where the project ID is a project id for a project in the account im not  Ok, I ended up upgrading nodejs on my windows laptop and firebase list did show my projects. But when I run firebase deploy I get: Error: Unable to authorize access to project milohas. Note: This version of the Firebase CLI is only compatible with projects upgraded to the new Firebase Console. To access firebase.com apps, you will need to

If you're switching between two Google accounts, you have to firebase logout from one and firebase login to the other before you can access the projects in those different accounts.

Get started with Firebase Hosting, I kept getting the error "Unable to authorize access to project" after Once I reverted to an older version of firebase 3.9.0 everything worked as expected. I solved with firebase init without overwrite the init files and done! firebase serve --project projectID mentioned by @WolfVic is a working solution  A bit of background first; I've got a PHP-based app which handles the Google OAuth flow and stores the resulting access token in a database. I am able to use this access token perfectly fine in another PHP script, so I don't think the token has expired. The problem comes when I try to use the access token in a node.js script.

Firebase CLI reference, Hi, I recently upgraded to the new Firebase console however when One final thing to check is to make sure that you are deploying to the project id not the subdomain of your app. Error: Unable to authorize access to project milohas I removed firebase.json and .firebaserc and ran firebase init again. Complete the steps listed on the Hosting Get Started page, which include installing the Firebase CLI and connecting your local project to your Firebase project. Serve and test your Firebase project locally (optional) You can view and test your Firebase project on locally hosted URLs before deploying to production.

Creating and enabling service accounts for instances, Step 2: Initialize your project. To connect your local project to your Firebase project, run the following command from the root of your local project directory: firebase  I have the same email address for Firebase Account, Firebase Project, AdMob Account and Google Analytics Account. Also, I have the Admin role in all those accounts and services. Here is the Error: Can't link to this Firebase project. Make sure you have sufficient permissions and try again. Here is the screenshot of the error:

Build a Role-based API with Firebase Authentication, Regardless of how you install the CLI, you have access to the same functionality and You establish a project directory using the firebase init command. This means that you'll be able to access your hosted content from your computer's seconds per user might help to resolve the Cloud Functions 429 error cited above. Currently firebase init functions sets this field to 8, which is the recommended Node version for most deployments. Set timeout and memory allocation. In some cases, your functions may have special requirements for a long timeout value or a large allocation of memory.

Comments
  • You could try this one. Http Error: 401
  • I'm in the account that has the project
  • Yes, I did that