Stack traces are inconsistent and sometimes wrong

Hello,
I’m having a weird issue with the stack traces for our iOS React Native app. The same errors in the same iOS distribution and version sometimes have different stack traces when viewed in Sentry. Sometimes the stack traces are correct, but sometimes they are completely wrong and make no sense at all. Here’s an example. The first link has a correct stack trace. The second link is showing some unrelated files:

https://sentry.io/share/issue/7a8cc08623f9479fb1f3054e1deac645/

https://sentry.io/share/issue/950acc648eac4820bbceb72a22696cca/

Why is this happening and how can I fix it?

Can you please not post the share links, we can’t inspect what’s going on there?!

Which links do you need? Do these work for you?

https://sentry.io/organizations/ginger-labs-inc/issues/1119045543/events/3579191eeb8247fdbc69f97ea2fc870f/?project=1393587

https://sentry.io/organizations/ginger-labs-inc/issues/1119063968/events/6cd2e864438a4fddbab695c33cd8a763/?project=1393587

Yes, these help thx.
OK this is really odd, I’ve never seen this before also since the crash seems to be from the same device. Which react-native version are you using?
Also, if you have time you could try our new SDK

It changes a lot of the internals, I would be curious if this also happens there.
Anyway, thanks for bringing this up, if you are aware how to reproduce this let me know.

This build was using RN 0.60.3. Right now we’re on RN 0.60.4. I can try updating to the latest SDK and see if that makes any difference.

Here’s another weird one: https://sentry.io/organizations/ginger-labs-inc/issues/1124596237/events/114efa30858e46dc90a5afece9cbc9ca/?project=1393587&query=is%3Aunresolved&statsPeriod=14d

This error is being reported for distribution 172, and there’s a stack trace visible, but I don’t think we ever actually uploaded a main.jsbundle or sourcemap for this distribution. Our CircleCI job, which handles this, failed just after uploading that build to Testflight but before any of the source files or sourcemaps had been uploaded to Sentry, so I’m not sure where the stack trace I’m seeing is actually coming from. I looked over our artifacts for that release and don’t see anything for 172 in there either: https://sentry.io/organizations/ginger-labs-inc/releases/com.gingerlabs.twobird.production-1.0/artifacts/?cursor=100%3A6%3A0&project=1393587

The update to the RN beta doesn’t seem to have made any difference. Here’s an example of a bad stack trace from Sentry RN 1.0.0-beta 6: https://sentry.io/organizations/ginger-labs-inc/issues/1189254967/?project=1393587&query=is%3Aunresolved&statsPeriod=14d

Can you tell if the line reported is even remotely close to the crash that caused it?
Also, are you using typescript?

Yes, we’re using Typescript. Whether the line reported is close to the actual error varies. I think in this example the actual line that caused the error might be two lines under what Sentry is pointing to. But in this one, the lines that Sentry is pointing to aren’t even close to where the error actually came from: It’s showing a stack trace from one of the libraries we’re using when that’s an error that’s being thrown from within our code.