Epure

Source maps

Epure error tracking turns minified JavaScript and TypeScript frames back into source file, function and line when an event's release matches a release you uploaded .map files to. In Epure v0.2.0, the supported upload is one curl POST per map to /api/PROJECT_ID/releases/RELEASE/files/, authenticated with your DSN key, up to 2 MB per request. Uploads through sentry-cli or Sentry's bundler plugins do not yet give readable frames, for the reasons below.

Last checked on 6 Nov 2026 against Epure v0.2.0 (crates/server/src/routes/ingest.rs, crates/server/src/routes/api/chunk_upload.rs, crates/demangle/src/sourcemap.rs) and the sentry-cli changelog. Symbolication covers JS and TS only. For the Next.js SDK setup itself, see Next.js: send errors to Epure with @sentry/nextjs.

Upload methodWhat Epure v0.2.0 does with itUse it?
curl to POST /api/PROJECT_ID/releases/RELEASE/files/Stores the map under the release; Epure Cloud and self-hostedYes
sentry-cli 3.x sourcemaps uploadCalls artifactbundle/assemble, which Epure does not implementNo
sentry-cli 2.x release upload (chunk-upload, then releases/RELEASE/assemble)Self-hosted v0.2.0 (on Cloud, check with support); stores the zipped bundle as one file without unpacking it, so frames stay minifiedNo, until fixed
withSentryConfig, @sentry/webpack-plugin, @sentry/vite-pluginUpload through sentry-cli, so the two rows above applyNo, until fixed

Epure matches a map by release and file name. Debug IDs sent to difs/assemble are stored but not used for lookup in v0.2.0.

How do I upload source maps to Epure?

Uploading a source map to Epure is a multipart POST of one .map file to /api/PROJECT_ID/releases/RELEASE/files/ with the X-Sentry-Auth header your SDK already uses. PROJECT_ID is the numeric last segment of the DSN, and RELEASE is the exact string passed as release to Sentry.init. A successful upload returns 201 Created with the stored artifact's id and name. The request body may be up to 2 MB.

curl -sS --fail -X POST \
  "https://app.epure.sh/api/${PROJECT_ID}/releases/${RELEASE}/files/" \
  -H "X-Sentry-Auth: Sentry sentry_version=7, sentry_key=${PUBLIC_KEY}" \
  -F "name=~/_next/static/chunks/app/page-3f2a1c.js.map" \
  -F "file=@.next/static/chunks/app/page-3f2a1c.js.map;type=application/json"
{ "id": "660e8400-e29b-41d4-a716-446655440001", "name": "~/_next/static/chunks/app/page-3f2a1c.js.map" }
FieldRequiredValue
fileyesThe map's bytes
namenoThe path of the minified file plus .map, starting with ~/. Defaults to artifact.map, which matches nothing
RELEASE in the URLyesAny string without /, \ or .., for example a Git SHA
X-Sentry-AuthyesSentry sentry_version=7, sentry_key=PUBLIC_KEY, the public key before @ in the DSN

Self-hosted instances use their own origin instead of https://app.epure.sh and keep uploaded maps in EPURE_ARTIFACTS_DIR, so include that volume in backups. Field names are also in the ingest API reference.

How do I upload Next.js source maps to Epure?

Uploading Next.js source maps to Epure takes three build steps: generate browser maps with productionBrowserSourceMaps: true, upload every .map under .next/static with the script below, then delete the maps before the build output ships. Next.js writes the maps next to the JavaScript files and serves them to anyone who asks (Next.js docs), so the delete step keeps your source private. Server frames often need no upload: Sentry's Next.js guide notes that server source maps are kept for runtime error reporting.

// next.config.ts
import { withSentryConfig } from "@sentry/nextjs";
import type { NextConfig } from "next";

const nextConfig: NextConfig = {
  productionBrowserSourceMaps: true,
};

export default withSentryConfig(nextConfig, {
  sourcemaps: { disable: true }, // Sentry's uploader does not work with Epure yet
  telemetry: false,
});
#!/usr/bin/env bash
# scripts/upload-sourcemaps.sh: upload Next.js browser maps to Epure for one release
set -euo pipefail
: "${EPURE_URL:?for example https://app.epure.sh}"
: "${EPURE_PROJECT_ID:?numeric project ID, the last segment of the DSN}"
: "${EPURE_PUBLIC_KEY:?the public key before @ in the DSN}"
: "${NEXT_PUBLIC_APP_RELEASE:?the same value as release in Sentry.init}"

