firebase-android-sdk
firebase-android-sdk copied to clipboard
Custom fetchTimeout for Remote Config is ignored
[READ] Step 1: Are you in the right place?
Issues filed here should be about bugs in the code in this repository. If you have a general question, need help debugging, or fall into some other category use one of these other channels:
- For general technical questions, post a question on StackOverflow with the firebase tag.
- For general Firebase discussion, use the firebase-talk google group.
- For help troubleshooting your application that does not fall under one of the above categories, reach out to the personalized Firebase support channel.
[REQUIRED] Step 2: Describe your environment
- Android Studio version: Android Studio Arctic Fox | 2020.3.1 Patch 3
- Firebase Component: Remote Config
- Component version: 21.0.1
[REQUIRED] Step 3: Describe the problem
I set firebase remote config fetch timeout to 5 seconds, but it is ignored and default one (60 seconds) is used.
To test this I setup charles proxy with following throttling configuration:
Steps to reproduce:
- Setup proxy to delay all communication for 100 seconds
- Run app with timeout set to 5 seconds
- FirebaseRemoteConfig.fetch blocks for around 60 seconds
Relevant Code:
val firebaseRemoteConfig = FirebaseRemoteConfig.getInstance()
firebaseRemoteConfig.setConfigSettingsAsync(
FirebaseRemoteConfigSettings.Builder()
.setFetchTimeoutInSeconds(5)
.build()
).await()
firebaseRemoteConfig.fetch(remoteConfigFetchInterval).await()
firebaseRemoteConfig.activate().await()
private fun <T> Task<T>.await() = Tasks.await(this)
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
Hi @adam2603 thanks for reporting. I'll try to replicate this and see what we can do here.
Hi @adam2603, just bumping this thread. I was able to replicate the issue, I'll try to notify an engineer and see what we can do here.
Any news about this? I might be experiencing the same issue.
Encountering same issue.
Hi all, upon testing this code snippet on the latest version 21.0.2
it seems to work properly. Could you verify if you're still experiencing this issue @adam2603.
@MatthiasDh, could you add more details such as steps to repro or minimal repro of your issue?
Hey @adam2603. 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!
@argzdev I'm still experiencing this issue after upgrade to version 21.0.2
Hi, is there any solution?
Also experiencing this issue - any solution?
Thanks for the reports @abdulkadirgun @andrew-just14 @adam2603. I'm wondering if you're seeing the timeout ignored outside of using Charles to increase the latency?
We control the timeout using URLConnection's setConnectTimeout and setReadTimeout, so it's possible something is returned that satisfies those "connection opened" and "started to read" requirements, but the round trip latency causes the connect to still hang open beyond those two limits.
Hey @adam2603. 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.
@adam2603 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.
This is still happening - at least on 21.2.0
. Sometimes (very very rarely) each fetchAndActivate()
takes 20 seconds on my Pixel 4a. No amount of process restarts will fix it. It just takes 20 seconds every time. Setting setFetchTimeoutInSeconds()
to for example 5 seconds doesn't help at all. It seems that the Firebase service is somehow "stuck", maybe the connection works as expected but some other parts of the Firebase Config code now cause a large delay.
Rebooting my device has fixed the huge 20+ second delays. So this confirms that it's a Firebase service issue on the device (since uninstalls or process restarts didn't fix it, only device reboot).