Hi all, I’ve been looking up on this forum on the same topic. I don’t think there has been any concrete answer to why Sentry is trying to get sourcemaps from an external location when the sourcemap is already in the artifact attached to the release.
I’m using webpack’s SourceMapDevToolPlugin
to create sourcemaps
new webpack.SourceMapDevToolPlugin({
filename: '[name].js.map',
append: '//# sourceMappingURL=[url]'
})
I’m using @sentry/webpack-plugin
for uploading the generated sourcemaps to sentry
The setting for the sentry webpack-plugin is as follows:
new SentryCliPlugin({
include: resolve('./clients/', process.env.ARTIFACT, 'dist'),
ignore: ['node_modules', 'webpack.config.js'],
ext: ['map']
})
In the above, i’m just including whatever is in the client/XXX/dist folder that has the .map
extension.
The release is set to the latest git commit since i’ve omitted it out (this is the default fallback).
Below are the keys that i’ve set in my .sentryclirc
file
[defaults]
org=org-x-name
project=my-project-name
[auth]
token=mytokenabcdefg
I’m uploading the minified files to s3 but leaving out the .map
files generated
I have no clue why it is trying to fetch the sourcemaps from s3. See image below for the 403 error. It’s 403 because there’s no such file that URL anyway.
I’ve also checked the release and I see that all the .map
files have been uploaded as artifacts
I’ve already tried a scenario where I’ve uploaded the minified .js files + the .map
files. and it gave the same 403 errors by trying to fetch from my s3 cdn
What am I missing here? is there something wrong with my webpack build process? Is there something I should be writing in the .sentryclirc
file?
Hope to get some help on this here.
Thanks Sentry and fellow community members