New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
[馃摎] Crashlytics recordFlutterFatalError #8815
Comments
I came here to ask this very question. We recently upgraded our various FlutterFire plugins, changed our implementation to match the new documentation and now everything is being logged as fatal. My void main() async {
await runZonedGuarded(() async {
// Initialise Firebase before rendering the app, see: https://firebase.flutter.dev/docs/overview/#initializing-flutterfire
WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp();
// Error logging
FlutterError.onError = FirebaseCrashlytics.instance.recordFlutterFatalError;
Isolate.current.addErrorListener(RawReceivePort((pair) async {
final List<dynamic> errorAndStacktrace = pair;
await FirebaseCrashlytics.instance.recordError(
errorAndStacktrace.first,
errorAndStacktrace.last,
);
}).sendPort);
// Get cracking
runApp(MyApp());
}, (error, stack) {
FirebaseCrashlytics.instance.recordError(error, stack, fatal: true);
});
} Possibly related: #8779 |
@oodavid is Isolate.current.addErrorListener(RawReceivePort((pair) async {
final List<dynamic> errorAndStacktrace = pair;
await FirebaseCrashlytics.instance.recordError(
errorAndStacktrace.first,
errorAndStacktrace.last,
);
}).sendPort); Actually working for you? I'm getting compilation errors - |
Having the same issue, |
Hello, on the new documentation of crashlytics https://firebase.google.com/docs/crashlytics/get-started it is written to use
FlutterError.onError = FirebaseCrashlytics.instance.**recordFlutterFatalError**;
instead on https://pub.dev/packages/firebase_crashlytics it is written to use
FlutterError.onError = FirebaseCrashlytics.instance.**recordFlutterError**;
I always used the second one but on the new documentation it use recordFlutterFatalError and this is causing me a lot of trouble on the crashlytics dashboard because every error is marked as a crash.
Why then? Thank you
The text was updated successfully, but these errors were encountered: