Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Read debug IDs from debugId field in sourcemaps #2220

Closed
3 tasks done
loewenheim opened this issue Nov 6, 2024 · 3 comments · Fixed by #2222
Closed
3 tasks done

Read debug IDs from debugId field in sourcemaps #2220

loewenheim opened this issue Nov 6, 2024 · 3 comments · Fixed by #2222
Assignees

Comments

@loewenheim
Copy link
Contributor

loewenheim commented Nov 6, 2024

When uploading sourcemaps using sentry-cli, debug IDs should be read from the "debugId" field as well as the current "debug_id".

The TC39 proposal is for "debugId" to become the actual name, see https://github.com/tc39/source-map/blob/8be0fe10ad042e13f4196d17b44ddedfd6a9df58/proposals/debug-id.md?plain=1#L100-L117. For now we can support it in addition to "debug_id".

This requires updates in symbolic and rust-sourcemap:

Once those are merged and released, a dependency update is all that's required.

@loewenheim loewenheim self-assigned this Nov 6, 2024
loewenheim added a commit that referenced this issue Nov 7, 2024
The main effect of and reason for this is that
debug IDs in sourcemaps can now be read from the
`"debugId"` field in addition to `"debug_id"`.

Implements #2220.
loewenheim added a commit that referenced this issue Nov 7, 2024
This is accomplished by updating `symbolic` and `rust-sourcemap`. See
getsentry/symbolic#874 and
getsentry/rust-sourcemap#97.

Closes #2220.
@evelant
Copy link

evelant commented Nov 25, 2024

I think this may possibly have introduced a problem. On the latest @sentry/react-native 6.3.0 and @sentry/cli 2.39.0 android builds fail due to "bad json: duplicate field 'debug_id'"

[RUN_GRADLEW] > Task :app:createBundleReleaseJsAndAssets_SentryUpload_com.whetware.taskhero@6.2.22+2000110742_2000110742 FAILED
[RUN_GRADLEW] Copy `debugId` from packager source map to Hermes source map...
[RUN_GRADLEW] Done.
[RUN_GRADLEW] Check generated source map for Debug ID: 0f7b9eb2-071f-45b4-946b-2035a8445ed5
[RUN_GRADLEW] Sentry Source Maps upload will include the release name and dist.
[RUN_GRADLEW] Sentry-CLI arguments: [/Users/imagio/dev/build_temp/android_11_25_03_40/build/node_modules/@sentry/cli/bin/sentry-cli, react-native, gradle, --bundle, /Users/imagio/dev/build_temp/android_11_25_03_40/build/apps/taskhero/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle, --sourcemap, /Users/imagio/dev/build_temp/android_11_25_03_40/build/apps/taskhero/android/app/build/generated/sourcemaps/react/release/index.android.bundle.map, --release, [email protected]+2000110742, --dist, 2000110742]
[RUN_GRADLEW] Processing react-native sourcemaps for Sentry upload.
[RUN_GRADLEW] > Analyzing 2 sources
[RUN_GRADLEW] > Rewriting sources
[RUN_GRADLEW] INFO    2024-11-25 15:43:50.076376 -05:00 Loaded file referenced by SENTRY_PROPERTIES (/Users/imagio/dev/build_temp/android_11_25_03_40/build/apps/taskhero/android/sentry.properties)
[RUN_GRADLEW] error: bad json: duplicate field `debug_id` at line 1 column 51939092

@CallbackDan
Copy link

+1

@loewenheim
Copy link
Contributor Author

Hi, sorry for the inconvenience. This is fixed in https://github.com/getsentry/sentry-cli/releases/tag/2.39.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants