Firebase functions deploy failed, the default service account does not exist

Cuong Huynh
Cuong Huynh
Published in
Nov 5, 2020

I have got this error message when deploying firebase function:

HTTP Error: 400, Default service account 'project-name@appspot.gserviceaccount.com' doesn't exist. Please recreate this account (for example by disabling and enabling the Cloud Functions API), or specify a different account.

The command used to deploy is:

firebase deploy --only functions

I have restored my default service account like this:

In case the service account is deleted in 30 days otherwise it is permanently removed.

There is no way to restore a deleted service account that has been permanently removed

Look at the right sidebar, you will find a input is “name” query, it is request name which has to follows the format projects/PROJECT_UID/serviceAccounts/ACCOUNT_UNIQUE_ID

  • PROJECT_UID: The firebase project ID.
  • ACCOUNT_UNIQUE_ID: The service account ID.

You can get the deleted service account ID from the Activity of GCP

Look at the activity “Delete service account” then click on the detail you can find the request name

Resources:

--

--

Cuong Huynh
Cuong Huynh

I’m a web developer from Saigon, Vietnam. I’ve been making website for about 6 years. My focus right now is Express, Reactjs, Nextjs, Hasura, Serverless.