这是indexloc提供的服务,不要输入任何密码
Skip to content

Remote Config HTTP errors for some RTL locales #3757

@ilyasipek

Description

@ilyasipek

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions