mikelambert / react-native-fabric-crashlytics

Implements crash reporting on top of react-native-fabric library.
ISC License
114 stars 21 forks source link

Not getting the react-native crash. #8

Open rohitgoyal opened 7 years ago

rohitgoyal commented 7 years ago

I have integrated this library. Now I am confused what kind of crash report would I be getting. I am getting this as crash report for one of the crash which is a react-native crash and not a ObjC/Swift crash.

Fatal Exception: NSInternalInconsistencyException
0  CoreFoundation                 0x187f6e1c0 __exceptionPreprocess
1  libobjc.A.dylib                0x1869a855c objc_exception_throw
2  CoreFoundation                 0x187f6e094 +[NSException raise:format:]
3  Foundation                     0x1889fb808 -[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:]
4  MY_APP                         0x10029f364 __33-[RCTUIManager setFrame:forView:]_block_invoke (RCTUIManager.m:431)
5  libdispatch.dylib              0x186df9200 _dispatch_call_block_and_release
6  libdispatch.dylib              0x186df91c0 _dispatch_client_callout
7  libdispatch.dylib              0x186e07444 _dispatch_queue_serial_drain
8  libdispatch.dylib              0x186dfc9a8 _dispatch_queue_invoke
9  libdispatch.dylib              0x186e0938c _dispatch_root_queue_drain
10 libdispatch.dylib              0x186e090ec _dispatch_worker_thread3
11 libsystem_pthread.dylib        0x1870022b8 _pthread_wqthread
12 libsystem_pthread.dylib        0x187001da4 start_wqthread
ikzjfr0 commented 7 years ago

Similar case here

I can see the react native report in fabric if I use something like below via react-native-fabric 
Crashlytics.recordError('something went wrong!');

image

but no report will be shown in fabric if it's a crash issue or unhandled issue. For exapmle, it does not show in fabric if i use something like this:

var err = new Error('my error')
 throw err
jpshelley commented 7 years ago

I'm assuming its hard to know what the issue is without seeing some code. If you aren't calling the init function then the global error handler will never be set.

easybird commented 7 years ago

I have the same issue as @ikzjfr0 on ios. The recordError function is working, but an uncaught crash is not reported in Crashlytics.. On top of that, the app doesn't crash anymore in release mode on my device. It still crashes in the emulator though (red screen)

==> and obviously init() is called in my index.js file and I am not in DEV mode

IOS debug output says: 2017-06-26 14:51:23.377 [error][tid:com.facebook.react.JavaScript] 'uncaught', '' 2017-06-26 14:51:23.378022+0200 MyApp[1645:530971] 'uncaught', ''