Uploaded source map not being used

Using raven-js on web. Sources maps are uploaded and new releases created using the cli. I can see the source maps under the ‘artifacts’ tab for a given release. They’re named ‘~/main.14365121.js’ and ‘~/main.14365121.js.map’.

Errors are being associated with releases correctly butsource maps are not being used to show the line the error is on. Getting a call stack like this: 09%20am

On the error dashboard there’s a message saying ‘There was 1 error encountered while processing this event: HTTP returned 401 response on https://subdomain.ourcompanyname.com/static/js/main.14365121.js

I don’t understand why sentry is looking for the source map on our domain when we are successfully uploading it to sentry separately. No we need to set some flag from the cli to indicate that sentry should look at the uploaded one not on our servers?


Same thing here. Using Open Source version of Sentry 8.12.0.
sentry-cli version 1.29.1.

In main.73bee0c9.js file i have a source map url, that looks like this:
//# sourceMappingURL=main.73bee0c9.js.map

That .map file is not hosted. I want sentry to use sourcemaps from artifacts.

Uploading artifacts with command
sentry-cli releases files release_version upload-sourcemaps /my/local/path/to/static/js --url-prefix “http: // myhostname .com/static/js/” --validate

Artifacts in sentry ui named like this:
http: // myhostname .com/static/js/main.73bee0c9.js
http: // myhostname .com/static/js/main.73bee0c9.js.map

On the error dashboard there’s a message:
Unable to fetch resource: http: // myhostname .com/static/js/main.73bee0c9.js.map

Was trying to use --no-sourcemap-reference flag and ~/js/ value in -url-prefix. Same result.

So we need help here. How can we force sentry to look for our js and map files in artifacts?
Why is it always trying to fetch them over http/https?

p.s. Don’t mention spaces in urls. Can’t post more than 2 links in one post being a new user.

1 Like