uploaded=0
skipped=0
while IFS= read -r -d '' map; do
  if [ "$(wc -c < "$map")" -gt 2000000 ]; then
    echo "skip (over 2 MB): $map" >&2
    skipped=$((skipped + 1))
    continue
  fi
  curl -sS --fail -o /dev/null -X POST \
    "$EPURE_URL/api/$EPURE_PROJECT_ID/releases/$NEXT_PUBLIC_APP_RELEASE/files/" \
    -H "X-Sentry-Auth: Sentry sentry_version=7, sentry_key=$EPURE_PUBLIC_KEY" \
    -F "name=~/_next/${map#.next/}" \
    -F "file=@$map;type=application/json"
  uploaded=$((uploaded + 1))
done < <(find .next/static -name '*.js.map' -print0)

echo "uploaded $uploaded maps, skipped $skipped, release $NEXT_PUBLIC_APP_RELEASE"
# build command, for example in CI or your host's build settings
next build && bash scripts/upload-sourcemaps.sh && find .next/static -name '*.map' -delete

The script maps .next/static/chunks/app/page-3f2a1c.js.map to the name ~/_next/static/chunks/app/page-3f2a1c.js.map, which is how the browser requests the file. If it prints uploaded 0 maps, the build produced no browser maps: check productionBrowserSourceMaps and look for .map files under .next/static/chunks. Set NEXT_PUBLIC_APP_RELEASE before next build, because Next.js inlines it into the client bundle.

How do I upload source maps from Vite or webpack?

A Vite or webpack build uploads to Epure the same way: turn on source maps (build.sourcemap: "hidden" in Vite, devtool: "hidden-source-map" in webpack), upload each .map from the output folder with the URL path the browser uses as name, then delete the maps before deploy. Hidden maps leave out the //# sourceMappingURL comment, so browsers never fetch them. For a file served at https://app.example.com/assets/index-8d2f1a.js, the name is ~/assets/index-8d2f1a.js.map.

# Vite: dist/assets/index-8d2f1a.js.map -> ~/assets/index-8d2f1a.js.map
find dist -name '*.js.map' -print0 | while IFS= read -r -d '' map; do
  curl -sS --fail -o /dev/null -X POST \
    "$EPURE_URL/api/$EPURE_PROJECT_ID/releases/$RELEASE/files/" \
    -H "X-Sentry-Auth: Sentry sentry_version=7, sentry_key=$EPURE_PUBLIC_KEY" \
    -F "name=~/${map#dist/}" \
    -F "file=@$map;type=application/json"
done

The SDK side is in Browser and Node.js. A Node.js service bundled with esbuild or webpack uploads the same way, with name set to the bundled file's path as it appears in stack frames.

How does Epure match a source map to a stack frame?

Epure matches a source map in the background worker, after the event is stored. The event must have platform set to javascript, typescript or node and carry a release. For each frame whose file ends in .js, .ts, .jsx, .tsx, .mjs or .cjs, Epure looks for an artifact named after the frame's file plus .map under that release, first by exact name, then by file name alone (page-3f2a1c.js.map). A match replaces the file, function, line and column, and adds up to five lines of source context on each side when the map includes sourcesContent.

The file-name fallback is why ~/_next/static/chunks/app/page-3f2a1c.js.map matches a frame from https://app.example.com/_next/static/chunks/app/page-3f2a1c.js. Two maps in one release with the same file name, such as page.js.map from two route folders, can resolve to either one. Next.js and Vite add a content hash to browser chunk names, so this rarely happens there.

ConditionResult
Event has no releaseRaw frames, no lookup
Map uploaded under another release stringRaw frames
Map file over 32 MiBSkipped at parse time; raw frames
Frame from Python, Go, Ruby, PHP, Java or .NETRaw frames: Epure symbolicates JS and TS only

Events that arrive before their maps keep minified frames. Upload in the build step, before the new release takes traffic.

How do I verify a demangled frame in Epure?

Verifying a source map in Epure takes one thrown error from a production build of the same release you uploaded. Deploy, trigger a client error (the test page in Next.js setup works), and open the new issue. A demangled top frame shows a source path ending in your file, such as app/epure-test/page.tsx, with the original function name and line. A frame that still reads page-3f2a1c.js:1:4821 means no map matched. Then check the release on the event against the upload, as described below.

