Skip to content

Sourcemap inject breaks with paperjs #898

@netpok

Description

@netpok

CLI Version

2.39.1

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

Linux Mint 21.3

Link to reproduction repository

https://github.com/netpok/paperjs-vite-sentry-inject-poc

CLI Command

sentry-cli sourcemaps inject dist/assets

Exact Reproduction Steps

  1. Clone the provided repository
  2. Run npm install and npm build (optional, prebuilt dist files are also in the repo)
  3. Run sentry-cli sourcemaps inject dist/assets

Expected Results

Debug ids successfully injected

Actual Results

CLI throws error: Invalid embedded sourcemap in source file dist/assets/index-DAUKG_fp.js because it finds string literal of sourceMappingURL

https://github.com/netpok/paperjs-vite-sentry-inject-poc/blob/main/dist/assets/index-DAUKG_fp.js#L35

Logs

  INFO    2024-11-27 08:19:42.740070385 +01:00 Loaded config from /home/<user>/.sentryclirc
  DEBUG   2024-11-27 08:19:42.740133483 +01:00 sentry-cli version: 2.39.1, platform: "linux", architecture: "x86_64"
  INFO    2024-11-27 08:19:42.740686605 +01:00 sentry-cli was invoked with the following command line: "/usr/lib/node_modules/@sentry/cli/node_modules/@sentry/cli-linux-x64/bin/sentry-cli" "sourcemaps" "inject" "dist/assets" "--log-level=debug"
> Searching dist/assets
  DEBUG   2024-11-27 08:19:42.741958980 +01:00 built glob set; 0 literals, 0 basenames, 0 extensions, 0 prefixes, 0 suffixes, 4 required extensions, 0 regexes  (from globset)
  DEBUG   2024-11-27 08:19:42.742822727 +01:00 ignoring dist/assets/index-DRNMkqs8.css: Ignore(IgnoreMatch(Types(Glob(UnmatchedIgnore))))  (from ignore)
  DEBUG   2024-11-27 08:19:42.742868142 +01:00 whitelisting dist/assets/index-DAUKG_fp.js: Whitelist(IgnoreMatch(Types(Glob(Matched { def: FileTypeDef { name: "js", globs: ["*.js"] } }))))  (from ignore)
  INFO    2024-11-27 08:19:42.742903318 +01:00 found: dist/assets/index-DAUKG_fp.js (244313 bytes)
> Found 1 file
> Analyzing 1 sources
> Analyzing completed in 0s
> Injecting debug ids
error: Invalid embedded sourcemap in source file dist/assets/index-DAUKG_fp.js
  INFO    2024-11-27 08:19:42.743514409 +01:00 Skipping update nagger update check

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels
    No fields configured for issues without a type.

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions