discuss: Android catches all plugin exceptions and logs message while iOS allows them to crash the app. Should they be made to work the same across platforms?
See original GitHub issueIn trying to create a plugin for Firebase Crashlytics, it seems that @capacitor/ios
allows exceptions within a plugin method to bubble all the way up and crash the app and @capacitor/android
catches all exceptions and logs a simple message. Android code is here and here.
To me, the Android implementation seems like it could hide problems within the plugin, never to be seen or reported by tools like Crashlytics. While good intentioned, this seems like a bad idea overall.
Would the Capacitor team welcome PRs that remove the exception catching logic from the android platform?
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (6 by maintainers)
Top Results From Across the Web
Detect and diagnose crashes - Android Developers
An Android app crashes whenever there's an unexpected exit caused by an unhandled exception or signal. An app that is written using Java...
Read more >Customize your Firebase Crashlytics crash reports - Google
Crashlytics provides four logging mechanisms out of the box: custom keys, custom logs, user identifiers, and caught exceptions. Add custom keys. Custom keys ......
Read more >App Crash Details Without Hassle with App Center ... - YouTube
Asking your user how a crash happened isn't usually very effective. Lucky for us there is now App Center Diagnostics! With this tool...
Read more >Understanding the exception types in a crash report
With iOS and iPadOS keyboard extensions, the host app terminates the keyboard extension if it takes too long to load. Although the exception...
Read more >Logging and remote error reporting in mobile apps
Log it. Need to check the error exceptions in Catch blocks? Log it. And the list goes on. ... We use logs while...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think that approach would work too. Either way, I suspect it makes sense to update all platforms to work the same.
It would be good to hear from the internal team on this though.
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Capacitor, please create a new issue and ensure the template is fully filled out.