Skip to content
Latchkey

sentry-cli "Source map could not be uploaded" in CI

sentry-cli sourcemaps upload could not push your maps: either no .map files were found at the given path, the release did not exist yet, or the artifacts were rejected. Symbolication then fails at runtime.

What this error means

A sentry-cli sourcemaps upload step ends with "Source map could not be uploaded", "no sourcemaps found", or "0 artifacts uploaded", and Sentry shows minified stack traces.

sentry-cli
> Found 0 files
error: Source map could not be uploaded: no files matched the provided path

Common causes

The upload path has no source maps

The build output directory is wrong, or the bundler did not emit .map files, so the CLI matches zero artifacts.

The release was not created before upload

Uploading artifacts to a release that does not exist yet, or with a mismatched release/dist, leaves traces unsymbolicated.

How to fix it

Point upload at the real build output and release

  1. Confirm the bundler emits source maps and note their directory.
  2. Create the release first, then upload the maps for that exact release.
  3. Finalize the release so the artifacts are associated.
Terminal
sentry-cli releases new "$VERSION"
sentry-cli sourcemaps upload --release "$VERSION" ./dist
sentry-cli releases finalize "$VERSION"

Verify maps were generated

Ensure the production build keeps source maps so there is something to upload.

vite.config build options
# Vite / Rollup
build:
  sourcemap: true

How to prevent it

  • Enable source map generation in the production build.
  • Create and finalize the release around the upload step.
  • Match the --release (and --dist) used at build and at upload.

Frequently asked questions

What causes ""Source map could not be uploaded""?
The build output directory is wrong, or the bundler did not emit .map files, so the CLI matches zero artifacts.
How do I fix "Source map could not be uploaded"?
Point upload at the real build output and release

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card