You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Android Studio version: Android Studio Ladybug | 2024.2.1 Patch 3
Firebase Component: Remote Config
Component version: Firebase BOM 33.7.0
[REQUIRED] Step 3: Describe the problem
Steps to reproduce:
What happened?
Firebase is ignoring config fetch timeout and throws exception too late.
How can we make the problem occur?
Emulator with GSM network type to emulate slow connectivity.
Initialize firebase remoteConfig client with 2 seconds timeout
Call fetch or fetchAndActivate in a slow network device.
Wait more than 2 seconds.
Timeout error is sent many seconds seconds later ignoring timeout.
Relevant Code:
// Init client
val client = Firebase.remoteConfig.apply {
setConfigSettingsAsync(
remoteConfigSettings {
fetchTimeoutInSeconds = 2L
}
)
}
// And later
println("FETCH AND ACTIVATE")
client.fetchAndActivate()
.addOnFailureListener {
println("FIREBASE FETCH FAILED: $it")
}.addOnCompleteListener {
println("FIREBASE FETCH COMPLETE")
}
This code prints this in console:
2024-12-30 16:43:41.924 7318-7318 I FIREBASE FETCH AND ACTIVATE
2024-12-30 16:44:13.990 7318-7318 I FIREBASE FETCH FAILED: com.google.firebase.remoteconfig.FirebaseRemoteConfigClientException: The client had an error while calling the backend!
2024-12-30 16:44:13.990 7318-7318 I FIREBASE FETCH COMPLETE
And debugging exception it says the cause is:
java.net.SocketTimeoutException: failed to connect to firebaseremoteconfig.googleapis.com/2a00:1450:4003:803::200a (port 443) from /fec0::45a5:b4cc:36d0:be4c (port 44980) after 2000ms
IMPORTANT! It says SocketTimeout after 2000ms so maybe there is another http client involved with no timeout configured?
The text was updated successfully, but these errors were encountered:
jramism
changed the title
Firebase remoteconfig ignoring fetchTimeoutInSeconds value in Android
Firebase remoteconfig ignoring fetchTimeoutInSeconds value
Dec 30, 2024
Could the reason for the problem be that fetchTimeoutInSeconds is not considering the time of the DNS lookup call prior to establishing the connection?
That would explain the long wait and then the timeout after establishing the connection after 2 seconds.
Hi @jramism, thank you for reaching out. I was able to reproduce the issue you raised. Let me raise this to our engineers and get clarification on your theory. I'll get back to you as soon as I heard back from them. Thanks!
[REQUIRED] Step 2: Describe your environment
[REQUIRED] Step 3: Describe the problem
Steps to reproduce:
What happened?
Firebase is ignoring config fetch timeout and throws exception too late.
How can we make the problem occur?
Relevant Code:
This code prints this in console:
2024-12-30 16:43:41.924 7318-7318 I FIREBASE FETCH AND ACTIVATE
2024-12-30 16:44:13.990 7318-7318 I FIREBASE FETCH FAILED: com.google.firebase.remoteconfig.FirebaseRemoteConfigClientException: The client had an error while calling the backend!
2024-12-30 16:44:13.990 7318-7318 I FIREBASE FETCH COMPLETE
And debugging exception it says the cause is:
java.net.SocketTimeoutException: failed to connect to firebaseremoteconfig.googleapis.com/2a00:1450:4003:803::200a (port 443) from /fec0::45a5:b4cc:36d0:be4c (port 44980) after 2000ms
IMPORTANT! It says SocketTimeout after 2000ms so maybe there is another http client involved with no timeout configured?
The text was updated successfully, but these errors were encountered: