I would like to use firebase_crashlytics in my Flutter app to report errors to the Firebase panel, in the Google console ; to install it, I followed instructions found here.
Reports are correctly uploaded on Android, but not on iOS.
I think I correctly initialize Firebase (because it works on Android emulators+smartphones):
// https://github.com/Alystrasz/pandemia/blob/crashlytics/lib/main.dart#L13
await Firebase.initializeApp();
// Pass all uncaught errors from the framework to Crashlytics.
FlutterError.onError = FirebaseCrashlytics.instance.recordFlutterError;
runZoned<Future<void>>(() async { ... }, onError: FirebaseCrashlytics.instance.recordError);
Complete code can be found here.
I have different outputs while using Android Studio and Xcode:
- With Android Studio, crashlytics seems to be correctly installed, detects error reports but doesn't send them:
Launching lib/main.dart on iPhone 11 Pro Max in debug mode...
Running Xcode build...
Xcode build done. 18,2s
[Firebase/Crashlytics] Version 4.1.1
[Firebase/Crashlytics] Packaged report with id 'd318f09e62a8461d9edf13680510fa62' for submission
- With Xcode, the app seems not detected by Firebase:
2020-09-24 11:46:00.485966+0200 Runner[37501:274018] 6.26.0 - [Firebase/Core][I-COR000005] No app has been configured yet.
2020-09-24 11:46:00.488355+0200 Runner[37501:273681] [Firebase/Crashlytics] Version 4.1.1
2020-09-24 11:46:00.542082+0200 Runner[37501:274071] flutter: Observatory listening on http://127.0.0.1:56093/1AM4rEq2lqY=/
2020-09-24 11:46:00.735759+0200 Runner[37501:274017] 6.26.0 - [Firebase/Crashlytics][I-CLS000000] Failed to download settings Error Domain=FIRCLSNetworkError Code=-5 "(null)" UserInfo={status_code=404, type=2, request_id=, content_type=text/html; charset=utf-8}
UPDATE
I added FirebaseApp.configure() to AppDelegate.swift, the app configuration issue seems to be solved; error reports are now packaged, but still not sent.
2020-09-24 14:01:53.716905+0200 Runner[55060:407928] [Firebase/Crashlytics] Version 4.1.1
2020-09-24 14:01:53.771633+0200 Runner[55060:408460] flutter: Observatory listening on http://127.0.0.1:61610/YkK1eiGN7tA=/
2020-09-24 14:01:53.938667+0200 Runner[55060:408467] 6.26.0 - [Firebase/Crashlytics][I-CLS000000] Failed to download settings Error Domain=FIRCLSNetworkError Code=-5 "(null)" UserInfo={status_code=404, type=2, request_id=, content_type=text/html; charset=utf-8}
2020-09-24 14:01:54.012946+0200 Runner[55060:408412] [Firebase/Crashlytics] Packaged report with id '9e0a2f84f9a8474f85c102a7f5f195ef' for submission