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.

Setting functions config with array items

See original GitHub issue

Setting an array in the config produces a http error:

firebase functions:config:set intercom.admin_ids.0="989270" intercom.admin_ids.1="737963"
i  runtimeconfig: ensuring necessary APIs are enabled...
✔  runtimeconfig: all necessary APIs are enabled

Error: HTTP Error: 400, Precondition check failed.

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

I believe this was working beforehand but I don’t have proof. Setting the array intercom.admin_ids=["989270", "737963"] worked.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

8reactions
ahavertycommented, Mar 20, 2017

Okay, another update: I got it to work again, but had to go up a level:

firebase functions:config:set intercom_admin_ids.0="989270" intercom_admin_ids.1="737963"

(e.g. rather than going intercom>admin_ids)

One of my projects still has the old config with the array 3 levels down. It definitely looks like something changed since yesterday (Would appreciate acknowledgment of a remote change to reconfirm my sanity 😂). I’m just going to move things up a level, so workaround = found ✔

4reactions
mbleighcommented, Mar 20, 2017

We haven’t fully considered support for array config. I’d recommend using a string e.g. comma-separated values and splitting them in the function code itself.

On Mon, Mar 20, 2017 at 1:25 PM Alan Haverty notifications@github.com wrote:

Just to confirm, I grep’d through my history from yesterday and can confirm firebase functions:config:set intercom.admin_ids.0=“989270” intercom.admin_ids.1=“737963” gave me:

“admin_ids”: [ “989270”, “737963” ]

I’ll also log this with firebase support as it seems to be a remote issue. Any workarounds on getting arrays working in the meantime would be appreciated.

— 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/284#issuecomment-287886417, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAD_kn6Ff2x3P9bzwS69rYlPR34z_6xks5rnuCfgaJpZM4Mi43B .

Read more comments on GitHub >

github_iconTop Results From Across the Web

Azure Functions - Adding array of settings? - Stack Overflow
So my Azure Function locally reads an array of settings and performs some logic on each object. My local.settings.json is below.
Read more >
Configure function app settings in Azure Functions
Learn how to configure function app settings in Azure Functions.
Read more >
Function - Arrays - On2Air
Arrays Configuration. General Function Configuration. Extract/Convert to String. Items in One List But Not in Others. Unique Arrays. Combine Arrays.
Read more >
Configure your environment | Cloud Functions for Firebase
Set environment configuration with the CLI​​ To store environment data, you can use the firebase functions:config:set command in the Firebase CLI. Each key...
Read more >
Array functions - Make
Adds values specified in parameters to an array and returns that array. contains (array; value). Verifies if an array contains the value.
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