[Bug] Remote Config: Setting MinimumFetchInternalInMilliseconds does not work as expected - quickstart-unity
[REQUIRED] Please fill in the following fields:
- Unity editor version: 2020.3.5f1
- Firebase Unity SDK version: 8.1.0
- Source you installed the SDK: installed via unitypackage
- Problematic Firebase Component: Remote Config
- Other Firebase Components in use: Analytics, Messaging, Auth, Crashlytics
- Additional SDKs you are using: Facebook, IronSource
- Platform you are using the Unity editor on: Windows
- Platform you are targeting: Android
- Scripting Runtime: IL2CPP (.NET 4.x)
[REQUIRED] Please describe the issue here:
Setting MinimumFetchInternalInMilliseconds
does not seem to work as expected. For example, if it is set to 120000 (2 minutes), remote values are never fetched even after 2 minutes have elapsed. It seems as though the cached values never expire.
Steps to reproduce:
1.) Import Firebase packages (Analytics, Messaging, Remote Config, Crashlytics, Auth)
2.) Test Remote Config by setting MinimumFetchInternalInMilliseconds
to 120000 (2 minutes)
3.) Call FirebaseRemoteConfig.DefaultInstance.FetchAsync();
. It completes successfully but remote values are never fetched even after 2 minutes have elapsed (as indicated by info.FetchTime
).
Relevant Code:
```c# // this example assumes that the dependency status check was successful (this.dependencyStatus == DependencyStatus.Available)
private void InitRemoteConfig()
{
Dictionary
FirebaseRemoteConfig.DefaultInstance.SetDefaultsAsync(defaults).ContinueWithOnMainThread(task =>
{
var configSettings = new ConfigSettings();
configSettings.MinimumFetchInternalInMilliseconds = 120000;
FirebaseRemoteConfig.DefaultInstance.SetConfigSettingsAsync(configSettings).ContinueWithOnMainThread(task =>
{
this.FetchRemoteData();
});
});
}
private Task FetchRemoteData() { Task fetchTask = FirebaseRemoteConfig.DefaultInstance.FetchAsync(); return fetchTask.ContinueWithOnMainThread(this.RemoteDataFetchComplete); }
private void RemoteDataFetchComplete(Task fetchTask) { if (fetchTask.IsCanceled) { print("FirebaseRemoteConfig fetch canceled"); } else if (fetchTask.IsFaulted) { print("FirebaseRemoteConfig fetch encountered an error."); } else if (fetchTask.IsCompleted) { print("FirebaseRemoteConfig fetch completed successfully!"); }
var info = FirebaseRemoteConfig.DefaultInstance.Info;
switch (info.LastFetchStatus)
{
case LastFetchStatus.Success:
FirebaseRemoteConfig.DefaultInstance.ActivateAsync().ContinueWithOnMainThread(task =>
{
// this part of the code is reached successfully but info.FetchTime never seems to update, even after more than 2 minutes have elapsed
print($"FirebaseRemoteConfig Remote data loaded and ready (last fetch time {info.FetchTime}).");
});
break;
case LastFetchStatus.Failure:
switch (info.LastFetchFailureReason)
{
case FetchFailureReason.Error:
print("FirebaseRemoteConfig Fetch failed for unknown reason");
break;
case FetchFailureReason.Throttled:
print("FirebaseRemoteConfig Fetch throttled until " + info.ThrottledEndTime);
break;
}
break;
case LastFetchStatus.Pending:
print("FirebaseRemoteConfig Latest Fetch call still pending.");
break;
}
} ```
3 Answer:
Hi @micsnz,
Thanks for reporting this. So far, I haven't been able to replicate this issue with the information you provided. Could you provide a minimal, reproducible example of your project along with the steps taken before facing this issue? This way, we can identify what's causing this behavior.
Hey @micsnz. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically.
If you have more information that will help us get to the bottom of this, just add a comment!
Since there haven't been any recent updates here, I am going to close this issue.
@micsnz if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.
Read next
- LightGBM [R Package] autoconf.ac OpenMP test ignores LDFLAGS (fix provided). - Cplusplus
- bind EINVAL on valid IPv6 Address (IPv4 works fine!) - JavaScript node
- Nightly builds - logisim-evolution Java
- darktable Crash Report C
- joint Rappid visio import Link vertices - JavaScript
- iOS 13 requires new headers to the APNS - Ruby houston
- after.js css problem with after.js - JavaScript
- bevy Separation of 2D and 3D games - Rust