'Unable to fetch remote config. Cached or default values will be 'used' flutter

4,742

This worked fine for me,

    await remoteConfig.ensureInitialized();
Share:
4,742
Chanaka Weerasinghe
Author by

Chanaka Weerasinghe

Updated on December 20, 2022

Comments

  • Chanaka Weerasinghe
    Chanaka Weerasinghe over 1 year

    I have setup firebase config for flutter

    According to documentation https://pub.dev/packages/firebase_remote_config#-readme-tab-

    My key is

    enter image description here

    then I have Published also then i tried following code and it will return

    'Unable to fetch remote config. Cached or default values will be ''used'

    could you please point issue

    I have tried those also

    Firebase Remote Config - Initial fetch return local default values

    Remote config in Flutter app throws exception on fetch

    try {
                  remoteConfig.getString('welcome')[![enter image description here][1]][1]
                  // Using default duration to force fetching from remote server.
                  await remoteConfig.fetch(expiration: const Duration(seconds: 0));
                  await remoteConfig.activateFetched();
         } on FetchThrottledException catch (exception) {
                  // Fetch throttled.
                  print(exception);
        } catch (exception) {
                  print(
                      'Unable to fetch remote config. Cached or default values will be '
                      'used');
    }