question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Deployed functions fails to read runtime config on Node 10

See original GitHub issue

Related 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:closed
  • Created 4 years ago
  • Reactions:27
  • Comments:39 (9 by maintainers)

github_iconTop GitHub Comments

12reactions
laurenzlongcommented, Mar 19, 2020

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!

10reactions
laurenzlongcommented, Mar 17, 2020

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:

  "engines": {
    "node": "8"
  }
Read more comments on GitHub >

github_iconTop Results From Across the Web

Firebase Cloud Functions Error - Cloud Runtime Config is ...
Firebase Cloud Functions Error - Cloud Runtime Config is currently experiencing issues, which is preventing your functions from being deployed.
Read more >
Migrating Cloud Functions to newer Node.js runtimes
To run your older Node. js functions in the Node. js 10 runtime (and higher), you might need to make changes to any...
Read more >
Azure Functions runtime versions overview
Azure Functions supports multiple versions of the runtime. Learn the differences between them and how to choose the one that's right for ...
Read more >
AWS Lambda function errors in Node.js
This page describes how to view Lambda function invocation errors for the Node.js runtime using the Lambda console and the AWS CLI.
Read more >
Manage functions | Cloud Functions for Firebase - Google
To solve this, deploy functions in groups of 10 or fewer. ... Firebase SDK for Cloud Functions 2.0.0 and higher allows a selection...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found