I have a Flutter app and I am using remote config to retrieve some information, but the code throws an exception when fetching data.
This is my method for setting up remote config.
Future<RemoteConfig> setupRemoteConfig() async {
final RemoteConfig remoteConfig = await RemoteConfig.instance;
// Enable developer mode to relax fetch throttling
remoteConfig.setConfigSettings(RemoteConfigSettings(debugMode: true));
remoteConfig.setDefaults(<String, dynamic>{
'categories': "food,drink",
});
await remoteConfig.fetch(expiration: const Duration(hours: 5));
await remoteConfig.activateFetched();
return remoteConfig;
}
This code throws the following exception:
Exception: Unable to fetch remote config
and in my console it says:
W/FirebaseRemoteConfig(10456): IPC failure: 6503:NOT_AVAILABLE
How can I fix this?