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

Deployment error with no details after updating to Node 8 and firebase-tools@^4.0.0

Open jpreynat opened this issue 8 years ago • 113 comments

Version info

^4.0.0

Platform Information

Ubuntu 14.04.5 LTS (on Travis CI)

Steps to reproduce

firebase deploy --except hosting with lots of functions (in our case 52) running on Node 8 runtime.

Expected behavior

Before we updated firebase-tools to version 4 and higher (we had the exact same behavior for versions 4.0.0, 4.0.1 and 4.0.2) and using Node 8, updating correctly all of our cloud functions never failed. We expect it to continue since this happens when deploying our application in production.

Actual behavior

Since this update, there is always at least one or two functions that fail deploying with the following error:

⚠  functions[<our-function-name>(us-central1)]: Deployment error.
Build failed: Build error details not available

During the last deployment running with [email protected], 4 functions failed to update.

jpreynat avatar Aug 02 '18 16:08 jpreynat

Hi, I think the issue is likely due to the number of functions you are deploying, and not due to the firebase-tools version (you can of course test this by downgrading). Please deploy a subset of your functions at once instead of all of them, see https://firebase.google.com/docs/cli/#deploy_specific_functions

laurenzlong avatar Aug 02 '18 17:08 laurenzlong

getting the same error and only deploying 12 functions. Never had these deployment issues until upgrading to node 8.

..if there's a limit to the number you can deploy, shouldn't it be documented somewhere?

mlake avatar Aug 09 '18 12:08 mlake

Same here. Getting it when deploying only one function with node 8.

itaydressler avatar Aug 09 '18 14:08 itaydressler

Ok interesting, thanks for the additional datapoints. So it seems like it's not due to the new versions of firebase-tools per se, but due to deploying to Node 8 vs Node 6. (So using the same firebase-tools but deploying to Node 6 will reduce errors). I've filed a bug internally with the team responsible for the runtime.

laurenzlong avatar Aug 10 '18 21:08 laurenzlong

This is a pretty annoying bug. My function deployments fail 9 out of 10 times now it seems 😞. Glad to hear it's on peoples radar though. I'm moving back to Node.js 6 for now.

0x80 avatar Aug 13 '18 11:08 0x80

@jpreynat @0x80 Does the entire deployment fail or some functions deploy and some fail? (Investigating whether we should upgrade our 100+ functions to Node v8)

ahaverty avatar Aug 15 '18 09:08 ahaverty

@ahaverty In my case, this is only 3 or 4 functions on 52 that fail. But I'd rather have the deployment fail completely so all our application functions are always on the same version.

jpreynat avatar Aug 15 '18 11:08 jpreynat

@jpreynat I agree, we're running deploys via CI, and could live with complete fails but not partial. Thanks for confirming, I'm going to hold off upgrading until this is resolved.

ahaverty avatar Aug 15 '18 11:08 ahaverty

This is still happening and it affects our staging and production environments. We just redeployed the whole application a minute ago, and one of the function failed deploying for no apparent reason.

As @ahaverty also states, the CLI should at least rollback all functions that were successfully deployed to prevent instability in the whole application. @laurenzlong Do you have any update about the reason of the failure and an ETA for a fix release? We are about to deploy a critical update to production and need to be sure that it is either fully or not deployed at all, so we can relaunch it and the app won't crash.

jpreynat avatar Aug 16 '18 14:08 jpreynat

I would recommend deploying your functions in small groups or individually to minimize potential bad partial deploy states. Rollback is not a feature on the near-term horizon.

On Thu, Aug 16, 2018, 10:07 AM Johan Preynat [email protected] wrote:

This is still happening and it affects our staging and production environments. We just redeployed the whole application a minute ago, and one of the function failed deploying for no apparent reason.

As @ahaverty https://github.com/ahaverty also states, the CLI should at least rollback all functions that were successfully deployed to prevent instability in the whole application. @laurenzlong https://github.com/laurenzlong Do you have any update about the reason of the failure and an ETA for a fix release? We are about to deploy a critical update to production and need to be sure that it is either fully or not deployed at all, so we can relaunch it and the app won't crash.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/firebase/firebase-tools/issues/853#issuecomment-413557599, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAD_gn6e0hkZXlbiM_hv-oBf2T8_Iujks5uRXySgaJpZM4Vsn0E .

mbleigh avatar Aug 16 '18 16:08 mbleigh

I can confirm that I am also having this issue with Node 8. I will switch back to Node 6.

After switching to Node 8...

  1. ~3% invocation failure
  2. ~4x increased time to deploy
  3. ~80% deploy failure due to 2 of 24 functions failing to deploy

https://stackoverflow.com/questions/52056953/functions-issues-with-node-8-lts/52058796#52058796

I switched to Node 8 to gain access to the spread operator so I could build a library like this. I'm not sure if this is contributing to my lack of success with Node 8.

https://stackoverflow.com/questions/43486278/how-do-i-structure-cloud-functions-for-firebase-to-deploy-multiple-functions-fro/52056785#52056785

lukepighetti avatar Aug 28 '18 13:08 lukepighetti

I'm having the same issue on firebase-tools v4.2.1 using Node 8.

Downgrading back to Node 6 allowed me to deploy.

NEO97online avatar Sep 04 '18 10:09 NEO97online

@michaelauderer Same happening here. Seems to be flakey over the past few hours so it might be a cloud issue.

mulhoon avatar Sep 04 '18 10:09 mulhoon

@michaelauderer @mulhoon Same here with Node 8.

urkopineda avatar Sep 04 '18 11:09 urkopineda

I have the same issue, but it's weird because these very same functions (4 out of 4) used to deploy successfully yesterday.

yuliankarapetkov avatar Sep 04 '18 11:09 yuliankarapetkov

@yuliankarapetkov Yes, mine were working fine yesterday. FYI I've been installing node modules with yarn on node v8.9.4, then switching to node v9.4.0 and deploying. Seemed to be going well.

mulhoon avatar Sep 04 '18 11:09 mulhoon

Same here, but I had this working this morning, I think for our case, this is related to the GCF status right now: https://status.firebase.google.com/incident/Functions/18034 @mulhoon @yuliankarapetkov @urkopineda @michaelauderer

gautier-gdx avatar Sep 04 '18 12:09 gautier-gdx

woa I thought I'm the only one having this issue. How did you guys solve this?

jojonarte avatar Sep 04 '18 13:09 jojonarte

@jojonarte There is no quick fix currently, the current massive errors are due to the Firebase platform encountering a service disruption as stated by @gautier-gdx. However, we still have problems deploying all our functions at once with Node 8 when Firebase is up.

jpreynat avatar Sep 04 '18 13:09 jpreynat

@jojonarte the only resolution I found was to refactor back to Node 6, deploy an empty index.js to delete all functions (otherwise they remain Node 8 functions), and then deploy the Node 6 index.js

lukepighetti avatar Sep 04 '18 14:09 lukepighetti