firebase-tools icon indicating copy to clipboard operation
firebase-tools copied to clipboard

Errors when trying to deploy cloud functions

Open slinkstep opened this issue 6 years ago • 17 comments

[REQUIRED] Environment info.

firebase-tools: 8.12.1

Platform: macOS 10.14.6

[REQUIRED] Test case

  1. Run: firebase deploy --only functions:[functionName]

[REQUIRED] Steps to reproduce

  1. Run: firebase deploy --only functions:[functionName]

[REQUIRED] Expected behavior

Deploy the function to the firebase project

[REQUIRED] Actual behavior

Since yesterday I have got different errors:

  • Error: Server Error. connect ETIMEDOUT 172.217.28.106:443

11334d72-1891-4a2c-87e4-20f8a943bf5d

  • Error: Could not read public directory. Remove links and shortcuts and try again.

When put the debug flag I got this information too:

ec11b907-c465-4e63-bafb-359663682e0b

f953ea34-3693-4a77-a7a2-570bc46724ad

I tried to run firebase logout and firebase login again and sometimes the login process gave me errors too:

Screen Shot 2020-10-12 at 10 15 40 AM

slinkstep avatar Oct 12 '20 16:10 slinkstep

This issue does not seem to follow the issue template. Make sure you provide all the required information.

google-oss-bot avatar Oct 12 '20 16:10 google-oss-bot

@slinkstep see these similar issues: https://github.com/firebase/firebase-tools/search?q=ETIMEDOUT&type=issues

Unfortunately there is nothing we can do about ETIMEDOUT, it happens when you have a slow or flaky internet connection. I know it's super frustrating but it's not something we can fix within the CLI.

samtstern avatar Oct 12 '20 16:10 samtstern

It's happening to all team members and we have stable connections

slinkstep avatar Oct 12 '20 16:10 slinkstep

@slinkstep hmmm now that I am looking at your screenshot I see two different errors:

  1. ETIMEDOUT
  2. input source must be valid Stream or Buffer instance

Which one is the one that's happening to your whole team?

samtstern avatar Oct 12 '20 16:10 samtstern

Both of them, as I said, they are random when we try to deploy. Right now we are getting ETIMEDOUT when we use firebase deploy --only functions:XXXX but if we run: gcloud functions deploy XXXXXX it works perfectly

slinkstep avatar Oct 12 '20 16:10 slinkstep

Hmmmm ok the fact that it works with gcloud is fishy. Re-opening.

samtstern avatar Oct 12 '20 17:10 samtstern

Any updates ? I haven't been able to deploy any function yet

slinkstep avatar Oct 13 '20 22:10 slinkstep

@samtstern I'm also getting:

!  functions[app(us-central1)]: Deployment error.
Build failed: Build error details not available. Please check the logs at <URL_REDACTED>


Functions deploy had errors with the following functions:
        app


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.

aravindvnair99 avatar Oct 14 '20 17:10 aravindvnair99

To add to @aravindvnair99 comment I also have started experiencing this recently with no change to the code.

Functions deploys started to fail intermittently from 03/10/2020.

When deploying I get the same error as above for random functions each deploy. Following the link to the logs the console returns: DENIED: Unable to write blob. This can be resolved by clearing the image for the failed function and redeploying. However it continues to fail on subsequent builds this is happening > 33% of the time.

I am using the Node 12 image it seem to be more reliable with Node 8 however this is now deprecated.

nikglavin avatar Nov 02 '20 20:11 nikglavin

To add to @aravindvnair99 comment I also have started experiencing this recently with no change to the code.

Functions deploys started to fail intermittently from 03/10/2020.

When deploying I get the same error as above for random functions each deploy. Following the link to the logs the console returns: DENIED: Unable to write blob. This can be resolved by clearing the image for the failed function and redeploying. However it continues to fail on subsequent builds this is happening > 33% of the time.

I am using the Node 12 image it seem to be more reliable with Node 8 however this is now deprecated.

@nikglavin Yes, each time what I am doing now is that I go to the GCP console and then clear the entire bucket. Then it works and fails again sometime down in the future in a few days. It's become a continuous cycle now. I even tried setting life cycle to 1 day and it didn't help. I am using Node 10.

aravindvnair99 avatar Nov 02 '20 22:11 aravindvnair99

@aravindvnair99 which bucket are you clearing? the archive bucket? I'm having he same issue with a handful of my functions now.

joerozek avatar Nov 09 '20 21:11 joerozek

@aravindvnair99 which bucket are you clearing? the archive bucket? I'm having he same issue with a handful of my functions now.

@joerozek I was clearing the artifacts bucket.

aravindvnair99 avatar Nov 11 '20 20:11 aravindvnair99

Also experiencing the same issue. Clearing the articacts bucket seems to help but only until the next deploy.

hosaka avatar Feb 23 '21 12:02 hosaka

Also experiencing the same issue. Clearing the articacts bucket seems to help but only until the next deploy.

@hosaka I don't seem to be facing issues anymore. But as mentioned in my previous comments, I was facing the issue while deploying from the local system and CI server. I am currently using Node.js 12. I don't know if that helped. Previously I was on Node.js 10. Which version are you using?

Also, here's a thread I started long ago when this issue first came up: https://github.com/firebase/firebase-functions/issues/795

aravindvnair99 avatar Mar 01 '21 14:03 aravindvnair99

@samtstern I guess this issue can be closed as there have been no further reports since. And as for me, things are working fine now.

aravindvnair99 avatar Jul 05 '21 04:07 aravindvnair99

@aravindvnair99 thanks for following up!

samtstern avatar Jul 05 '21 07:07 samtstern

I ended up resolving this issue by deleting the entire bucket (not just its contents) and then redeploying the functions since then I have not seen the issue again

nikglavin avatar Jul 07 '21 10:07 nikglavin