FirebaseRemoteConfigClientException: Firebase Installations failed to get installation auth token for fetch
01:29 22 Dec 2020

I'm getting exception as

com.google.firebase.remoteconfig.FirebaseRemoteConfigClientException: Firebase Installations failed to get installation auth token for fetch.

Can anyone tell me what's wrong with my code? I've initialised remote config like this

val firebaseRemoteConfig: FirebaseRemoteConfig by lazy { FirebaseRemoteConfig.getInstance() }

val firebaseRemoteConfigSettings = FirebaseRemoteConfigSettings.Builder()
        .setMinimumFetchIntervalInSeconds(0)
        .build()
firebaseRemoteConfig.setConfigSettingsAsync(firebaseRemoteConfigSettings)
    firebaseRemoteConfig.setDefaultsAsync(configDefault)
 if (NetworkConnectionHelper().connectionStatus(context)) {
        firebaseRemoteConfig.fetchAndActivate()
                .addOnCompleteListener { task: Task ->
                    if (task.isSuccessful) {
                        setup()
                        Utils.log("remoteConfig Success.")

                    } else {
                        Utils.log("remoteConfig failed.")
                        setup()
                    }

                }
                .addOnFailureListener { exception -> Utils.log("remoteConfig exception: $exception") }
                .addOnCanceledListener { Utils.log("remoteConfig initAssetList: cancelled ") }
    } else {
        setup()
    }

What I've tried so far

  1. I've added SHA1 Key to Google Api & services, under "Restrict usage to your Android apps" section
  2. Uninstall and install the app.
  3. Added SHA1 key in firebase console.
  4. tried with only "fetch()" method of remoteconfig instead of fetchAndActivie().

but nothing help, I'm unable to fetch values from remote config.

android firebase firebase-remote-config