Closed laterdayi closed 9 months ago
Instance of 'FileHandler' failed to report error Unable to create log file and write log
runZonedGuarded<Future<void>>(() async { WidgetsBinding widgetsBinding = WidgetsFlutterBinding.ensureInitialized(); FlutterNativeSplash.preserve(widgetsBinding: widgetsBinding); String path = "/storage/emulated/0/log.txt"; final catcher2 = Catcher2(rootWidget: const MyApp(), ensureInitialized: true); Catcher2Options debugOptions = Catcher2Options( SilentReportMode(), [ ConsoleHandler(), FileHandler( File(path), printLogs: true, ) ], ); Catcher2Options releaseOptions = Catcher2Options(SilentReportMode(), []); catcher2.updateConfig( debugConfig: debugOptions, releaseConfig: releaseOptions, ); await Global.init(); runApp(const MyApp()); handleSetStatusBar(); FlutterNativeSplash.remove();
2 I/flutter ( 4282): [2024-02-18 16:15:17.763066 | Catcher 2 | INFO] Report result: true 2 I/flutter ( 4282): [2024-02-18 16:15:17.763295 | Catcher 2 | INFO] Report result: false 2 I/flutter ( 4282): [2024-02-18 16:15:17.763398 | Catcher 2 | WARNING] Instance of 'FileHandler' failed to report error
No response
*
You should neither use runApp yourself nor use runZoneGuarded. Please follow the README for the setup instructions.
runApp
runZoneGuarded
Does not work after deletion
Description
Instance of 'FileHandler' failed to report error Unable to create log file and write log
Minimal Reproduction
Exception or Error
Expected Behaviour
Screenshots
No response
Additional context
No response
Device
*
OS
*
Flutter version
*
catcher_2 version
*
Checklist