Skip to content

fix(react-native): report correct agent version and fix RN 0.72 init crash - #379

Merged
KishanPRao merged 7 commits into
mainfrom
feature/react-native-health
Aug 14, 2026
Merged

fix(react-native): report correct agent version and fix RN 0.72 init crash#379
KishanPRao merged 7 commits into
mainfrom
feature/react-native-health

Conversation

@KishanPRao

@KishanPRao KishanPRao commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Summary

Reports carried a hardcoded 0.0.1 agent version, RN 0.72 apps crashed at SDK init because Metro 0.76.9 mis-indexes a babel helper require in sdk-core's bundle, and the sourcemap scripts never shipped, so JS symbolication could not be set up.

Changes

  • packages/react-native/src/BacktraceClient.ts: read agentVersion from the package version instead of the hardcoded 0.0.1.
  • packages/sdk-core/tsconfig.build.json: target ES5 with downlevelIteration so the shipped bundle has no class syntax for the consumer's Metro to transpile into babel helper requires.
  • packages/sdk-core/rollup.config.mjs: bundle tslib so the ES5 output is self-contained.
  • packages/react-native/package.json: add scripts to files so the sourcemap tooling ships.

Note

  • agentVersion reads package.json through the react-native/src entry Metro uses, so it is correct at runtime; the lib/ builds resolve the path one level too deep, but RN never loads lib/.
  • RN 0.72 on Xcode 26 also needs an app-side Podfile snippet for Yoga's -Werror (client side, not SDK); ES5 costs sdk-core ~8KB gzip across all JS SDKs.
  • Validated RN 0.72-0.83 (both architectures); unit tests across sdk-core/react-native/browser/react/node.
  • test_linux_all is red due to a Sauce Connect service-side issue, unrelated to this change. Instead, validated on Chrome, Firefox, Edge, Safari, manually.

ref: BT-7354, BT-7406

@KishanPRao
KishanPRao requested a review from melekr July 30, 2026 16:29
@KishanPRao KishanPRao self-assigned this Jul 30, 2026
@KishanPRao KishanPRao added the bug Something isn't working label Jul 30, 2026
@KishanPRao
KishanPRao marked this pull request as draft July 30, 2026 16:55

@melekr melekr left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

we're pinning "react-native": ">=0.72.0"

@KishanPRao KishanPRao changed the title fix(react-native): report correct agent version and set RN peer floor to 0.73 fix(react-native): report correct agent version and fix RN 0.72 init crash Jul 31, 2026
@KishanPRao
KishanPRao marked this pull request as ready for review August 12, 2026 08:56
@KishanPRao
KishanPRao requested a review from melekr August 12, 2026 08:56
@KishanPRao
KishanPRao merged commit a1afe98 into main Aug 14, 2026
5 of 6 checks passed
@KishanPRao
KishanPRao deleted the feature/react-native-health branch August 14, 2026 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants