The project at the top of the page is munistack-w5e2c, the firebaserc file is showing the correct project, munistack-d7a84, the terminal is showing the correct active project: munistack-d7a84
I’ve tried resetting the VM, closing all windows. I’ve even deleted the w5e2c project and it’s still there.
Same here. What I realized:
- I went through prototyping
- When needed, build a Firebase project, storage, firestore, authentication and put all keys do .env.local file
- When ready to publis, Firebase Studio insists to build a new Firebase Project for App Hosting.
I could not set to publish to MY project. Defeated, I configured all again in the Studio created project and changed values in .env.local
You recreated your entire project to solve it is that what you’re saying? I’m a bit too far to do that. I have cloud functions, database is setup, indexes, etc.
Yes. I did it. But I had just started. Had to recreate auth, storage, firestore, indexes, etc. So, from now on, I will start a new project, publish it after the first prompt and then continue to build and setup stuff.
Facing the same problem too, is there no way around this. Doesn’t look good to have two projects managing one app, the one created by firebase studio is hosting and the one i created is doing the rest: db, storage etc
Same issue.
As a workaround: I am sort of brute forcing things in the terminal to publish to the right project. This uses the below code, and the following google documentation.
-
Create Credentials for Service Account - this article includes steps to create the service principal and other auth options.
Note: The Json file will be generated here and ensure this file is a part of .gitignore and pass its full path to below code. -
Ensure the roles, for the services you use, are assigned to the IAM account (under Manage roles or edit IAM account). - Dont Skip
-
run commands to export the environment variable and activate the IAM account in firebase studio
export GOOGLE_APPLICATION_CREDENTIALS=“/home/user/myapp/path_to_json_credentials_file.json” && gcloud auth activate-service-account --key-file=/home/user/myapp/path_to_json_credentials_file.json
- successful output::
Activated service account credentials for: \[firebase-your-account@studio-your-project-name-1234.iam.gserviceaccount.com\]
- run command to set the project:
gcloud config set project studio-your-project-name-1234
- successful output::
Updated property \[core/project\].
- run following commands to build and deploy your [flutter] web app (–only flag is optional; omit if deploying all services for [flutter] web app):
flutter build web
firebase deploy --only hosting --project studio-your-project-name-1234
Troubleshooting:
sometimes a screen will appear to complete the auth flow with a check box. If so, complete this screen.
Would be great to hear how others are solving this. Hope this helps.

