getsentry / sentry-react-native

Official Sentry SDK for React Native
https://sentry.io
MIT License
1.58k stars 337 forks source link

Crash in -[RNSentry swizzleInvokeWithBridge:] #561

Closed sryze closed 5 years ago

sryze commented 5 years ago

OS:

Platform:

Output of node -v && npm -v && npm ls --prod --depth=0

v11.11.0
6.7.0
├── moment@2.22.2
├── native-base@2.8.1
├── numeral@2.0.6
├── UNMET PEER DEPENDENCY react@16.6.3
├── UNMET PEER DEPENDENCY react-native@0.57.2
├── react-native-config@0.11.6
├── react-native-datepicker@1.7.2
├── react-native-dialogs@1.0.2
├── react-native-document-picker@3.0.0 (github:Elyx0/react-native-document-picker#692af609f42a11e437e61deeaf2456a643371bd3)
├── react-native-elements@0.19.1
├── react-native-file-viewer@1.0.10
├── react-native-firebase@5.1.1
├── react-native-fs@2.11.15
├── react-native-google-analytics-bridge@7.0.0
├── react-native-image-picker@0.27.1
├── react-native-input-scroll-view@1.8.0
├── react-native-keyboard-aware-scroll-view@0.7.4
├── react-native-keyboard-manager@4.0.13-10
├── react-native-keyboard-spacer@0.4.1
├── react-native-keychain@3.0.0
├── react-native-linear-gradient@2.5.2
├── react-native-masked-text@1.9.2
├── react-native-modal@6.5.0
├── react-native-modal-datetime-picker@6.0.0
├── react-native-progress@3.5.0
├── react-native-push-notification@3.1.2
├── react-native-responsive-dimensions@1.0.2
├── react-native-router-flux@4.0.6
├── react-native-scalable-image@0.4.0
├── react-native-sentry@0.40.2
├── react-native-simple-radio-button@2.7.3
├── react-native-slider@0.11.0
├── react-native-sound-player@0.5.3
├── react-native-star-rating@1.1.0
├── react-native-tab-view@1.3.1
├── UNMET PEER DEPENDENCY react-native-vector-icons@6.1.0
├── react-native-version-number@0.3.5
└── rn-fetch-blob@0.10.13

npm ERR! peer dep missing: react@16.5.0, required by react-native@0.57.2
npm ERR! peer dep missing: react@^15.4, required by react-native-scalable-image@0.4.0
npm ERR! peer dep missing: react-native@^0.51.0, required by react-native-fs@2.11.15
npm ERR! peer dep missing: react-native@^0.41.2, required by react-native-scalable-image@0.4.0
npm ERR! peer dep missing: react-native-vector-icons@^4.2.0, required by react-native-elements@0.19.1

Config:

Sentry.config('https://...@sentry.io/...', {
        deactivateStacktraceMerging: false,
        logLevel: SentryLog.Debug,
        disableNativeIntegration: false,
        handlePromiseRejection: true
}).install()

I have following issue:

I have a few crashes apparently caused by Sentry itself (inside -[RNSentry swizzleInvokeWithBridge:]), here is a sample stack trace:

Exception Type:  EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000001, 0x000000019ea0b2c0
Termination Signal: Trace/BPT trap: 5
Termination Reason: Namespace SIGNAL, Code 0x5
Terminating Process: exc handler [2540]
Triggered by Thread:  0

Thread 0 Crashed:
0   CoreFoundation                  0x000000019ea0b2c0 _cow_failure + 32 (NSCopyOnWrite.m:18)
1   CoreFoundation                  0x000000019ea0b400 _cow_mutate_slow + 136 (NSCopyOnWrite.m:285)
2   CoreFoundation                  0x000000019e8cb750 -[__NSDictionaryM setObject:forKey:] + 204 (NSCopyOnWrite.h:130)
3   MyApp                           0x0000000104f274c4 __36-[RNSentry swizzleInvokeWithBridge:]_block_invoke_2 + 708 (RNSentry.m:179)
4   MyApp                           0x0000000104eb2d9c facebook::react::invokeInner(RCTBridge*, RCTModuleData*, unsigned int, folly::dynamic const&) + 248 (RCTNativeModule.mm:104)
5   MyApp                           0x0000000104eb2af8 invocation function for block in facebook::react::RCTNativeModule::invoke(unsigned int, folly::dy... + 88 (RCTNativeModule.mm:71)
6   libdispatch.dylib               0x000000019e3e7b9c _dispatch_call_block_and_release + 32 (init.c:1372)
7   libdispatch.dylib               0x000000019e3e9134 _dispatch_client_callout + 20 (object.m:511)
8   libdispatch.dylib               0x000000019e3f4f50 _dispatch_main_queue_callback_4CF + 1016 (inline_internal.h:2441)
9   CoreFoundation                  0x000000019e9740fc __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16 (CFRunLoop.c:1813)
10  CoreFoundation                  0x000000019e96ed78 __CFRunLoopRun + 1912 (CFRunLoop.c:3113)
11  CoreFoundation                  0x000000019e96e2e8 CFRunLoopRunSpecific + 452 (CFRunLoop.c:3247)
12  GraphicsServices                0x00000001a0c22be8 GSEventRunModal + 104 (GSEvent.c:2245)
13  UIKitCore                       0x00000001cc6b0088 UIApplicationMain + 216 (UIApplication.m:4347)

Steps to reproduce:

HazAT commented 5 years ago

I am closing all old issues, please if this is still a problem feel free to revive it. Also, consider moving to our new SDK @sentry/react-native if it still happens there please open a new issue.