Skip to content

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

Draft
KishanPRao wants to merge 2 commits into
mainfrom
feature/react-native-health
Draft

fix(react-native): report correct agent version and fix RN 0.72 init crash#379
KishanPRao wants to merge 2 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, and RN 0.72 apps crashed at SDK init because Metro 0.76.9 mis-indexes a babel helper require in sdk-core's bundle.

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.

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.

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
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