Search Unity

Question Response status is always Failed

Discussion in 'Unity Remote Config' started by p0w1nd, Sep 14, 2020.

  1. p0w1nd

    p0w1nd

    Joined:
    Oct 28, 2015
    Posts:
    140
    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:

    Code (CSharp):
    1.     protected override void Awake()
    2.     {
    3.         ConfigManager.FetchCompleted += ApplyRemoteSettings;
    4.         ConfigManager.FetchConfigs<userAttributes, appAttributes>(new userAttributes(), new appAttributes());
    5.     }
    6.  
    7.     private void OnDestroy()
    8.     {
    9.         ConfigManager.FetchCompleted -= ApplyRemoteSettings;
    10.     }
    11.  
    12.     private void ApplyRemoteSettings(ConfigResponse response)
    13.     {
    14.         if (response.status == ConfigRequestStatus.Success)
    15.         {
    16.             switch (response.requestOrigin)
    17.             {
    18.                 case ConfigOrigin.Default:
    19.                     Debug.Log("No settings loaded this session; using default values.");
    20.                     break;
    21.                 case ConfigOrigin.Cached:
    22.                     Debug.Log("No settings loaded this session; using cached values from a previous session.");
    23.                     break;
    24.                 case ConfigOrigin.Remote:
    25.                     Debug.Log("New settings loaded this session; update values accordingly.");
    26.                     characterSpeedRate = ConfigManager.appConfig.GetFloat("CharSpeed", characterSpeedRate);
    27.  
    28.                     Debug.Log("characterSpeedRate from Unity Remote Config: " + characterSpeedRate);
    29.                     break;
    30.             }      
    31.         }
    32.         else
    33.         {
    34.             Debug.LogError("Remote config : " + response.status);
    35.         }
    36.  
    37.         public struct userAttributes
    38.         {
    39.         }
    40.  
    41.        public struct appAttributes
    42.        {
    43.        }
    44.     }
    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.
     
    Last edited: Sep 14, 2020
  2. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
  3. p0w1nd

    p0w1nd

    Joined:
    Oct 28, 2015
    Posts:
    140
    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 :(

    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.

    Screen Shot 2020-09-14 at 17.15.43.png
     
  4. SamOYUnity3D

    SamOYUnity3D

    Unity Technologies

    Joined:
    May 12, 2019
    Posts:
    626
    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.