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

Custom fetchTimeout for Remote Config is ignored #3067

Closed
adam2603 opened this issue Oct 20, 2021 · 14 comments
Closed

Custom fetchTimeout for Remote Config is ignored #3067

adam2603 opened this issue Oct 20, 2021 · 14 comments

Comments

@adam2603
Copy link

[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:
Screenshot 2021-10-20 at 12 29 08

Steps to reproduce:

  1. Setup proxy to delay all communication for 100 seconds
  2. Run app with timeout set to 5 seconds
  3. 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)
@google-oss-bot
Copy link
Contributor

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

@aguatno
Copy link

aguatno commented Oct 21, 2021

Hi @adam2603 thanks for reporting. I'll try to replicate this and see what we can do here.

@argzdev
Copy link
Contributor

argzdev commented Nov 15, 2021

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.

@argzdev argzdev added the type: bug Something isn't working label Nov 18, 2021
@abc123098123
Copy link

abc123098123 commented Dec 26, 2021

Any news about this? I might be experiencing the same issue.

@MatthiasDh
Copy link

Encountering same issue.

@argzdev
Copy link
Contributor

argzdev commented Apr 25, 2022

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?

@argzdev argzdev added needs-info and removed type: bug Something isn't working needs-attention labels Apr 25, 2022
@google-oss-bot
Copy link
Contributor

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!

@adam2603
Copy link
Author

adam2603 commented May 6, 2022

@argzdev I'm still experiencing this issue after upgrade to version 21.0.2

@abdulkadirgun
Copy link

Hi, is there any solution?

@andrew-just14
Copy link

Also experiencing this issue - any solution?

@danasilver
Copy link
Contributor

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.

@google-oss-bot
Copy link
Contributor

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!

@google-oss-bot
Copy link
Contributor

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.

@DanielNovak
Copy link

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).

@firebase firebase locked and limited conversation to collaborators Dec 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

10 participants