Firebase-tools: functions:config:set does not allow numeric values

Created on 5 May 2017  Â·  2Comments  Â·  Source: firebase/firebase-tools

Setting a numeric value in cloud functions config is not allowed in version 3.7.0 but it was possible up until 3.6.1

$ firebase functions:config:set sync.threshold=3600000
i  runtimeconfig: ensuring necessary APIs are enabled...
✔  runtimeconfig: all necessary APIs are enabled

Error: HTTP Error: 400, Invalid value at 'variable.text' (TYPE_STRING), 3600000

And I get the error even when trying to wrap the value in quotes.

$ firebase functions:config:set sync.threshold="3600000"
i  runtimeconfig: ensuring necessary APIs are enabled...
✔  runtimeconfig: all necessary APIs are enabled

Error: HTTP Error: 400, Invalid value at 'variable.text' (TYPE_STRING), 3600000

Having trouble? Try firebase functions:config:set --help

Submitting string values in configuration works.

$ firebase functions:config:set sync.threshold="foo"
i  runtimeconfig: ensuring necessary APIs are enabled...
✔  runtimeconfig: all necessary APIs are enabled
✔  Functions config updated.

Reverting to 3.6.1 allows me to deploy configuration with numeric values again.

Most helpful comment

Thanks for the report @DennisAlund ! It seems like this PR (https://github.com/firebase/firebase-tools/pull/279) caused the regression. I will work on a fix.

All 2 comments

Thanks for the report @DennisAlund ! It seems like this PR (https://github.com/firebase/firebase-tools/pull/279) caused the regression. I will work on a fix.

Was this page helpful?
0 / 5 - 0 ratings