I have a React native application with configured using react native firebase lib and added the module of Crashlytics.
Everything works okay but when i try to log an error using recordError()
method or when i just use crash()
its just logs errors in the dashboard in native form. I tried to find a way of getting js error to the dashboard but so far nothing has worked.
Is this possible or i should try a different way? maybe another platform like bugsnag or sentry?
This is working for me and showing javascript stacktrace
:
....
catch (error) {
crashlytics().recordError(new Error(error));
}
you can use react-native-exception-handler to get a js stack trace for the crash and also send js stack trace to firebase crashlytics
like this
import {getJSExceptionHandler} from 'react-native-exception-handler';
setJSExceptionHandler((error, isFatal) => {
if(isFatal)
{
crashlytics().recordError(new Error(error));
}
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With