-
Notifications
You must be signed in to change notification settings - Fork 1.6k
"Most recently fetched config is already activated" after remote config activate() call #3586
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This comment has been minimized.
This comment has been minimized.
If your goal is to make sure the values in RemoteConfig are up-to-date, this code will work and you can ignore the error. @dmandar is this intentional? If we have an error that we recommend users ignore, can we downgrade the error to an info/debug log instead? |
The error object always contains a value when activation cannot succeed. In this case, the already fetched config (present in the cache) is also already activated and no new activation can take place. If you prefer, you can use fetchAndActivate by pre-configuring the fetchInterval in the configSettings at initialization time which returns more granular status regarding whether both remote fetch and activate succeeded. |
We use this exact same method as well... not sure why this issue was closed. We need to utilize I agree with @morganchen12 's approach of logging instead. This is NOT an error. |
Thanks for the feedback. We are working on improving the return status of the existing API. In the meantime, if appropriate, please use the new fetchAndActivate API which should have more granular status. |
There is already a warning logged at https://github.com/firebase/firebase-ios-sdk/blob/master/FirebaseRemoteConfig/Sources/FIRRemoteConfig.m#L298. Why not pass nil to the completion handler at https://github.com/firebase/firebase-ios-sdk/blob/master/FirebaseRemoteConfig/Sources/FIRRemoteConfig.m#L308? The functionality should be exactly the same as the success case. |
Fwiw, On Android, it seems like we have a bool that indicates whether it was already activated |
[REQUIRED] Step 2: Describe your environment
[REQUIRED] Step 3: Describe the problem
We fetch and activate remote config with the following code:
We call this part of the code only one, in
AppDelegate
duringdidFinishLaunchingWithOptions
In the wild, we see lots of Remote config errors reported, they're pretty straightforward:
Is it an error to try to activate fetched config when it's the same as active one? If yes, which approach should we take?
We can't use the
fetchAndActivate
since it doesn't have theexpirationDuration
parameter.The text was updated successfully, but these errors were encountered: