Deployed functions fails to read runtime config on Node 10
See original GitHub issueRelated issues
https://github.com/firebase/firebase-functions/issues/433
[REQUIRED] Version info
node: 10.16.0
firebase-functions: 3.3.0
firebase-tools: 7.15.0
firebase-admin: 8.10.0
[REQUIRED] Test case
I tried to create reproduction in repo https://github.com/FredyC/firebase-functions-repro Unfortunately, it behaves correctly I did not found any difference from my broken project.
[REQUIRED] Steps to reproduce
See above
[REQUIRED] Expected behavior
To have a deployed function that can read a runtime config.
[REQUIRED] Actual behavior
We have like 15 functions deployed in production and they are running smoothly for several months now. They are all Node 10 functions.
Today, I needed to tweak one function a little, I’ve deployed it (with --only
flag) and suddenly that one function is unable to read runtime config, it’s always undefined.
In the console log, I’ve noticed the warning
Warning, FIREBASE_CONFIG and GCLOUD_PROJECT environment variables are missing. Initializing firebase-admin will fail
I assume it’s major culprit if this issue, however considering that I have dependencies of the exact same version in a project and in reproduction repo then I don’t follow what this warning depends on.
Were you able to successfully deploy your functions?
Functions do deploy, but fail in runtime when reading functions.config()
.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:27
- Comments:39 (9 by maintainers)
Hey everyone, thanks for the patience. We’ve discovered the root of the problem, and it’s due to a rollout of build packs for the Node 10 runtime. (That’s why only some functions experience the issue, and not others) We’ve asked the team to start ramping down the rollout, so in the next few hours, the feature will be fully ramped down. The SDK fix has been made in https://github.com/firebase/firebase-functions/pull/634. In the meanwhile, the quickest way to get your functions to work again is to revert to Node 8 (see my comment above). Thanks again for bearing with us!
Thanks for the report everyone, for now, please revert to using Node 8. We will continue to investigate and make a fix to Node 10.
To revert to Node 8, edit the “engines” field in package.json: