cordova-plugin-firebasex icon indicating copy to clipboard operation
cordova-plugin-firebasex copied to clipboard

Report render process crashes to Crashlytics (plugin hook will be available in Cordova Android 12)

Open peitschie opened this issue 2 years ago • 0 comments

Feature request

Hi!

I recently helped merge a plugin hook into cordova-android that allows a plugin to listen for the WebViewClient.onRenderProcessGone in order to be informed when the chrome renderer has been terminated or crashes on Android: https://github.com/apache/cordova-android/pull/1574

This information could be useful to log to Crashlytics, to provide more context to a reported crash.

Implementation is fairly straightforward. In Cordova Android 12, a new method is available: boolean onRenderProcessGone(final WebView view, RenderProcessGoneDetail detail). This plugin could override this hook, and log the resulting detail to Crashlytics.

Reference for RenderProcessGoneDetail

To exercise the chrome render crash behaviour, the easiest way is to use Chrome Debugger, and execute a command like this: navigator.app.loadUrl("chrome://crash")

Chrome has a bunch of built-in crash types that can be seen by hitting chrome://about/.

peitschie avatar Apr 24 '23 03:04 peitschie