Search code examples
google-cloud-platformfirebase-console

Add Firebase project to GCP project


I'm trying to add a Firebase project to an existing GCP project within our Enterprise GCP account.

I follow these steps (from this page: https://cloud.google.com/firestore/docs/client/get-firebase)

Add Firebase to your existing Google Cloud project:

a. Log in to the Firebase console, then click Add project.

b. Select your existing Google Cloud project from the dropdown menu, then click Continue.

c. (Optional) Enable Google Analytics for your project, then follow the prompts to select or create a Google Analytics account.

d. Click Add Firebase.

However on step b my existing GCP project is not listed, even though I have access to it and can open the GCP console. In the screenshot below you can see the message that it is loading my GCP projects, but the list is empty and no project names are returned.

Firebase create project screen

I tried the same with one of our enterprise admins, and he does see many projects listed which exist in our enterprise, but not my project.

Does anybody have some ideas of where we should start to troubleshoot this? Perhaps a property on the GCP project that needs to be set before it will appear in the Firebase project creation screen?


Solution

  • I found the issue. The Firebase Management API had been added to the GCP project without creating a Firebase project. When the Firebase management API has been added Firebase project creation screen assumes there is already a Firebase project so it doesn't show it in the list.

    Fix: disable the Firebase Management API, then the GCP project will be available from the Firebase project creation screen.

    Alternate fix (not tested): use the Firebase API method projects.addFirebase to add the project (https://firebase.google.com/docs/projects/api/reference/rest/v1beta1/projects/addFirebase).

    Credit - this redit post: https://www.reddit.com/r/googlecloud/comments/odpw2c/gcp_project_not_showing_up_on_firebase_console_or/