Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice

Bug Remote Config Suddenly stops working all I get is "Failed to load config from cache."

Discussion in 'Unity Remote Config' started by BigKnockDown, Feb 12, 2024.

  1. BigKnockDown

    BigKnockDown

    Joined:
    Mar 23, 2013
    Posts:
    16
    Hello I initially started working with remote config unity 20213.34f1 , I setup every thing correctly on the dashboard and was able to pull it correctly in the editor as well. But while trying t use the sample scripts from the Documentation I was not able to retrieve the Remote config settings at all even once. All I got was a message which says "Failed to load config from cache."
    After looking around for answers on google I figured will try upgrading the project to latest LTS version ie,. so that I am able to use the latest version of remote config as well. Keeping every thing same that is same code same remote settings I was able to successfully able to receive the data and was able to use the same in te project .

    But just after a weekend it suddenly stopped working , I started getting the same message ie.2023.3.19f1 "Failed to load config from cache." Again I have no idea what went wrong even when I did not change any setting or code .

    Does any on have any idea regarding this ?
     
  2. vd_unity

    vd_unity

    Unity Technologies

    Joined:
    Sep 11, 2014
    Posts:
    41
    Hi @BigKnockDown, thanks for your input!
    We would just like to confirm the platform you are developing for, as the error you are seeing happens when developing for WebGL.
    Here is the post with similar issues, and it happens because unity's
    Application.persistentDataPath does not work well for webGL, as we had similar issues with consoles.

    One easy workaround would be to bypass caching by eliminating || UNITY_WEBGL from your local code at three different locations within ConfigManagerImpl.cs: the constructor, FetchConfigsAsync(), and DoRequest().
    But in that scenario, caching would be disregarded, meaning that a remote configuration request would only function with an internet connection and would not load the last cached values.


    Please let us know if you indeed come across this issue while developing for WebGL, and if yes, let us know if bypassing cache for webGl works for you.

    We are aware of this bug and it will be fixed within the next version of RC.
    Thanks,
    Vlatko
     
  3. BigKnockDown

    BigKnockDown

    Joined:
    Mar 23, 2013
    Posts:
    16
    Hi @vd_unity
    I am actually targeting PC /Standalone for my project.
     
  4. vd_unity

    vd_unity

    Unity Technologies

    Joined:
    Sep 11, 2014
    Posts:
    41
    Hi @BigKnockDown ,
    sorry to hear that -> could you please provide us with some specifics, like your OS, Unity Version, and maybe projectId, so we can try to reproduce it?

    Thanks!
     
    johnny004 likes this.
  5. BigKnockDown

    BigKnockDown

    Joined:
    Mar 23, 2013
    Posts:
    16
    Hi @vd_unity Turns out this issue occurred due to another Editor error which I was getting as soon as I launched the project. This error was only visible once , if I cleared it didn't appeared again until the next launch of the project.
    here is the post about the error https://forum.unity.com/posts/9655775/
    After sorting this every thing worked fine. I am guessing the services were not properly initialized due to this error.