firebase-android-sdk: Remote Config HTTP errors for some RTL locales
Environment
- Android Studio version: Android Studio Chipmunk | 2021.2.1 Patch 1
- Firebase Component: Remote Config
- Component version: firebase-bom:30.1.0
The problem
I have an application that supports multiple locals languages and remote configurations work fine with any LTR language (EN, FR, etc) but it gives me FirebaseRemoteConfigServerException in all the RTL languages (I have tried Arabic, Urdu and Persian)
Steps to reproduce:
Just setting the apps locale to any RTL language will give this error. FirebaseRemoteConfigServerException: Fetch failed: The server returned an unexpected error. 400 bad request
Relevant Code:
private val remoteConfig by lazy {
val settings = remoteConfigSettings {
minimumFetchIntervalInSeconds = if (BuildConfig.DEBUG) {
0
} else {
60 * 30
}
}
val defaults = mutableMapOf<String, Any>(
"a" to true,
"b" to true
)
Firebase.remoteConfig.apply {
setConfigSettingsAsync(settings)
setDefaultsAsync(defaults)
}
}
fun init() {
loadSettings()
}
private fun loadSettings() {
remoteConfig.fetchAndActivate()
.addOnSuccessListener {
Toast.makeText(context, "Done", Toast.LENGTH_SHORT).show()
}.addOnFailureListener {
Toast.makeText(context, "$it", Toast.LENGTH_SHORT).show()
}
}
and in my application
override fun onCreate() {
super.onCreate()
remoteConfigUtil.init()
...
}
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 6
- Comments: 17 (7 by maintainers)
Links to this issue
Commits related to this issue
- Pass "Locale-US" to SimpleDateFormat while formatting first-open time. This makes sure that first-open time digits are not formatted to the local language characters. This change is a fix for #3757 — committed to firebase/firebase-android-sdk by richaurora 2 years ago
- Pass "Locale-US" to SimpleDateFormat while formatting first-open time. This ensures that the english numerals in the timestamp are not converted to the local language numerals. This is a fix for #375... — committed to firebase/firebase-android-sdk by richaurora 2 years ago
- Pass "Locale-US" to SimpleDateFormat while formatting first-open time… (#3877) * Pass "Locale-US" to SimpleDateFormat while formatting first-open time. This ensures that the english numerals in the t... — committed to firebase/firebase-android-sdk by richaurora 2 years ago
Yep! You beat me to it @JonasTrikiSPV! 😄 This is fixed in Remote Config v21.1.1 and Firebase BOM v30.3.0. Thanks everyone.
Thanks for your patience, everyone. We’ll be releasing the new version of the SDK with the fix next week and in the meantime have marked v21.1.0 as deprecated. We recommend using the previous version of Remote Config (v21.0.2) in the meantime, which does not contain this bug.
I’ll update this issue once that new version is live. Thanks!
The newly released
com.google.firebase:firebase-bom:30.3.0
containscom.google.firebase:firebase-config:21.1.1
- is the bug fixed in this version? 😊Latest firebase_core 1.19.2 depends on Android SDK
v30.1.0
: https://github.com/firebase/flutterfire/blob/796f1e744fa361a023aba4ec7f491387a9e2f0f8/packages/firebase_core/firebase_core/android/gradle.properties#L2 ([Edit] updated tov30.3.0
now: https://github.com/firebase/flutterfire/blob/bf1d9be11a59475be173b01184efb53d92d152fe/packages/firebase_core/firebase_core/android/gradle.properties#L2)The problem was fixed in
v30.3.0
, so it is needed to wait for the firebase_core release which depends on Android SDKv30.3.0
, or use an older version that does not have this problem(I don’t know which version applies), or fork it yourself.@mono0926 @costacoz Looks like the change itself is already in
master
there, they just need to hammer it through their release process. I opened an issue in the FlutterFire repo to nudge things along, hopefully.Thanks for reporting the issue @ilyasipek! Based on the error it looks like it might be a server-side issue. We’re investigating now and will update this thread when we know more.
@zmeggyesi I’ve updated to the latest available
firebase_remote_config
package. But during the release I still get message:The developer of Firebase Remote Config (com.google.firebase:firebase-config) has reported critical issues with version 21.1.0
I’m also very curious whether the new version be present soon in flutter package.Does this upgrade need to be propagated manually to the Flutter/Dart packages? Or will it be pulled in automatically, without having to upgrade the Pub dependencies?
Thanks for replying @danasilver, any updates? My app is already in production with thousands of users! İ need help please 🥺