Skip to content
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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] runAppFunction not working #274

Open
AnhTH260101 opened this issue Jun 13, 2024 · 0 comments
Open

[BUG] runAppFunction not working #274

AnhTH260101 opened this issue Jun 13, 2024 · 0 comments
Assignees
Labels
New issue New issue which has not been checked yet

Comments

@AnhTH260101
Copy link

i using catcher to config my app but i give this log

I/flutter (30547): [2024-06-13 16:33:05.667079 | Catcher | WARNING] Screenshots path is empty. Screenshots won't work.
I/flutter (30547): [2024-06-13 16:33:05.675661 | Catcher | FINE] Catcher configured successfully.
I/flutter (30547): [2024-06-13 16:33:05.874990 | Catcher | INFO] Setup localization lazily!
I/flutter (30547): [2024-06-13 16:33:05.874990 | Catcher | INFO] Setup localization lazily!
I/flutter (30547): null
I/flutter (30547): null
I/flutter (30547): [2024-06-13 16:33:05.913393 | Catcher | WARNING] Couldn't use report mode because you didn't provide navigator key. Add navigator key to use this report mode.
I/flutter (30547): [2024-06-13 16:33:05.913393 | Catcher | WARNING] Couldn't use report mode because you didn't provide navigator key. Add navigator key to use this report mode.

This is my config code
Future main() async {
//
F.appFlavor = Flavor.dev;

//
final Catcher catcher = Catcher(
runAppFunction: () async => runner.main(),
ensureInitialized: true,
);

Directory? externalDir;
String path = '';

if (Platform.isAndroid) {
externalDir = await getExternalStorageDirectory();
}
if (Platform.isIOS || Platform.isMacOS) {
externalDir = await getApplicationDocumentsDirectory();
}

if (externalDir != null) {
path = externalDir.path;
}

//
final ReportMode debugReportMode = DialogReportMode();

// Debug configuration with dialog report mode.
final CatcherOptions debugOptions = CatcherOptions(
debugReportMode,
[
FirebaseHandler(),
ConsoleHandler(),
],
localizationOptions: L10n.delegate.supportedLocales
.map((Locale locale) => LocalizationOptions(locale.languageCode))
.toList(),
screenshotsPath: path,
);

//
final ReportMode releaseReportMode = PageReportMode();

// Release configuration.
// Same as above, but once user accepts dialog,
// user will be prompted to send email with crash to support.
final CatcherOptions releaseOptions = CatcherOptions(
releaseReportMode,
[
ToastHandler(),
],
);

catcher.updateConfig(
debugConfig: debugOptions,
releaseConfig: releaseOptions,
);
}

i detect runner.main() not call so my app only show white screen

@AnhTH260101 AnhTH260101 added the New issue New issue which has not been checked yet label Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
New issue New issue which has not been checked yet
Projects
None yet
Development

No branches or pull requests

2 participants