Reputation: 12478
My Angular website, hosted on Firebase was getting charged for cloud storage since the beginning of this year, because of us.artifacts.<project-id>
bucket.
Yesterday, I checked the storage usage and found ~800MB+ data stored on cloud storage. The default bucket is empty and I've stored nothing on it. So all this 800MB storage is used by function builds.
I've 2 Node 10 functions (and 2 node 8 functions) in the project. Node 8 functions are deprecated but it's deployed last year. It won't use us.artifacts
bucket.
Following Doug's answer, and a comment,
The dates of the files correspond to the dates of deployment. It should not be hard to figure out which ones are old enough to delete. – Doug Stevenson Sep 15 '20 at 3:56
I deployed both functions yesterday and deleted the files dated before from the bucket. Since then, I'm not able to deploy both functions.
us.artifacts<project-id>
and gcf-sources-<id>
buckets from Google cloud. Then deployed the functions as new functions - failed.functions: Finished running predeploy script. functions: ensuring
required API cloudfunctions.googleapis.com is enabled... functions:
ensuring required API cloudbuild.googleapis.com is enabled...
functions: required API cloudbuild.googleapis.com is enabled
functions: required API cloudfunctions.googleapis.com is enabled
functions: preparing functions directory for uploading... functions:
packaged functions (39.63 KB) for uploading functions: functions
folder uploaded successfully functions: current functions in project:
sendEnquiryMessage(us-central1), ssr(us-central1) functions: uploading
functions in project: api(us-central1) functions: creating Node.js 10
function api(us-central1)... functions[api(us-central1)]: Deployment
error. Function failed on loading user code. This is likely due to a
bug in the user code. Error message: Error: please examine your
function logs to see the error cause:
https://cloud.google.com/functions/docs/monitoring/logging#viewing_logs.
Additional troubleshooting documentation can be found at
https://cloud.google.com/functions/docs/troubleshooting#logging.
Please visit https://cloud.google.com/functions/docs/troubleshooting
for in-depth troubleshooting documentation.Functions deploy had errors with the following functions:
api
The error on firebase console says failed to load user code.
I use CircleCI for CI/CD and even rerunning a previous successful workflow fails throwing this error.
Here's a screenshot from CircleCI rerunning previous workflow
Note: I'm using TypeScript for Cloud functions.
Upvotes: 4
Views: 783
Reputation: 12478
The issue is resolved. Here's the steps I followed.
us.artifacts.<project-id>
and gcf-sources-<id>
buckets from Storage.Function has been deployed successfully after the node version change.
Upvotes: 5