Skip to content

Custom fetchTimeout for Remote Config is ignored #3067

Closed
@adam2603

Description

@adam2603

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions