Response status is always Failed

Hi guys,

I’m integrating Unity Remote Config to my project.
Been trying with 1.2.3 and 1.4.0 (preview) from Package Manager, but no success.

  • Unity 2019.4.10f1
  • Unity Services and Analytics are enabled
  • Remote Config is configured on Unity dashboard

But I always get “Remote config : Failed”.

Code snippet:

    protected override void Awake()
    {
        ConfigManager.FetchCompleted += ApplyRemoteSettings;
        ConfigManager.FetchConfigs<userAttributes, appAttributes>(new userAttributes(), new appAttributes());
    }

    private void OnDestroy()
    {
        ConfigManager.FetchCompleted -= ApplyRemoteSettings;
    }

    private void ApplyRemoteSettings(ConfigResponse response)
    {
        if (response.status == ConfigRequestStatus.Success)
        {
            switch (response.requestOrigin)
            {
                case ConfigOrigin.Default:
                    Debug.Log("No settings loaded this session; using default values.");
                    break;
                case ConfigOrigin.Cached:
                    Debug.Log("No settings loaded this session; using cached values from a previous session.");
                    break;
                case ConfigOrigin.Remote:
                    Debug.Log("New settings loaded this session; update values accordingly.");
                    characterSpeedRate = ConfigManager.appConfig.GetFloat("CharSpeed", characterSpeedRate);

                    Debug.Log("characterSpeedRate from Unity Remote Config: " + characterSpeedRate);
                    break;
            }      
        }
        else
        {
            Debug.LogError("Remote config : " + response.status);
        }

        public struct userAttributes
        {
        }

       public struct appAttributes
       {
       }
    }

Checking ConfigManagerImpl.cs I see that the code send web request to
https://config.uca.cloud.unity3d.com but this link doesn’t seem to work (“UnknownHost: config.uca.cloud.unity3d.com).

And in that same file, in the method
OnRawResponseReturned(ConfigOrigin origin, Dictionary<string, string> headers, string body)

…I debug.log and see that body is null.

How can I solve this issue?

Thanks.

Where are you located? Have you checked firewall settings, are you on a VPN? As a test, can you try VPN? A Charles Proxy capture would be helpful, you would want to follow the directions here to install the root certificate and enter the proper values under SSL Proxying https://support.unity3d.com/hc/en-us/articles/115002917683-Using-Charles-Proxy-with-Unity

Hi @JeffDUnity3D

Thanks for your response.
I’m from Vietnam. I’ve been using Firebase Remote Config with my other games without any problem. So it’s expected that Unity built-in Remote Config would be even easier but unfortunately it’s not working for me :frowning:

The troubleshooting documentation with Charles Proxy for Android/iOS is a bit complicated for me time wise; Project is reaching deadline so I’m currently switching back to Firebase Remote Config but I’d love to check back Unity Remote Config later.

Here is a screenshot of Charles Proxy I tested yesterday with Unity Editor Play Mode.

The Charles does not seem to have installed the root certificate correctly, please check.
https://support.unity3d.com/hc/en-us/articles/115002917683-Using-Charles-Proxy-with-Unity

I just pinged the https://config.uca.cloud.unity3d.com and also got the “Unknown host”, however, I can get the Remote Config value normally, so I think this is not the cause of the problem.

Could you try to create a new minimal project and test Remote Config to see whether it works for you? Thanks.