Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
4 captures
13 Jun 22 - 14 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by gladieweb · Jul 30, 2021 at 09:59 AM · bugissuefreeze

Firebase Remote Config BUG

I have an issue in unity with Firebase Remote Config. v8.1 I Call InitRemoteConfig() then Fetch, but I recive Faulted status in the callback. also unity freezes after stop runing the game and I am back at the editor, if I press play again, unity freezes. Can you help me searching what I am doing wrong? thank you.

 public void InitRemoteConfig()
     {
         System.Collections.Generic.Dictionary<string, object> defaults = new System.Collections.Generic.Dictionary<string, object>();
 
         // These are the values that are used if we haven't fetched data from the
         // server
         // yet, or if we ask for values that the server doesn't have:
        /* defaults.Add("config_test_string", "default local string");
         defaults.Add("config_test_int", 1);
         defaults.Add("config_test_float", 1.0);
         defaults.Add("config_test_bool", false);*/
             
         defaults.Add("BoneCollectableSpawnChance", 0.63);
         defaults.Add("BoneCollectableReward", 25);
         defaults.Add("FearRequiredToPlayOnline", 50);
         defaults.Add("UpgradeLevelMultiplier", 0.05);
         defaults.Add("DailyRewardBasePrice", 100);
 
         Firebase.RemoteConfig.FirebaseRemoteConfig.DefaultInstance.SetDefaultsAsync(defaults).ContinueWithOnMainThread(setTask =>
         {
             Debug.Log("RemoteConfig configured and ready!");
             isRemoteConfigInitialized = true;
         });
     }
 
     public Task FetchDataAsync() {
       Debug.Log("Fetching data...");
       System.Threading.Tasks.Task fetchTask =
       Firebase.RemoteConfig.FirebaseRemoteConfig.DefaultInstance.FetchAsync(
           TimeSpan.Zero);
       return fetchTask.ContinueWithOnMainThread(FetchComplete);
     }
     //[END fetch_async]
 
     void FetchComplete(Task fetchTask) {
       if (fetchTask.IsCanceled) {
         Debug.Log("Fetch canceled.");
       } else if (fetchTask.IsFaulted) {
         Debug.Log("Fetch encountered an error." + fetchTask.Status.ToString());
       } else if (fetchTask.IsCompleted) {
         Debug.Log("Fetch completed successfully!");
       }
 
       var info = Firebase.RemoteConfig.FirebaseRemoteConfig.DefaultInstance.Info;
       switch (info.LastFetchStatus) {
         case Firebase.RemoteConfig.LastFetchStatus.Success:
           Firebase.RemoteConfig.FirebaseRemoteConfig.DefaultInstance.ActivateAsync().ContinueWithOnMainThread(task => {
             Debug.Log(string.Format("Remote data loaded and ready (last fetch time {0}).",info.FetchTime));
           });
 
           break;
         case Firebase.RemoteConfig.LastFetchStatus.Failure:
           switch (info.LastFetchFailureReason) {
             case Firebase.RemoteConfig.FetchFailureReason.Error:
               Debug.Log("Fetch failed for unknown reason");
               break;
             case Firebase.RemoteConfig.FetchFailureReason.Throttled:
               Debug.Log("Fetch throttled until " + info.ThrottledEndTime);
               break;
           }
           break;
         case Firebase.RemoteConfig.LastFetchStatus.Pending:
           Debug.Log("Latest Fetch call still pending.");
           break;
       }
     }





Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image ColonelKurt · Dec 05, 2021 at 06:45 PM 0
Share

Hi, @gladieweb ! Did you fix this issue?

0 Replies

· Add your reply
  • Sort: 

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

144 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Why won't particles prewarm properly in a wind zone? 0 Answers

Application.LoadLevelAsync not working in Unity 3.3 Pro? 6 Answers

Threading with UDPClient - Editor Freezing 2 Answers

Non Game Engine related bug reports 0 Answers

IsPointerOverGameObject bugs in 5.3 and newer. Workaround suggestions? 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges