Search Unity

Release 1.3.2 preview 9 unable to fetch Development configuration

Discussion in 'Unity Remote Config' started by Flarup, Aug 20, 2020.

  1. Flarup

    Flarup

    Joined:
    Jan 7, 2010
    Posts:
    164
    I recently tried to give the latest preview of Remote Config a spin, in order to try out the new json functionality. The json support seems pretty neat, so thank you VERY much for that feature!

    However, in release 1.3.2 preview 9 I'm unable to fetch my Development configuration. The Unity Editor gets the Release configuration, and also Android development builds gets the Release configuration. I have also tried to force the environment to "Development" with SetEnvironmentID, but to no avail.

    Anyone else having the same problem with the latest preview package?

    Thanks a lot in advancef or all help.

    Kind regards,
    Uffe Flarup
     
  2. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Can you share a screenshot of your RC Editor dialog showing the environment drop down and the results when you choose Development? I just updated to this version and my Development environment displays as expected.
     
  3. Flarup

    Flarup

    Joined:
    Jan 7, 2010
    Posts:
    164
    Thanks a lot for your reply. Also, sorry for my vague description of the error. The error happens at runtime - both when running the game in Editor, and when running the game on an Android mobile.

    When running my game in Unity Editor it fetches my "Release" configuration, instead of fetching the "Development" configuration as it previously did.

    When making a build for Android mobile, it always fetches the "Release" configuration - no matter if I make a Development Build or not. Normally it would fetch the "Development" configuration at runtime if you've made a Development Build.

    Thanks a lot in advance for your help.


    Kind regards,
    Uffe Flarup
     
  4. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Can you share the requested screenshot please? Please show your code and the results of your runtime debugging, either as a breakpoint in Visual Studio on the device logs using Debug.Log
     
  5. Flarup

    Flarup

    Joined:
    Jan 7, 2010
    Posts:
    164
    Attached is picture of my Development remote config, my Release remote config, as well the Unity Editor console log output when I call:

    Debug.Log("ConfigManager.appConfig.environmentID " + ConfigManager.appConfig.environmentID);
     

    Attached Files:

  6. Flarup

    Flarup

    Joined:
    Jan 7, 2010
    Posts:
    164
    Initialization code looks like this:

    Code (CSharp):
    1.     private struct RemoteConfigUserAttributes
    2.     {
    3.     }
    4.  
    5.     private struct RemoteConfigAppAttributes
    6.     {
    7.     }
    8.  
    9.     private void Awake()
    10.     {
    11.         ConfigManager.FetchCompleted += RemoteConfigUpdated;
    12.         ConfigManager.FetchConfigs<RemoteConfigUserAttributes, RemoteConfigAppAttributes>(new RemoteConfigUserAttributes(), new RemoteConfigAppAttributes());
    13.     }
     
  7. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    @Flarup I don't see in your code where you are specifying the Development environment? Please show the runtime output on the device of your RC values, or a debug breakpoint in Visual Studio
     
  8. Flarup

    Flarup

    Joined:
    Jan 7, 2010
    Posts:
    164
    I don't specify which environment to connect to.

    In the latest stable version (which I previously used) it would take the "Development" environment at runtime in Unity Editor, and when making a Development Build e.g. for Android, then it would also take the "Development" environment at runtime.

    Have this feature been removed in the latest preview release?
     
  9. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    No changes have been made as you suggest. We have yet to confirm your issue, please provide the requested information.
     
  10. Flarup

    Flarup

    Joined:
    Jan 7, 2010
    Posts:
    164
    Here's a snippet of log from an Android development build:

    Code (CSharp):
    1. 08-24 19:56:44.692 31488 31562 I Unity   : Debug.isDebugBuild True
    2. 08-24 19:56:44.692 31488 31562 I Unity   : Bootstrap:RemoteConfigUpdated(ConfigResponse)
    3. 08-24 19:56:44.692 31488 31562 I Unity   : System.Action`1:Invoke(T)
    4. 08-24 19:56:44.692 31488 31562 I Unity   : Unity.RemoteConfig.ConfigManagerImpl:OnRawResponseReturned(ConfigOrigin, Dictionary`2, String)
    5. 08-24 19:56:44.692 31488 31562 I Unity   : System.Action`3:Invoke(T1, T2, T3)
    6. 08-24 19:56:44.692 31488 31562 I Unity   : System.Action`1:Invoke(T)
    7. 08-24 19:56:44.692 31488 31562 I Unity   : UnityEngine.AsyncOperation:InvokeCompletionEvent()
    8. 08-24 19:56:44.692 31488 31562 I Unity   :
    9. 08-24 19:56:44.692 31488 31562 I Unity   : (Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)
    10. 08-24 19:56:44.692 31488 31562 I Unity   :
    11. 08-24 19:56:44.693 31488 31562 I Unity   : ConfigManager.appConfig.environmentID 4853887b-78db-4433-9bf7-a8085cef0538
    12. 08-24 19:56:44.693 31488 31562 I Unity   : Bootstrap:RemoteConfigUpdated(ConfigResponse)
    13. 08-24 19:56:44.693 31488 31562 I Unity   : System.Action`1:Invoke(T)
    14. 08-24 19:56:44.693 31488 31562 I Unity   : Unity.RemoteConfig.ConfigManagerImpl:OnRawResponseReturned(ConfigOrigin, Dictionary`2, String)
    15. 08-24 19:56:44.693 31488 31562 I Unity   : System.Action`3:Invoke(T1, T2, T3)
    16. 08-24 19:56:44.693 31488 31562 I Unity   : System.Action`1:Invoke(T)
    17. 08-24 19:56:44.693 31488 31562 I Unity   : UnityEngine.AsyncOperation:InvokeCompletionEvent()
    18. 08-24 19:56:44.693 31488 31562 I Unity   :
    19. 08-24 19:56:44.693 31488 31562 I Unity   : (Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)
    The code itself looks like this:

    Code (CSharp):
    1.     private void RemoteConfigUpdated(ConfigResponse configResponse)
    2.     {
    3.         Debug.Log("Debug.isDebugBuild " + Debug.isDebugBuild);
    4.         Debug.Log("ConfigManager.appConfig.environmentID " + ConfigManager.appConfig.environmentID);
    As you can see, this is an Android development build, but the ID of the Remote Config environment is the ID of our "Release" environment.

    In the latest stable version of Remote Config it would take the "Development" environment if it's running in Unity Editor or running in a development build.
     
  11. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Got it, that is what I was looking for. We will check.
     
    Flarup likes this.
  12. Flarup

    Flarup

    Joined:
    Jan 7, 2010
    Posts:
    164
    Are you able to reproduce the issue? Let me know if you need any additional information.
     
  13. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Can you try with preview 10?
     
  14. Flarup

    Flarup

    Joined:
    Jan 7, 2010
    Posts:
    164
    The problem unfortunately still exists in preview 10.
     
  15. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Got it, we will check
     
  16. Flarup

    Flarup

    Joined:
    Jan 7, 2010
    Posts:
    164
    For what it's worth, when I log into the webinterface we have the following two environments:

    upload_2020-8-28_21-17-15.png
     
  17. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    It's working for us here. Can you show the code where you call setEnvironmentID , and then the output? There's a chance we are having a caching issue also. I will keep this thread updated.
     
  18. jacobbev

    jacobbev

    Unity Technologies

    Joined:
    Jun 25, 2018
    Posts:
    8
    Hey @Flarup,

    Thanks for trying out the new preview package! In version 1.1.0 (and all later versions including the one you are using) we introduced the concept of multiple environments which altered the way developers interact with environments. You can learn a bit more from our forum post where we introduced the change. There is a few caveats to keep in mind when upgrading from a version earlier than 1.1.x which is outlined in the docs here.

    I hope this helps with the issue you are running into, but if not please let us know and we can continue to help you troubleshoot.
     
  19. Flarup

    Flarup

    Joined:
    Jan 7, 2010
    Posts:
    164
    Thank you very much for the link. I did indeed encounter an upgrade problem - in particular, this one:

    --------
    Previously, the Development environment is delivered automatically at runtime in the Editor and on debug builds. This will no longer be the case with the new package, and instead you will have to explicitly fetch the Development environment.
    --------

    I'll upgrade my code to take this into account.

    Again, thank you very much for bringing my attention to this.


    Kind regards,
    Uffe Flarup
     
    vd_unity likes this.
  20. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Got it, glad it's working for you! You had stated this previously so we assumed it may be something else "I have also tried to force the environment to "Development" with SetEnvironmentID, but to no avail."
     
  21. Flarup

    Flarup

    Joined:
    Jan 7, 2010
    Posts:
    164
    Looked back in our commit history here, and can see that I accidentally had passed the NAME of the environment ("Development") instead of the ID of the environment. Sorry for the confusion.

    But thanks for clarifying that the usage of the Development environment had changed. It all works good now, and the json feature is super awesome!