# illustrative frame, not captured output
Before upload   page-3f2a1c.js:1:4821 in n
After upload    app/epure-test/page.tsx:6 in onClick

If you connected the Epure MCP server, ask your agent to explain the latest issue; it reads the same stored frames (MCP and CLI reference).

Can I use sentry-cli or withSentryConfig to upload source maps to Epure?

sentry-cli and Sentry's bundler plugins do not produce readable frames with Epure v0.2.0, although Epure implements the chunk-upload, release assemble and difs/assemble endpoints that sentry-cli calls. sentry-cli 3.x uploads artifact bundles through an artifactbundle/assemble endpoint that Epure does not have; the changelog notes that 2.57.0 deprecated release bundles in favour of artifact bundles and 3.0.0 removed the releases files commands. sentry-cli 2.x can still use release assemble, but it sends a zipped bundle, and Epure stores that zip as a single file named artifact.map without unpacking it.

The bundler plugins withSentryConfig, @sentry/webpack-plugin and @sentry/vite-plugin upload through sentry-cli, so they hit the same gap even with url, org, project and an auth token pointed at Epure. On Epure Cloud, the DSN-authenticated release-files endpoint above is available; check with support before relying on the chunk-upload endpoints there. We will update this page when a bundler-plugin upload produces a readable frame in our tests.

Where Sentry is ahead

Sentry's build plugins upload maps during next build, inject debug IDs and need no script. If automatic upload matters more to you than the rest, stay on Sentry for now; Epure vs Sentry lists the other differences.

curl: (22) The requested URL returned error: 413

A 413 from the Epure release-files endpoint means the request body was over 2 MB (2,097,152 bytes, the ingest router's limit in v0.2.0). Large vendor chunks are the usual cause in a Next.js or Vite build. The script above skips any map over 2,000,000 bytes and prints its path, so frames from that chunk stay minified. The workaround today is a smaller chunk, set in the bundler's code-splitting config. Epure can parse maps up to 32 MiB once stored, so the upload limit is the one that binds.

401 invalid_dsn on a source map upload

Epure returns 401 invalid_dsn on an upload when the X-Sentry-Auth header is missing or its sentry_key is not a valid key for the instance. Use the public key from the DSN, the part between https:// and @, in the form Sentry sentry_version=7, sentry_key=PUBLIC_KEY. A dashboard session cookie or a personal access token does not work here. A key from another project returns 403 project_mismatch, and a revoked key 403 dsn_revoked.

400 invalid_release_version

Epure returns 400 invalid_release_version when the release in the upload URL contains /, \ or .., or is empty. A release such as web/1.0.0 cannot be a path segment, so the same string in Sentry.init can never match an upload. Use a release without slashes, such as a Git SHA or my-app@1.0.0, in both places. A missing file field returns 400 invalid_release_file instead.

Upload returns 201 but stack frames stay minified

A 201 from Epure means the map was stored, so minified frames after it point to a matching problem, not an upload problem. Check four things in order. The event's release must equal the upload's release exactly, character for character. The map's name must end in the frame's file name plus .map. The event must come from a build made after the upload. The map must be a plain .map JSON file under 32 MiB, not a zip or a bundle.

The most common miss is a release that differs between build and runtime, for example a variable set after next build or a Git SHA shortened in one place and not the other. The verify-ingest checklist covers events that never arrive at all.

Can I upload dSYM, ProGuard or other native symbols?

No. Epure error tracking symbolicates JavaScript and TypeScript .map files only. There is no dSYM, ProGuard, NDK or symbol-server support, and iOS and Android crash reporting is out of scope. Python, Go, Ruby, PHP, Java and .NET events are grouped on their raw frames, which those SDKs already send readable. See other runtimes.

Do I need to upload source maps for every release?

Yes. Epure looks up maps under the event's exact release, so each deploy with a new release string needs its own upload. Clients still running an older build send the older release, which needs its own maps. Run the upload script in the same build command as next build so the two never drift.

Does Epure use debug IDs to find source maps?

Not yet. Epure v0.2.0 stores a debug ID sent to difs/assemble, but the worker looks up maps by release and file name only. An event without a release keeps raw frames even if its bundle carries a debug ID. Set release in every Sentry.init call.

Is it safe to leave source maps on my production server?

Leaving .map files on a public server lets anyone read your original source. Next.js serves maps generated by productionBrowserSourceMaps to anyone who requests them. Delete them after the upload, as the build command above does, or generate hidden maps in Vite or webpack and keep them out of the deploy folder.

Next