-
-
Couldn't load subscription status.
- Fork 235
Closed
2 / 22 of 2 issues completed
Copy link
Labels
Description
CLI Version
2.43.0
Operating System and Architecture
- macOS (arm64)
- macOS (x86_64)
- Linux (i686)
- Linux (x86_64)
- Linux (armv7)
- Linux (aarch64)
- Windows (i686)
- Windows (x86_64)
Operating System Version
macOS 15.4
Link to reproduction repository
https://github.com/stigi/sentry-vs-index-source-maps
CLI Command
sentry-cli sourcemaps inject ...
Exact Reproduction Steps
- Clone the repro repo
- Run
npm install - Run
npm sentry-cli sourcemaps inject dist-example
Context:
- Those sourcemaps are produced from ClojureScript by compiling it with ShadowCLJS.
- The sourcemaps are index source maps with sections
- We used sentry-cli version
2.18.1, which supported those kind of sourcemaps and addeddebug_idto the.mapfile successfully. We also use those source maps successfully after uploading to Sentry. - The first CLI version where we saw this break is
2.19.0 - rust-sourcemaps seems to support index sourcemaps as
SourceMapIndex, but they do not have adebug_idattribute, and seem less fully implemented
Possible workarounds:
- The community mentioned using flatten-source-map to work around this, by flattening the sections into a single mappings string. I didn't try that myself yet though.
Thanks
Expected Results
The sourcemap and JS files are injected with a sentry debug id.
Actual Results
An incompatible sourcemap format error is produced:
> [email protected] demo:example
> sentry-cli sourcemaps inject dist-example
> Searching dist-example
> Found 2 files
> Analyzing 2 sources
> Analyzing completed in 0.001s
> Injecting debug ids
error: Invalid sourcemap at dist-example/demo.js.map
Caused by:
encountered incompatible sourcemap format
Add --log-level=[info|debug] or export SENTRY_LOG_LEVEL=[info|debug] to see more output.
Please attach the full debug log to all bug reports.
Logs
INFO 2025-04-11 19:21:27.913205 +02:00 Loaded config from /Users/ullrich/.sentryclirc
DEBUG 2025-04-11 19:21:27.913576 +02:00 sentry-cli version: 2.43.0, platform: "darwin", architecture: "arm64"
INFO 2025-04-11 19:21:27.914432 +02:00 sentry-cli was invoked with the following command line: "/Users/ullrich/tmp/shadow-maps/node_modules/@sentry/cli-darwin/bin/sentry-cli" "sourcemaps" "inject" "--log-level=debug" "dist-example"
> Searching dist-example
DEBUG 2025-04-11 19:21:27.915325 +02:00 built glob set; 0 literals, 0 basenames, 0 extensions, 0 prefixes, 0 suffixes, 4 required extensions, 0 regexes (from globset)
DEBUG 2025-04-11 19:21:27.915949 +02:00 glob converted to regex: Glob { glob: "**/*~", re: "(?-u)^(?:/?|.*/)[^/]*\\~$", opts: GlobOptions { case_insensitive: false, literal_separator: true, backslash_escape: true, empty_alternates: false }, tokens: Tokens([RecursivePrefix, ZeroOrMore, Literal('~')]) } (from globset)
DEBUG 2025-04-11 19:21:27.915981 +02:00 built glob set; 0 literals, 1 basenames, 1 extensions, 0 prefixes, 0 suffixes, 0 required extensions, 1 regexes (from globset)
DEBUG 2025-04-11 19:21:27.916245 +02:00 ignoring dist-example/manifest.edn: Ignore(IgnoreMatch(Types(Glob(UnmatchedIgnore)))) (from ignore)
DEBUG 2025-04-11 19:21:27.916281 +02:00 whitelisting dist-example/demo.js.map: Whitelist(IgnoreMatch(Types(Glob(Matched { def: FileTypeDef { name: "map", globs: ["*.map"] } })))) (from ignore)
INFO 2025-04-11 19:21:27.916314 +02:00 found: dist-example/demo.js.map (925466 bytes)
DEBUG 2025-04-11 19:21:27.916692 +02:00 ignoring dist-example/.DS_Store: Ignore(IgnoreMatch(Types(Glob(UnmatchedIgnore)))) (from ignore)
DEBUG 2025-04-11 19:21:27.916730 +02:00 whitelisting dist-example/demo.js: Whitelist(IgnoreMatch(Types(Glob(Matched { def: FileTypeDef { name: "js", globs: ["*.js"] } })))) (from ignore)
INFO 2025-04-11 19:21:27.916762 +02:00 found: dist-example/demo.js (96417 bytes)
> Found 2 files
> Analyzing 2 sources
> Analyzing completed in 0.002s
> Injecting debug ids
error: Invalid sourcemap at dist-example/demo.js.map
Caused by:
encountered incompatible sourcemap format
INFO 2025-04-11 19:21:27.928144 +02:00 Skipping update nagger update check
Sub-issues
Metadata
Metadata
Assignees
Labels
Projects
Status
No status