Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linked error are not symbolicated in Debug builds #2118

Closed
Yupeng-li opened this issue Mar 7, 2022 · 9 comments · Fixed by #3920
Closed

Linked error are not symbolicated in Debug builds #2118

Yupeng-li opened this issue Mar 7, 2022 · 9 comments · Fixed by #3920

Comments

@Yupeng-li
Copy link

Environment

How do you use Sentry?
Sentry SaaS (sentry.io)

Which SDK and version?
@sentry/react-native 3.2.13

Steps to Reproduce

I need to report inner error when throwing exceptions, and LinkedErrors is the solution I found. To link two error, I assigned the inner error to the cause property of the final error.

//....
finalError.cause = innerError
Sentry.captureException(finalError)

When I tested, both the higher level error and the inner error are logged to sentry, however the stack trace was minified. But if I don't link them, the stack trace worked fine, so I think it's a bug. Here is a mini repo to reproduce the issue. https://github.com/Yupeng-li/sentry-test

The repo is a react-native app with two simple buttons: one throws an error and another throws an error with cause property.

Please modify the DSN before running it.

Expected Result

Linked error should have original stack trace.

This is what I got when I reported the error directly. (Throw an error)
image

Actual Result

This is what I got when I reported the error with cause. (Throw an error with cause)
linked errors

@marandaneto
Copy link
Contributor

This integration is within the node package, wondering if that makes any difference.
@AbhiPrasad or @kamilogorek do you know what's going on? thanks

@AbhiPrasad
Copy link
Member

This is strange, it seems that RewriteFrames doesn't update the stacktrace here?

new RewriteFrames({

Not sure if it's a general SDK bug, or just based on how react native sdk is configuring RewriteFrames, we need to test with a stock browser SDK app that uses LinkedErrors + RewriteFrames.

@marandaneto
Copy link
Contributor

Thanks @AbhiPrasad
Let us know if you find something on your testing.

@marandaneto marandaneto added this to To Do in kanban via automation Mar 21, 2022
@marandaneto marandaneto moved this from To Do to In progress in kanban Mar 21, 2022
@marandaneto
Copy link
Contributor

@Yupeng-li have you tested on a release or debug mode?

I can reproduce the issue on debug mode but not on release mode.

The issue is here -> https://github.com/getsentry/sentry-react-native/blob/main/src/js/integrations/debugsymbolicator.ts
We are apparently not accounting for all the exceptions when symbolicating on the device.

@marandaneto marandaneto moved this from In progress to Needs Discussion in kanban Mar 23, 2022
@marandaneto
Copy link
Contributor

That's also the reason why the platform is node sometimes -> https://github.com/getsentry/sentry-react-native/blob/main/src/js/integrations/debugsymbolicator.ts#L78

@marandaneto marandaneto moved this from Needs Discussion to To Do in kanban Mar 25, 2022
@Yupeng-li
Copy link
Author

@marandaneto Thank you for the update. I only tested on debug mode. I will test the release mode as soon as I have a chance.

@Yupeng-li
Copy link
Author

Hi @marandaneto, sorry for the late reply. I tested with the release version and it worked well as expected. Thank you for the help.

image

@marandaneto marandaneto added this to the 5.0.0 milestone Dec 7, 2022
@krystofwoldrich
Copy link
Member

Based on the last comment is this done?

@liamjones
Copy link
Contributor

liamjones commented Dec 7, 2022

@krystofwoldrich I believe it's only working for release mode, it's still broken in debug builds, isn't it?

@krystofwoldrich krystofwoldrich changed the title It doesn't show original stack trace for linked errors Linked error are not symbolicated in Debug builds Dec 15, 2023
@lucas-zimerman lucas-zimerman moved this from To Do to In progress in kanban Jun 27, 2024
kanban automation moved this from In progress to Done Jul 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

8 participants