Hiya, amigo. Well, that “PERMISSION_DENIED” error kinda confirms it: the runtime identity lacks read/write rights over your Cloud Firestore resource.
In Google AI Studio Build Mode, the sandbox backend runs under a Google-managed infrastructure service account rather than your project’s default “App Engine/Compute” service account. If the automated link failed or permissions were reset, I’d try:
a. Checking the exact email of the service account logging the error in your sandbox runtime (it usually ends in gserviceaccount.com)
b. Going to “Google Cloud Console > IAM & Admin > IAM” in your application’s project.
c. Clicking Grant Access and add that service account email as a principal.
d. Assigning it the Cloud Datastore User (roles/datastore.user) or Firebase Admin SDK Administrator Service Agent role.
This cross-project IAM grant will keep the database, student’s data, and Free Tier untouched without requiring paid billing =)
My Google AI Studio sandbox runtime is currently using a Google-managed service account from a different infrastructure project.
Both official Firestore management API requests return:
HTTP 403 PERMISSION_DENIED
Therefore, I still cannot confirm whether the target Firestore database actually exists.
Before manually granting IAM permissions, I would like to clarify a few points:
Is this cross-project sandbox service account the expected runtime identity for Google AI Studio Build Mode?
Should Google AI Studio automatically provision the required IAM permissions when Firebase integration is enabled?
Is manually granting Cloud Datastore User to this infrastructure service account an officially supported and safe solution?
Could the Google AI Studio team verify whether the Firebase integration was provisioned correctly and restore the required permissions?
Would re-running Firebase provisioning risk creating a new database or modifying the existing Firebase configuration?
My application contains student information and learning results. I need to preserve the existing application, database configuration, and student data.
I would also like to remain on the free tier without enabling billing.
I can provide the Project ID, Database ID, and service account details privately to an authorized Google support representative.
Any guidance from the Google AI Studio team would be greatly appreciated.
Hi, Thank you for reporting this. We are looking into this issue. Could you please share your Google Cloud Project ID, Firestore Database ID, and AI Studio Applet ID via direct message?