firebase-tools: `firebase deploy` failing across multiple projects

[REQUIRED] Environment info

firebase-tools: 9.10.2 (Issue is present irrespective of version)

Platform: Windows, Linux

[REQUIRED] Test case

Any project will work

[REQUIRED] Steps to reproduce

Deploying Node.js 14 projects are failing. I tried multiple projects across various environments.

[REQUIRED] Expected behavior

Should deploy

[REQUIRED] Actual behavior

i  functions: updating Node.js 14 (Beta) function app(us-central1)...

Functions deploy had errors with the following functions:
	app(us-central1)

To try redeploying those functions, run:
    firebase deploy --only "functions:app"

To continue deploying other features (such as database), run:
    firebase deploy --except functions

Error: Functions did not deploy properly.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 2
  • Comments: 32 (21 by maintainers)

Most upvoted comments

@aravindvnair99 you are a life saver! that totally worked , thanks so much . what a crazy issue, went down a rabbit hole thinking it was the m1 chip on my new mac. Can’t tell you how much I appreciate your help, spent like 4 hours on this the past 2 days.

@aravindvnair99 Thank you so much!

@taeold I have not been having deployment issues after removing the lifecycle policy I had set. And I agree, I feel even the other issues can be closed. In case anything comes up in future, I will comment here or open another issue tracker accordingly in the respective repository.

I think this issue shares the same problem as described in this stackoverflow question:

https://stackoverflow.com/questions/67338215/cloud-function-build-error-failed-to-get-os-from-config-file-for-image/67402286

Check out this response for explanation:

https://stackoverflow.com/questions/59937542/can-i-delete-container-images-from-google-cloud-storage-artifacts-bucket/67693952#67693952

tl;dr - Always delete container images from Cloud Container Registry directly. Don’t delete cache image layers stored in Cloud Storage - it will break your subsequent function deploys.

We realize that this is a very easy and confusing mistake to make, so we are working on a feature to automatically cleanup unused container images. Checkout https://github.com/firebase/firebase-tools/issues/3404 for status on this feature.

@aravindvnair99 ok great well appreciate that and hopefully the google folks fix this soon !

Thanks.

@aravindvnair99 ok great well appreciate that and hopefully the google folks fix this soon !

@aravindvnair99 you are a life saver! that totally worked , thanks so much . what a crazy issue, went down a rabbit hole thinking it was the m1 chip on my new mac. Can’t tell you how much I appreciate your help, spent like 4 hours on this the past 2 days.

@seanpara Happy to help! I too spent a lot of time debugging the issue trying multiple things. I eventually figured it out after trial and error. I have raised a ticket with Firebase as well. Hopefully, it gets fixed soon. But until then, you can do this. They recommended lifecycle to 3 days. But that didn’t work for me either, so I left it as 0 which is what I was using. I sent them additional details and the MCVE. Waiting to hear back from them. I’ll update here accordingly.

Okay, I have managed to deploy. I deleted us.artifacts.<project name here>.appspot.com on my new project and now I am able to deploy properly. What would be a safe value for the lifecycle as I do not want to store the artifacts and incur unnecessary costs.

My other projects did have artifacts in them and some of the lifecycles were 15 days. But it didn’t deploy there too, but after I deleted the bucket entirely, it started deploying properly. So basically, I am deleting it in all my projects now to deploy.

I am curious as to why this is suddenly happening as it has never happened before.

I just tried making a new project and it worked fine there. Only my existing projects aren’t deploying. I had set the lifecycle of us.artifacts.<project name here>.appspot.com for all my projects to 0.

So to simulate the same effect, I went ahead and deleted the contents of that bucket for my new test project and now I am able to reproduce the issue. Previously this never used to happen, but for the last 24 hours or so, I have been facing this issue.