Repository navigation
fix(core): Keep Hermes InternalBytecode.js frames out of app - #7138
Conversation
sentry.io recomputes in_app for app:/// JavaScript frames from their path and ignores the client value, so the in_app: false set in #6848 had no effect and Hermes promise helpers (tryCallOne, step) kept driving grouping. Send them under app:///node_modules/hermes/ so the server treats them as third-party. Fixes #7130 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Semver Impact of This PR⚪ None (no version bump detected) 📋 Changelog PreviewThis is how your changes will appear in the changelog.
🤖 This preview updates automatically when you update the PR. |
📲 Install BuildsAndroid
|
Co-Authored-By: Antonis Lilis <antonis.lilis@sentry.io>
|
@sentry-junior verify |
|
Experimental end-to-end verification by Junior, run on an Android emulator in CI. A maintainer decides what it means. fix(core): Keep Hermes InternalBytecode.js frames out of app: Verified on Android Claim (from #7130): sentry.io recomputes
The event links need access to the sentry-sdks org.
Asked by antonis. Run: https://github.com/getsentry/sentry-react-native/actions/runs/46461886312 |
|
@sentry-junior gate |
|
@sentry-junior verify |
📢 Type of change
📜 Description
Hermes runtime bytecode frames (
InternalBytecode.js) are now sent asapp:///node_modules/hermes/InternalBytecode.jsinstead ofapp:///InternalBytecode.js.#6848 already marks these frames
in_app: false, but sentry.io does not keep that value. During JavaScript processing, the server recomputesin_appfrom the path (is_in_app()insrc/sentry/lang/javascript/processing.py): anyapp:path outsidenode_modules/is in-app. With thenode_modulessegment, the frames are out of app on the server:is_in_app()returns false.path:**/node_modules/** -appgrouping rule matches, also on the older grouping config.should_skip_missing_source_error()would also skip a "missing source" processing error for this path (not observed on the test events below, which have no release or debug IDs).The client-side
in_app: falsestays, forbeforeSendand other client-side consumers.The path is synthetic: there is no
hermespackage innode_modules. It only affects how the frame is labeled and classified.💡 Motivation and Context
Fixes #7130. Async errors carry Hermes promise helpers (
tryCallOne,step,anonymous), and these were in-app on sentry.io. Errors created in a library, which have no in-app frame of their own, were grouped on the Hermes frames. Since #6848 gave these frames the same filename on iOS and Android, the catch-all issues of both platforms could merge.The reporter runs the same path in production and sees the frames come back out of app.
Grouping impact: the Hermes frames no longer contribute to the in-app grouping hash, so issues whose grouping included them get a new hash after the upgrade, and new issues open. This is the intended effect, and the CHANGELOG says so. On sentry.io, similarity grouping may keep many affected issues together; the hash change is still one-time.
Alternative considered: a built-in server rule (
family:javascript stack.abs_path:**/InternalBytecode.js -app) would also cover older SDK versions. But it would only reach projects on the latest grouping config (the older rules file is frozen), would not remove the missing-source error, and would regroup every RN Hermes project at once, without an SDK upgrade or changelog entry.💚 How did you test it?
RewriteFramestests to expect the new path. The existing cases cover iOS/Android, Expo/non-Expo, and the bare, slash-prefixed and absolute Hermes filenames.yarn lint,yarn circularDepCheckand a cleanbuild:sdkpass locally.getsentry/sentrysource (is_in_app(),should_skip_missing_source_error(), the default grouping rules). I also ran Sentry's grouping rule engine (sentry-ophio1.3.1, the version Sentry pins) on the frames from the issue.newstyle:2026-01-20), with only the Hermes frame's path different:tryCallOneis In App and part of the in-app grouping hash (ab270b7c…).tryCallOneis a system frame and drops out of the in-app hash (c3f1f491…). It only counts in the all-frames hash.📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
🤖 Generated with Claude Code