react-native-exception-handler
react-native-exception-handler copied to clipboard
setNativeExceptionHandler call back not working
I am using setNativeExceptionHandler and when app crash call back not triggering. I am using below code in index file.
setNativeExceptionHandler((errorString) => {
console.log('setNativeExceptionHandler');
fetch('http://localhost:3000/logvalues').then(res => res.json())
.then(res => {
}).catch(e => {
})
}, false);
Neither console nor fetch api is working after crash. I am stuck in this.
Any help would be appreciated.
same issues
me too
setNativeExceptionHandler only works in bundle mode is that the case ?
Does not work in dev and prod builds.
ios works fine, but android doesn't work
any solution here?
+1
For anyone still interested, I hacked the library's code to use
Thread currentThread = Thread.currentThread();
currentThread.setUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {
instead of
Thread.setDefaultUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {
and it now appears to be calling that block of code on the Java side.