Cloud Function build error - failed to get OS from config file for image

12

I'm seeing this Cloud Build error when I try to deploy a Cloud Function:

"Step #2 - "analyzer": [31;1mERROR: [0mfailed to initialize cache: failed to create image cache: accessing cache image "us.gcr.io/MY_PROJECT/gcf/us-central1/SOME_KEY/cache:latest": failed to get OS from config file for image 'us.gcr.io/MY_PROJECT/gcf/us-central1/SOME_KEY/cache:latest'"

I'm able to build and emulate the cloud function locally, but I can't deploy it due to this error. I was able to deploy just fine until now. I've looked everywhere and I can't find any discussion about this. Anyone know what's going on here?

UPDATE: I deployed a new function 3 days ago and now I can't seem to deploy an update to it. I get the same error. I'm fairly sure this is happening due to the lifecycle rule I set up to ensure I don't keep storing images of functions: Firebase storage artifacts is huge and keeps increasing. This rule is important to keep around because I don't want to pay for unnecessary storage, but it seems like it might be the source of our problem here. Can someone from Google look into this?

Share
Improve this question
8
  • 1
    Can you share your language, the command line used and a minimal piece of code to reproduce the issue? – guillaume blaquiere Apr 30 at 18:48
  • I'm using Typescript. I just created a new function and that deploys fine. I updated this function and the update also deployed fine. However, when I try to update any of the functions I already have, it fails on all of them. Every single one. I don't know how to repro it, but it seems like the image for my existing functions that's stored in Firebase is somehow unable to be accessed. Any logs I can pull that would help? – Sameer Madan Apr 30 at 19:01
  • I'm using this command to deploy from CLI: firebase deploy --only "functions:myFunction" – Sameer Madan Apr 30 at 19:08
  • I commented out the source code for one of my existing functions, deployed it, effectively deleting it, then uncommented the source code, redeployed it, effectively re-creating it. That solved my problem and I can update this function now. However, this strategy doesn't work for any function that is actually being used in production. I'll literally need to delete and re-create it. I'd love to understand what's causing this problem in the first place. – Sameer Madan Apr 30 at 19:56
  • 1
    @GregFenton please upvote this issuetracker: issuetracker.google.com/issues/186832976 – policenauts May 3 at 17:25

Comments

Popular posts from this blog

Meaning of `{}` for return expression

Get current scroll position of ScrollView in React Native

flutter websocket connection issue