Skip to content

fix(core): preserve Hermes internal bytecode frames in Expo - #6848

Merged
alwx merged 5 commits into
getsentry:mainfrom
Trancever:codex/fix-hermes-internal-bytecode-frames
Oct 8, 2026
Merged

alwx merged 5 commits into
getsentry:mainfrom
Trancever:codex/fix-hermes-internal-bytecode-frames

Conversation

@Trancever

@Trancever Trancever commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

📜 Description

Preserve Hermes InternalBytecode.js frames as app:///InternalBytecode.js with in_app: false before Expo rewrites JavaScript filenames to the application bundle. Recognize both bare and slash-prefixed filenames after path normalization.

💡 Motivation and Context

Follow-up to #3348 and #3518. The existing exclusion runs after Expo's early returns and only matches /InternalBytecode.js. Hermes promise helpers can therefore be attributed to the application bundle, causing invalid source-map lookups and incorrect grouping of unrelated errors.

💚 How did you test it?

  • Reproduced the incorrect filename and in_app values with a failing test before applying the fix.
  • Added 12 regression cases: iOS/Android, Expo/non-Expo, and bare/slash-prefixed/absolute Hermes filenames. Each verifies runtime, application, and native frames together.

📝 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. (Changelog updated.)
  • I updated the wizard if needed. (Not applicable.)
  • All tests passing.
  • Public API changes reviewed by another Mobile SDK team member or implemented according to the develop docs spec. (Not applicable: no public API change.)
  • No breaking changes.

🔮 Next steps

🚨 PR created with AI assistance, but it was carefully reviewed by Dweet team where this patch is already used on prod in an Expo app.

@Trancever
Trancever marked this pull request as ready for review October 7, 2026 08:14

@alwx alwx left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for your PR, @Trancever! One small thing left before I merge it.

Comment thread CHANGELOG.md Outdated
@Trancever
Trancever requested a review from alwx October 7, 2026 15:01
Comment thread CHANGELOG.md
Comment thread CHANGELOG.md
Comment thread CHANGELOG.md Outdated
@Trancever
Trancever requested a review from alwx October 8, 2026 09:10
@alwx alwx added the ready-to-merge Triggers the full CI test suite label Oct 8, 2026
@alwx
alwx enabled auto-merge (squash) October 8, 2026 09:26

@alwx alwx left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for your contribution, @Trancever!

@alwx
alwx merged commit d61b289 into getsentry:main Oct 8, 2026
98 of 108 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge Triggers the full CI test suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants