FirebaseRemoteConfigClientException The client had an error while calling the backend!
See original GitHub issuei have issue with FirebaseRemoteConfig, below is the image which I added SSL certificate for api calling is not working in android 5.0 and 6.0 because of https issue, so i added this SSL self trust manager in my app and api calling is working in all device by Firebase remote config not working,
implementation platform('com.google.firebase:firebase-bom:29.0.3')
implementation 'com.google.firebase:firebase-analytics-ktx'
implementation 'com.google.firebase:firebase-crashlytics-ktx'
implementation 'com.google.firebase:firebase-config-ktx'
and here is FirebaseRemotoConfig code to get value from Firebase Remote config, i am getting error like this com.google.firebase.remoteconfig.FirebaseRemoteConfigClientException: The client had an error while calling the backend!
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (5 by maintainers)
I have not added any Custom SSL certificates, yet, I am getting this exact exception. I narrowed down the problem to this exception: javax.net.ssl.SSLHandshakeException: SSL handshake aborted: ssl=0xd5561908: I/O error during system call, Connection reset by peer
This happens in the file ConfigFetchHttpClient.java in the catch block in fetch() method. The url is that firebase is trying to hit is:
https://firebaseremoteconfig.googleapis.com/v1/projects/98058910649/namespaces/firebase:fetch
Here is the stacktrace
Hi @GauravCreed, I’m glad you were able to find a solution for your issue.
Using “https” for all your API calls is definitely a good thing in terms of security.
This should be okay to do.
This seems a bit counterproductive, since you’ve setup all APIs as https, and yet you’re replacing them on your
getCorrectURL
.In the Android official docs,
android:usesCleartextTraffic
: indicates whether the app intends to use cleartext network traffic, such as cleartext HTTP. The default value for apps that target API level 27 or lower is “true”. Apps that target API level 28 or higher default to “false”.There hasn’t been any update yet on the bug ticket. And unfortunately, there’s no officially recommended solution yet for this use case.
However, I do think that if this works for you and it should be fine. As long as you know the security issue this may present. In the Android official docs, “The key reason for avoiding cleartext traffic is the lack of confidentiality, authenticity, and protections against tampering; a network attacker can eavesdrop on transmitted data and also modify it without being detected.”