It seems that Firebase App Hosting is temporarily borked. This means that setting up a new Firebase App Hosting backend with automatic rollouts (build/run) is likely to fail. It seems to be an issue with the service accounts Firebase is setting up for you automatically.

Errors for me look like:

  • Looks like your build failed.
  • The service account running this build does not have have permissions to write logs to Cloud Logging

The first symptom of this was that my new builds were all failing repetedly, and checking the logs showed that even the Logging permissions were missing.

The Firebase App Hosting Fix

If you are getting these types of errors, you need to fix the Service Accounts in https://console.cloud.google.com/iam-admin/serviceaccounts.

For example. I ensured there was a service account called firebase-app-hosting-compute@<project>.iam.gserviceaccount.com and gave it the following permissions:

  • Developer Connect Read Token Accessor (Beta)
  • Firebase Admin SDK Administrator Service Agent
  • Firebase App Hosting Compute Runner (Beta)

With these new permissions, I was able to run rollouts and they automatically executed perfectly.