New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RemoteConfig condition names invalid via the Admin SDK but not console #2535
Comments
I found a few problems with this issue:
|
Parameter names don't allow spaces and the console usually blocks entry--can you remember how you added the parameter names to the Firebase console? Was it imported via the console or REST API? Sounds like there may be a bug there (and our error message can be better and documentation clearer)! |
Hello @jenh, Thank you for responding. Yes, these values were added via the console initially. I just tested this again with the variant name "Space Bar", and here is the result: Let me know if I can provide any further info. |
Hello, I just attempted to publish a script via the Admin SDK and unfortunately I am now getting a different validation error. This time I used names which don't have spaces. This response was given when I called
I could use further clarification on what is a valid or invalid name. |
Sorry--I got parameters and conditions confused there--condition names can definitely have spaces. I'm able to publish a config with added and changed condition names with and without underscores using the sample code. Seems to work with a config pulled using the Admin SDK, but am running into (different) issues with the formatted JSON downloaded straight from the console UI. Can you file a case for the Firebase Developer Support team with example code you're using to make the change and a sample config (and how it was obtained) for our Support team to take a closer look? Thank you! |
@jenh I am just checking with my CTO about what I'm allowed to provide (it's a client's codebase); but if that's fine I will definitely file the issue. Would it be possible for you to provide me with the template that you get from the Admin SDK (assuming it isn't sensitive)? I would like to compare it against what I have to see if something about the structure I am using is wrong. Either way, thank you for the help. Edit: I am particularly curious about what you have for the names in the conditionalValues objects; those are apparently what keep giving me trouble. |
Closing the issue. I did end up finding an error in my JSON template which was leading to that validation issue. |
Step 2: Describe your environment
Step 3: Describe the problem
I am creating a RemoteConfigTemplate which requires manipulating
condition
fields depending on a deployment target.The the condition names I am using seem to be accepted within the console (I prototyped our RemoteConfig setup in the firebase console initially), but they fail validation when I call
configAdmin.validateTemplate(template)
via the Admin SDK:POTato is just a stand in for a client's app name, but it follows the same pattern.
I wasn't able to find documentation on valid condition names, and I am thrown a bit by the fact that they seem to be valid when used via the firebase console.
Is there any spec available on what is a valid condition name? Also, if this isn't intended and filing a bug with the issue tracker would be useful, I am happy to do that.
Steps to reproduce:
Create a RemoteConfigTemplate in JSON locally. I initially did this by pulling down the RemoteConfig set up in the console as a JSON string. Set one of the conditions to have a name which matches the pattern specified above, and then attempt to validate it.
I read the template from a file using
const template = configAdmin.createTemplateFromJSON(json);
then validate it from there usingawait configAdmin.validateTemplate(template);
.Relevant Code:
Example JSON conditions
The text was updated successfully, but these errors were encountered: