Hello friends,
We have self hosted Sentry on sentry.[company].com. For our React app, we’d like to get sourcemaps support.
The issue:
We are using sentry-cli tool to upload source files found in build/static/js/ with the following command:
sentry-cli releases files $GIT_SHA upload-sourcemaps build/static/js/ --url-prefix '~/static/js/' --validate
Our static files are hosted in amazon S3 at:
https://example.com/static/js/6.8419741c.chunk.js and contain the following sourceMappingURL:
//# sourceMappingURL=6.8419741c.chunk.js.map
We remove the .map files before uploading our bundle to S3 and instead upload to Sentry with the following --url-prefix: ~/static/js/
Although it seems to be the case that Sentry is still trying to fetch the sourcemaps from the Internet - it’s looking for them at https://example.com/static/js/6.8419741c.chunk.js.map instead of looking in the Artifacts for that release.
What we’ve tried so far:
- We tried a variety of
--url-prefixvalues. e.g:
--url-prefix "~/static/js/",
--url-prefix "/static/js/"
--url-prefix "~"
--url-prefix "~/" - We tried only uploading
.mapfiles to Sentry without original.jsfiles.
Unfortunately, even when the paths are exact match, Sentry is still trying to fetch them from a remote URL instead of Artifacts.
We’ve spent quite some time and energy on this, including reading docs, github issues and the forum and tried out solutions that worked for some people (e.g. JavaScript SourceMap is not used).
But still no luck 
We’d really appreciate any help at this point!
Thank you!

