Firebase Remote Configuration Cache Expiration Time in Release

I am trying to configure the remote firebase configuration for release mode by setting the developer mode to false . But with an expiration time of less than 3000 (maybe a little less, determined experimentally) seconds, it cannot receive data. It throws a FirebaseRemoteConfigFetchThrottledException

 FirebaseRemoteConfigSettings configSettings = new FirebaseRemoteConfigSettings.Builder() .setDeveloperModeEnabled(false) .build(); 

And with .setDeveloperModeEnabled(true) it allows me to set any time even 0 and work well.

Here is the complete hunk:

 new Handler().postDelayed(new Runnable() { @Override public void run() { mFirebaseRemoteConfig = FirebaseRemoteConfig.getInstance(); FirebaseRemoteConfigSettings configSettings = new FirebaseRemoteConfigSettings.Builder() .setDeveloperModeEnabled(false) .build(); mFirebaseRemoteConfig.setConfigSettings(configSettings); mFirebaseRemoteConfig.setDefaults(R.xml.remote_config_defaults); mFirebaseRemoteConfig.fetch(CACHE_EXPIRATION) .addOnSuccessListener(new OnSuccessListener<Void>() { @Override public void onSuccess(Void aVoid) { Log.i("info32", "remote config succeeded"); mFirebaseRemoteConfig.activateFetched(); } }) .addOnFailureListener(new OnFailureListener() { @Override public void onFailure(@NonNull Exception exception) { Log.i("info32", "remote config failed"); } }); } }, 0); 

Could you explain what the problem is?

+5
source share
1 answer

The remote configuration implements client-side throttling to prevent errors or malicious clients from exploding Firebase servers with high-fetch requests. One user reported that the limit is five requests per hour. I found no restriction anywhere, although I confirmed that five quick attempts activate throttling.

Caching configuration values ​​is explained in the documentation . Due to throttling restrictions, your released application will not be able to immediately see changes in Remote Config values. Cached values ​​will be used until the next fetch is allowed. The default cache expiration date is 12 hours.

+11
source

All Articles