Skip to content

Feat: Fallback to stacktrace parsing#5946

Open
lucas-zimerman wants to merge 2 commits intomainfrom
lz/4877
Open

Feat: Fallback to stacktrace parsing#5946
lucas-zimerman wants to merge 2 commits intomainfrom
lz/4877

Conversation

@lucas-zimerman
Copy link
Copy Markdown
Collaborator

@lucas-zimerman lucas-zimerman commented Apr 1, 2026

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

📜 Description

Use Sentry React Native stack trace parser when ReactNativeLibraries.Devtools?.parseErrorStack is not available.

The change did no impact on stack trace grouping. Still, I opted to always prefer ReactNativeLibraries.Devtools?.parseErrorStack to avoid any kind of break change.

💡 Motivation and Context

In the near future, ReactNativeLibraries.Devtools?.parseErrorStack will no longer exist.

💚 How did you test it?

Error with RN Parser https://sentry-sdks.sentry.io/issues/5005282269/events/a7874a2c8efb405caa1a81d0c0f3caab/?project=5428561
Error with Sentry Parser https://sentry-sdks.sentry.io/issues/5005282269/events/45fee3cad3cc43d3821a4121fa4ed80d/?project=5428561

📝 Checklist

  • I added tests to verify changes
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • All tests passing
  • No breaking changes

🔮 Next steps

Close #5943

I don't think this PR needs any changelog, since it gives no value to end users at the moment since they are not impacted by it.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 1, 2026

Semver Impact of This PR

None (no version bump detected)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


  • Feat: Fallback to stacktrace parsing by lucas-zimerman in #5946
  • Size analysis for React Native SDK by alwx in #5949
  • chore(deps): bump lodash from 4.17.23 to 4.18.1 by dependabot in #5953
  • chore(deps): bump yauzl to ^3.2.1 by antonis in #5950
  • chore(deps): bump brace-expansion to ^2.0.3 by antonis in #5951
  • chore(deps): bump @xmldom/xmldom to fix XML injection by antonis in #5952

🤖 This preview updates automatically when you update the PR.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 1, 2026

Fails
🚫 Pull request is not ready for merge, please add the "ready-to-merge" label to the pull request
Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against 5d1a1bf

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix prepared a fix for the issue found in the latest run.

  • ✅ Fixed: Fallback returning empty array can wipe exception frames
    • Added a check in symbolicate() to return null when sentryFrames.length === 0, preventing the truthy empty array from triggering replaceExceptionFramesInException and wiping original stack traces.

Create PR

Or push these changes by commenting:

@cursor push 052a53a070
Preview (052a53a070)
diff --git a/packages/core/src/js/integrations/debugsymbolicator.ts b/packages/core/src/js/integrations/debugsymbolicator.ts
--- a/packages/core/src/js/integrations/debugsymbolicator.ts
+++ b/packages/core/src/js/integrations/debugsymbolicator.ts
@@ -92,6 +92,9 @@
     );
 
     const sentryFrames = await convertReactNativeFramesToSentryFrames(stackWithoutInternalCallsites);
+    if (sentryFrames.length === 0) {
+      return null;
+    }
     return await fetchSourceContext(sentryFrames);
   } catch (error) {
     if (error instanceof Error) {

This Bugbot Autofix run was free. To enable autofix for future PRs, go to the Cursor dashboard.

Copy link
Copy Markdown
Contributor

@antonis antonis left a comment

Choose a reason for hiding this comment

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

Other than the bot feedback LGTM

Co-authored-by: Claude <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@antonis antonis left a comment

Choose a reason for hiding this comment

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

LGTM

@sentry
Copy link
Copy Markdown

sentry bot commented Apr 2, 2026

Sentry Build Distribution

App Name App ID Version Configuration Install Page
Sentry RN io.sentry.reactnative.sample 8.7.0 (82) Release Install Build

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ref: Drop parseErrorStack

2 participants