Home > other >  Flutter app crash without error ( Android - Ios ) just in release mode
Flutter app crash without error ( Android - Ios ) just in release mode

Time:01-20

My App crash in just release mode ( never in debug mode ) . and I can't know the reason of that , I'm trying to add firebase crashlytics but after the app crashing there is no crash session on firebase console , so can any one help me ?

Future<void> main() async {


  runZonedGuarded<Future<void>>(() async {
    WidgetsFlutterBinding.ensureInitialized();
    await Firebase.initializeApp();
    // The following lines are the same as previously explained in "Handling uncaught errors"
    //  FlutterError.onError = FirebaseCrashlytics.instance.recordFlutterError;
    FlutterError.onError = (FlutterErrorDetails details) async {
      await FirebaseCrashlytics.instance.recordFlutterError(details);
      exit(0);
    };
    runApp(MyApp());
  }, (error, stack) => FirebaseCrashlytics.instance.recordError(error, stack));
}

Update : In debug mode I got this exception randomly happen when click on text field or back button :

Choreographer(25563): Skipped 38 frames! The application may be doing too much work on its main thread.

CodePudding user response:

Try running flutter clean and flutter pub get. Then, run your app.

If that doesn't work try running in profile mode.

CodePudding user response:

Run your app in debug mode and if there are exceptions caught in the debug console, then your issue will be resolved

  •  Tags:  
  • Related