Skip to main content
A browser reports an error against your minified bundle — app.a91f.js:1:36 tells you nothing. When you upload the source map your build produced, the error detail in RUM → Errors shows the original position instead, for example ../../src/cart/total.ts:16:23, beside the minified one it was resolved from. The file is shown exactly as your source map’s sources list names it — often, as here, a path relative to the map. Resolution happens when you open an error, against whatever map is uploaded at that moment. You can upload a map after the errors it describes have already arrived.

Before you start

You need three things from a Browser project. The first two are read from the API with a session token — see Authentication for how to get one. Every call below also names your organization as tenantId; without it the API answers 401 Missing tenantId. Read your organization id from your session, then find the project:
The first column is the project id; set PROJECT_ID to it. The install snippet. Paste it into the <head> of every page:
The project admin key. It is the adminApikey field of the project, returned to members with the Editor role or above:
The admin key can upload, replace and delete this project’s source maps. Store it as a secret in your CI system, never in your repository or in the page. If it is exposed, a member with the Admin role can replace it — the old key stops working immediately:
The response contains the new adminApikey; put it in your CI secret in place of the old one. The apikey in your install snippet does not change, so your pages keep reporting.
A release id your build knows — a version, a build number, or a commit hash. It must be the same value in the page and in the upload.

1. Declare the release in the page

Add this after the install snippet, with your own name and release id:
The first argument names the application; the second is the release id you upload maps under. A page can declare up to ten releases. Surrounding whitespace is ignored, and an id longer than 200 characters keeps its last 200. A page that never calls addRelease still reports errors, but none of them can be matched to an uploaded map.

2. Upload the maps from your build

Run this from your build pipeline after the bundle is built, with the admin key in AIAXONIQ_ADMIN_KEY. It uploads every *.js.map under the directory you name, and exits non-zero if any upload fails or no map is found:
For a build whose dist/assets/app.a91f.js is served at https://cdn.example.com/static/assets/app.a91f.js:
Each successful upload prints the key it was stored under. To upload a single map without the script — the key is passed on standard input, as the script does, so it never appears in your machine’s process list:

How an upload is matched to an error

An error is resolved against a map only when both of these match. Only the path of url is compared. The host, query string and fragment are ignored, so these all name the same file:
Paths are compared whole, so /admin/main.js and /shop/main.js never share a map. A url ending in .map is refused with 400, as is a file that is not a version 3 source map. Uploading again for the same file and release replaces the map, and the next error you open uses the new one.

Reading the result

Expand an error in RUM → Errors. Under First script frame you see either Symbolicated, with the original position, the minified position and the release whose map was used — or Not symbolicated, with the reason:
Only the first frame that is in a script file is resolved, not the whole stack. An error from a script loaded from another origin must be allowed to report its details: load that script with crossorigin="anonymous" and serve it with an Access-Control-Allow-Origin header, or the browser hides the error as Script error. with no stack to resolve.