React-Sentry, source maps and releases uploading but not getting matched

I’m using the following command with sentry-cli to release a version, upload the source maps and validate them:

sentry-cli releases files $CODEBUILD_RESOLVED_SOURCE_VERSION upload-sourcemaps build/static/js --validate

When we use the command above to upload source maps and attach them to a release, all seems to work well. The source maps get uploaded and are attached to the release in the
‘artifacts’ tab. (See image below)

However, when an error occurs, sentry does not map the errors, they still show the obfuscated ‘chunk’ files.

I had thought this might be an issue with our on-premise server, so we switched to the hosted version and are considering purchasing some licenses, but seems the issue is the same.

If anyone has dealt with this issue before I’d greatly appreciate any feedback.

1 Like

I worked this out with Sentry support the other day, you need to pass a url prefix for your JS files. Adding something like this to your sentry-cli command should do the trick: --url-prefix '~/static/js'

2 Likes