firebase deploy command seems to be targeting a different project than configured

Hello, first time poster 👋

I'm attempting to deploy cloud functions to a firebase project.

A little bit of background:
* At one point, this project was linked to a different firebase project, let's call that `old-name`
* The `old-name` project was deleted and replaced with a new firebase project, let's call that `new-name`

For some reason, though I can find no reference to `old-name` anywhere in my project's config, when I attempt to execute `firebase deploy --only functions`, I get the following error (NOTE: References to 'old-name' in service account and link at bottom):

 

> firebase deploy --only functions

Error: Missing permissions required for functions deploy. You must have permission iam.serviceAccounts.ActAs on service account old-name@appspot.gserviceaccount.com.

To address this error, ask a project Owner to assign your account the "Service Account User" role from this URL:

https://console.cloud.google.com/iam-admin/iam?project=old-name

 

So far, I have tried deleting the firebase CLI and reinstalling, same issue.

Any help would be greatly appreciated.

Here is the output of some other commands, which correctly see the new projects/names:

 

> firebase projects:list
✔ Preparing the list of your Firebase projects
┌──────────────────────┬───────────────┬────────────────┬──────────────────────┐
│ Project Display Name │ Project ID    │ Project Number │ Resource Location ID │
├──────────────────────┼───────────────┼────────────────┼──────────────────────┤
│ New Name - Dev       │ new-name-dev  │ 000000000000   │ us-central           │
├──────────────────────┼───────────────┼────────────────┼──────────────────────┤
│ New Name - Prod      │ new-name-prod │ 000000000000   │ [Not specified]      │
└──────────────────────┴───────────────┴────────────────┴──────────────────────┘

2 project(s) total.

 

 This command however, is looking for the old project:

 

> firebase functions:config:get

Error: HTTP Error: 403, Project 'old-name' not found or permission denied.
Help Token: ARqICROGMtW70CntpQaFBYX2akM9NIIadf11qwjYUpLXn81qU5b7CCYbXNHt4BP0RY7c7LlZQO-JDfoAZIl4BTvb6KlBx_HLuQf2VMKMphKy3-rj

 

Solved Solved
0 1 534
1 ACCEPTED SOLUTION

This article helped me to resolve the issue.

I was able to do `firebase use --add` and setup the new project. Then the deploy step worked 🎉

View solution in original post

1 REPLY 1

This article helped me to resolve the issue.

I was able to do `firebase use --add` and setup the new project. Then the deploy step worked 🎉