Migrating my app with mock data to firestore

Hi guys I am not a coder, I created my app with firebase studio the app is now complete but with mock data and not connected to a database. I thought the database creation would happen automatically as I build out my app. But it seams not to have done that. Is there a tutorial or an explanation on how to connect your app in firebase studio to firestore.

2 Likes

This an announced feature at the last Google I/O. I remind them saying that it’s supposed to be rollout “in the coming weeks”. I’m also waiting for this. Anyone has more info ?

I am also trying to connect to Firestore.

I think I got the right roles configured in IAM for the service account for my app. I am now getting this error: Error: Firebase Admin SDK Initialization Failed: Cannot read properties of undefined (reading ‘INTERNAL’). Check server logs for details.

*“When you call admin.initializeApp() (with no arguments), the Firebase Admin SDK uses Application Default Credentials (ADC). It automatically discovers the service account associated with the environment it’s running in.” - Mr AI

My the call admin.initializeApp() return some fictitous serivce account according to the logs.

I have a ticket with support for this. Waiting to hear back.

Go to the firebase console and select a firestore db and create it. It will tell you how to initialise the DB in your app. Gemini will help you link the DB to the app and write your data to the firestore. In the Console as you create the DB there are some videos to help.

1 Like