firebasegoogle-cloud-functionsfirebase-tools

Can't deploy Cloud Functions because of "Unhandled error cleaning up build images"


I've deployed hundreds of function and this is the first time I encounter this issue. Simply, it stops deploying function process, saying:

Unhandled error cleaning up build images. This could result in a small monthly bill if not corrected. You can attempt to delete these images by redeploying or you can delete them manually at https://console.cloud.google.com/gcr/images/[project-name]/us/gcf

The way I deploy is through Firebase CLI command: firebase deploy --only functions:nameOfFunction

Question is what are those images I have to delete? Why? How can I solve it?


Solution

  • Cloud Functions uses another product called Cloud Build to build the server images that actually get deployed. Those images are stored in Cloud Storage, and that storage is billed to your account.

    Read more about it:

    Watch:

    You should be able to locate and delete the files manually in the Google Cloud console. But it sounds like there is a bug here with the files not being cleaned up automatically, so you contact Firebase support directly.