firebase-tools icon indicating copy to clipboard operation
firebase-tools copied to clipboard

Firebase RemoteConfig generates invalid JSON with the rollout feature

Open unxavi opened this issue 1 year ago • 5 comments

[REQUIRED] Environment info

firebase-tools: 13.11.2

Platform: macOS/Ubuntu

[REQUIRED] Test case

Create a feature flag with a rollout plan, download the JSON and try to upload this JSON to another project weather on the Web Console or using the firebase tools command line, it fails and says that the json is not a valid remote config json.

Error: HTTP Error: 400, [VALIDATION_ERROR]: INVALID_ROLLOUT_PARAM_VALUE The template has an invalid rollout id : rollout_4

[REQUIRED] Steps to reproduce

Create a feature flag with a rollout plan, download the JSON and try to upload this JSON to another project weather on the Web Console or using the firebase tools command line, it fails and says that the json is not a valid remote config json.

[REQUIRED] Expected behavior

The configuration should be created for the feature flags with the rollout plan

[REQUIRED] Actual behavior

The import fails

unxavi avatar Jun 12 '24 04:06 unxavi

Hey @unxavi, thanks for reporting. I’m able to reproduce the issue you mentioned. When using the rollouts feature and trying to upload the Remote Config JSON template to different project, an error is being raised. I’ll raise this to our engineering team.

aalej avatar Jun 12 '24 15:06 aalej

@aalej thanks, a perfect use case is when you have different firebase environments (dev, stage, pro) for example. Another thing that I notice is that the json doesn't contain the rollout name nor description, so that's never going to be recreated as it if deleted

unxavi avatar Jun 12 '24 16:06 unxavi

[ js-example.zip ](url)

hi guys, I have same issue, I've attached js file which has transfers from one project to another and issue message: '[VALIDATION_ERROR]: INVALID_ROLLOUT_PARAM_VALUE The template has an invalid rollout id : rollout_11' }, arises. Thanks

Davtyanag avatar Jun 25 '24 13:06 Davtyanag

I am also getting the same error. Was anyone able to find a solution.

Shikhar-24 avatar May 08 '25 11:05 Shikhar-24

How would one get the rolloutId when using the rest api? https://firebase.google.com/docs/reference/remote-config/rest/v1/RemoteConfig#rolloutvalue

leblancmeneses avatar Jun 27 '25 23:06 leblancmeneses

This error message The template has an invalid rollout id is as per the expectation.

While exporting a template that has a rollout_id, say, X from project A to project B, it will most likely fail, since project B may not have the same rollout_id X created.

Namyalg avatar Aug 01 '25 09:08 Namyalg

Closing as WAI

joehan avatar Aug 05 '25 17:08 joehan