React Native SDK: iOS Crash produces 2 issues while I expect one

I have a “brand new” React Native app, I followed the Getting Started Guide for React Native. I have the project in my Sentry account, I have used the sentry-wizard for patching the files needed for uploading sourcemaps / debug symbols.

To run a Release variant of the app in iOS I use:

npx react-native run-ios --configuration Release

Once the build is ready and the app is opened in the Simulator, I checked in sentry.io for the debug symbols and the source maps, all of them were uploaded and were available for download. (I, also, have disabled bitcode option in Xcode.)

In the app I have a button, that throws an Error:

<Button
  title={'Crash Test'}
  onPress={() => {
    throw new Error('My first Sentry error!');
  }}
/>

Once I press the button, the app crashses and in sentry.io I can see the issues created for the crash. The problem (I think it’s a problem) is that I have two issues for the same crash, one of them is “readable” (includes line and excerpt of the code where the Error was thrown), the other one not so much.

Is that expected? Or am I missing something in the setup process?

I also tested the app with a Release variant of the Android app, with:

 npx react-native run-android --variant release

The JS bundle and its sourcemap is uploaded just fine, again.

Here’s a screenshot of my Issues page with two releases, one for iOS and for Android. I pressed the button in each app once, totalling of 3 issues, one for Android and two for iOS:

Could you please link to the Sentry project that has these issues? I’m interested in details such as the version of the SDK and which SDK reported those. I suspect it was one coming from sentry.cocoa and the other from sentry.javascript.react-native. But I’m not sure why/how that’s happening. In any regard it sounds like a bug so I filed a bug report here: Duplicate issue reporting on iOS · Issue #2069 · getsentry/sentry-react-native · GitHub

Sorry for the late reply!

That’s the project, it contains only those issues and one random Out of memory issue:

The logged RCTFatalException says:

SDK

Name sentry.cocoa
Version 7.9.0

The “proper” issue from React Native:

SDK

Name sentry.javascript.react-native
Version 3.2.13

Seems like RN is throwing an Objective-C exception and the cocoa SDK is capturing that too.
It’s possible we’ll need to filter out such exception when using the cocoa SDK in the React Native context.

I’ll add this context to GitHub: Duplicate issue reporting on iOS · Issue #2069 · getsentry/sentry-react-native · GitHub
Please follow the issue there and lets continue this there.