Only if the world could be so straightforward.
I am getting the following error when I try to configure firebase remote config:
initRemoteConfig failed with error: [firebase_remote_config/internal] internal remote config fetch error
I/flutter ( 5503): —————-FIREBASE CRASHLYTICS—————-
I/flutter ( 5503): [firebase_remote_config/internal] internal remote config fetch error
I/flutter ( 5503): _initRemoteConfig failed with error: [firebase_remote_config/internal] internal remote config fetch error
The exception does not tell much, I know.
This is my code. Pretty simple:
Future<void> _initRemoteConfig() async {
try {
final cities = await loadDefaultConfig();
final remoteConfig = FirebaseRemoteConfig.instance;
await remoteConfig.setConfigSettings(RemoteConfigSettings(
fetchTimeout: const Duration(seconds: 30),
minimumFetchInterval: const Duration(hours: 1),
));
await remoteConfig.setDefaults(<String, dynamic>{CitiesRemoteDataSource.citiesKey:
cities});
await remoteConfig.fetchAndActivate();
} catch (e) {
debugPrintStack();
debugPrint("_initRemoteConfig failed with error: $e");
FirebaseCrashlytics.instance.recordError(
e,
null,
information: ['_initRemoteConfig failed with error: $e'],
);
}
}
My api keys are properly set and the Firebase Remote Config API is also enabled in the google console.