Skip to content
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

[Remote Config] Local conf randomly empty even with successful fetch #7424

Closed
marabid opened this issue Feb 2, 2021 · 9 comments · Fixed by #7975
Closed

[Remote Config] Local conf randomly empty even with successful fetch #7424

marabid opened this issue Feb 2, 2021 · 9 comments · Fixed by #7975
Assignees
Milestone

Comments

@marabid
Copy link

marabid commented Feb 2, 2021

[REQUIRED] Step 1: Describe your environment

  • Xcode version: 12.2
  • Firebase SDK version: 7.3.0
  • Installation method: CocoaPods
  • Firebase Component: RemoteConfig

[REQUIRED] Step 2: Describe the problem

We use the 3rd loading strategy (Load new values for next startup) as described here https://firebase.google.com/docs/remote-config/loading
Our application fetches the required configuration on the splash screen.

On the first launch, this fetch succeed and the app behaves normally.
For some reason, on other launch the local configuration sometimes returns empty values.
The Firebase app is configured and the logs doesn't identify any issue even if set to max.

The problem isn't easily reproducible on all devices, but some of them are failing almost 1 on 3 times.

We Unfortunately couldn't narrow the devices concerned, neither the OS concerned.

When the content is empty :

  • The last fetch status is succeed

  • defaultExpiration: TimeInterval = 600

  • When we print the value of :

RemoteConfig.remoteConfig().allKeys(from: .remote)
RemoteConfig.remoteConfig().allKeys(from: .static)
RemoteConfig.remoteConfig().allKeys(from: .default)

It returns 0 (no key was found)

Steps to reproduce:

Please find below the link to the sample where you can reproduce :

https://drive.google.com/file/d/1LG4fbE4FCW4Ts61vGgvzQLUW0l6jSH4s/view?usp=sharing

To reproduce, simply install the sample, kill & launch it multiple times. Once the background is red, it means that the local conf is empty.

@google-oss-bot
Copy link

I found a few problems with this issue:

  • I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
  • This issue does not seem to follow the issue template. Make sure you provide all the required information.
@nrj
Copy link

nrj commented Feb 11, 2021

  • FirebaseRemoteConfig (7.4.0)

Not sure if related, but I am having a similar issue with defaults not being available. In my application I implement a blocking loading screen which I use to call both setDefaults and fetchAndActivateWithCompletion: but I set a maximum timeout of 6 seconds. If the completion block is not invoked within 6 seconds, then I dismiss the loading screen and open the app anyways. The fetch operation will finish at some point, but until then I expect the default values from the plist to be available and returned when queried. On older phones however, specifically iPhone 6s and older iPads, I am seeing that quite often the default values are not available and the values are all null. The source property is 3, and the values are static uninitialized values, 0's and empty strings.

@marabid
Copy link
Author

marabid commented Feb 18, 2021

@nrj thank you for your reply.

Indeed, it seems to be easier to reproduce on old phones and iPads.

The only workaround we've found at this point, is to downgrade to FirebaseRemoteConfig 7.0.0 which seems to work a bit better, even if we were able to reproduce on this version as well.

Please let me know if you find any better workaround.

@bachtrong43
Copy link

I'm facing this issue with newest version 7.7.0 on iOS.
Firebase seems not to save the values after fetched.
Steps:
First launch:

  1. Call fetchAndActivate()
  2. print keysWithPrefix(null).size: always 0
  3. In callback of 1 print allKeys.size: get correct result.

Kill app and launch again with the same steps. The result is always 0 in step 2 (expected correct result with fetched values before)

@bachtrong43
Copy link

Downgraded to 7.0.0 and got the expected result.

@sethdeckard
Copy link

I'm seeing the same thing on 7.6.0 and it does seem to affect older devices for the most part (many iPhone 6/6s, some iPhone 7).

@ThibautRichez
Copy link

We are encountering this issues for a while now and this have a huge impact on our AppStore rating / reviews.
As said above, we reproduced it on other Firebase/RemoteConfig versions and mostly on older phones (5S, 6, 6S, …. but some of our customers had this issues with iPhone X though).

Please up this issues and share any thoughts/workaround you have.

Thanks

@lucasvercelot
Copy link

Hello,

I have the same problem. It happens from time to time, no idea why.
I don't know if the problem comes from the SDK or from a server-side issue.

Please fix this, thanks.

@karenyz
Copy link
Contributor

karenyz commented Apr 27, 2021

Thanks for all the detailed reports!! Sorry it took some time to track down the problem. Put in a fix that will be in the next release, feel free to re-open if this issue still persists after that

@paulb777 paulb777 added this to the 8.0.0 - M95 milestone Apr 27, 2021
@firebase firebase locked and limited conversation to collaborators May 28, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.