0

I've set the env variables as defined in docs: firebase functions:config:set someservice.key="THE API KEY" someservice.id="THE CLIENT ID"

When functions.config() is called, the variables are not found(there is an outdated test-key), but the new config is not present. However, when I call firebase functions:config:get - I get the necessary object, with updated API keys.

What can I do to use env variables properly? The latest version of functions is deployed, but functions.config() is not updated, both locally and live.

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
Animus
  • 665
  • 12
  • 24
  • 1
    Hi @Animus, have redeploy functions after running the command? – Marc Anthony B Dec 20 '21 at 06:10
  • @MarcAnthonyB Yes, I've run the function after redeploying, but the config is still wrong. At this point, I've found that `config:set` is settings env variables for a particular namespace, so it seems like I might be using a different namespace to the one I'm setting variables for. – Animus Dec 20 '21 at 14:46
  • 1
    Could you please check this [thread](https://stackoverflow.com/questions/42841453/running-cloud-functions-locally-gives-error-functions-config-is-not-available) and see if it helps. Thank you. – Marc Anthony B Dec 21 '21 at 09:31
  • Thank you! I'm checking it for sure since this behavior is extremely strange... – Animus Dec 28 '21 at 07:23
  • @MarcAnthonyB Thank you, thank you, thank you! I was thinking that it takes the config from the deployed functions all the time!!!! – Animus Dec 28 '21 at 07:32

0 Answers0