The application could not connect to Google Cloud. This could be due to missing authentication credentials or an incomplete database setup in BigQuery.
Step 1: Authenticate Your Local Environment
gcloud auth application-default loginGCP_PROJECT=your-project-id-hereStep 2: Create BigQuery Dataset and Tables
If authentication is correct, the error might be that the required BigQuery tables do not exist. Go to the BigQuery SQL Workspace and run the queries found in the `docs/schema.sql` and `docs/data.sql` files to create and populate your tables.
If your local environment works but the deployed app fails, it's a permission issue. Your deployed app runs as a **service account**, which needs to be granted permission to access BigQuery.
To fix this, go to the IAM page in your Google Cloud Console and grant the following roles to your service account:
You can find your service account email on the IAM & Admin page. It usually looks like `firebase-app-hosting-backend@...` or `...-compute@developer.gserviceaccount.com`.