Skip to content

fix(integrations): Don't add empty stack trace in RewriteFrames #5625

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

Merged
merged 8 commits into from
Aug 30, 2022

Conversation

lucas-zimerman
Copy link
Contributor

@lucas-zimerman lucas-zimerman commented Aug 22, 2022

This PR avoids adding an empty stack trace when a stack trace is not defined.
By doing that, you'll no longer see the following error message at Sentry:
image

Fixes #5609 and potentially fixes getsentry/sentry-react-native#2429

Before submitting a pull request, please take a look at our
Contributing guidelines and verify:

  • If you've added code that should be tested, please add tests.
  • Ensure your code lints and the test suite passes (yarn lint) & (yarn test).

.replace(/^[A-Z]:/, '') // remove Windows-style prefix
.replace(/\\/g, '/') // replace all `\\` instances with `/`
.replace(/^[A-Z]:/, '') // remove Windows-style prefix
.replace(/\\/g, '/') // replace all `\\` instances with `/`
Copy link
Contributor Author

@lucas-zimerman lucas-zimerman Aug 22, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

git is doing those spacing changes automatically, should I leave it as is or return to the original spacing?
EDIT: It seems like vscode enforces the removal of additional spaces where prettier wants the additional spaces.

@lucas-zimerman lucas-zimerman marked this pull request as ready for review August 22, 2022 14:57
@AbhiPrasad AbhiPrasad changed the title Ignore empty stack trace fix(integrations): Don't add empty stack trace in RewriteFrames Aug 29, 2022
Copy link
Member

@AbhiPrasad AbhiPrasad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @lucas-zimerman!

@AbhiPrasad AbhiPrasad enabled auto-merge (squash) August 30, 2022 15:40
@AbhiPrasad AbhiPrasad merged commit 51c016f into getsentry:master Aug 30, 2022
@nandorojo
Copy link

nandorojo commented Feb 8, 2023

Hey guys, I'm still seeing this error here. I'm struggling to get my Expo Hermes source maps working properly. This is the issue example.

Screenshot 2023-02-08 at 4 11 28 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error on RewriteFrames when no StackTrace is available. exception.values.0.stacktrace.frames: Missing value for required attribute
3 participants