Repository navigation
docs(react-native): Use Sentry CLI v4 for manual source map uploads - #21120
sentry-junior[bot] wants to merge 1 commit into
Conversation
Move the Hermes, JSC, Expo (Advanced), and CodePush manual upload steps to `npx sentry@4 sourcemap upload`: - Pass `--ext .bundle` / `--ext .jsbundle`, because v4 only picks up .js, .cjs, and .mjs files by default. - Upload with a root-only pattern (`'index.android.bundle*'`) instead of `.`, which also uploads stale bundles under android/app/build. - Drop `--debug-id-reference`. v4 takes the debug ID from the source map that copy-debugid.js writes, and uploads the Hermes bundle in full, so the "0 bytes" note no longer applies. - Export SENTRY_ORG, SENTRY_PROJECT, and SENTRY_AUTH_TOKEN instead of a .env file. v4 doesn't load .env files. - CodePush: copy the source map next to the bundle, since v4 reads one directory and dropped --bundle-sourcemap. RAM bundles stay on `npx @sentry/cli@3`: v4 dropped --bundle and --bundle-sourcemap and can't extract RAM bundles. Follow-up to #21100. Co-Authored-By: BYK <126780+BYK@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
|
@antonis, could the RN SDK team run one real upload for this PR? It answers the open question in the description: does Sentry symbolicate Hermes frames when The script below builds a fresh RN 0.88.1 app with Save the three files in one folder, then run: export SENTRY_ORG=... SENTRY_PROJECT=... # a test project
export SENTRY_AUTH_TOKEN=... # org auth token, used for the upload
export SENTRY_DSN=... # that project's DSN, for the test events
sh repro.sh
Expected result
The debug IDs and offsets come out the same on every rebuild with these pinned versions. For both bundles, the artifact bundle should hold Please post the output, or a screenshot of both frames, here.
|
|
Rollout plan could not be created · Rollout details
Rollout plan could not be created because the team reached its usage limit. Mention |
DESCRIBE YOUR PR
Follow-up to #21100, which kept the React Native manual upload pages on
npx @sentry/cli@3until v4 was tested. This PR moves the Hermes, JavaScript Core, Expo (Advanced), and CodePush manual upload steps tonpx sentry@4 sourcemap upload:--ext .bundle/--ext .jsbundle: v4 only picks up.js,.cjs, and.mjsfiles by default, so without it no React Native bundle is found.'index.android.bundle*','main.jsbundle*'): v4 takes one directory, and.from the project root also uploads stale bundles under build folders such asandroid/app/build, because v4 doesn't respect.gitignore. The pattern keeps the upload to the bundle and its source map.--debug-id-reference: v4 does this by default. For Hermes, it takes the debug ID thatcopy-debugid.jswrites into the source map, and leaves the bundle on disk unchanged.exportlines instead of.envblocks: v4 doesn't load.envfiles, soSENTRY_ORG,SENTRY_PROJECT, andSENTRY_AUTH_TOKENhave to be in the environment.--bundle-sourcemap, and it only pairs a bundle with a map in the same directory, so the steps now copy the map from./sourcemapsnext to the bundle before uploading"${BUNDLE_DIR}".Pages that stay on v3
manual-setup/ram-bundles) now pinnpx @sentry/cli@3 sourcemaps upload, with a line explaining that v4 dropped--bundleand--bundle-sourcemapand can't extract RAM bundles.Open question
Does Sentry symbolicate Hermes frames when v4 uploads the full Hermes bytecode bundle as the minified source? v3 uploaded an empty file there. The artifact bundle contents match the debug IDs, but no real upload to a Sentry project has been run yet. A repro script for the RN SDK team is in the comments. Please don't merge until a maintainer reports the result for Hermes and JSC.
IS YOUR CHANGE URGENT?
Help us prioritize incoming PRs by letting us know when the change needs to go live.
Select exactly one option. For deadlines, replace
YYYY-MM-DDwith the due date. You can update this information later by editing the PR description.SLA
Thanks in advance for your help!
PRE-MERGE CHECKLIST
Make sure you've checked the following before merging your changes:
EXTRA RESOURCES
via @BYK.
--
View Session [Sentry]