I had searched the similar issues on the Internet. Unfortunately, I can’t found any possible solutions although quite many of same cases online.
I uploaded the project source map to my Sentry server and delete it before deploy to cloud.
I assume it will take the Sentry artifacts while issue happens, but the actual result is it refer to a 404 source map in my cloud server.
As you can see, the JS file and source map are uploaded.
To prevent I was missed configuring anything, I did referred to the Sentry source map troubleshooting doc.
Verify a release is configured in your SDK
Yes, the release tag is “release-20201215” and the source map are uploaded to “release-20201215”
Verify workers are sharing the same volume as web (if running as docker on premise)
Yes, they are sharing the same volume.
Check the link for docker config printed through command docker-compose config
I spent my whole day for solving this issue but still have no idea which part is wrong. Please give me a hand Do let me know any info needed.
Yes, Im using the webpack plugin to upload my source map.
Below is my sentry config for init and webpack.
The reason why I didnt use .sentryclirc is because I have multiple server to isolate the sandbox data and production data.
I already reset all the auth token permissions to Admin level, seems like problem is not on the internal integration auth token.
We are facing the exact same problem. We are using webpack to build our project, artifacts are uploaded in the release and have correct names. I have gone twice through the “Troubleshooting” section in the documentation, and everything just seems to be OK.
The only problem is that Sentry keeps trying to fetch source maps from the external server and ignores the artifacts (We have 404s too, as we remove the source maps from the external server).
I’m very curious about the solution because I’ve spent almost two days trying to figure it out and nothing helped.
OK Problem solved, I review back all possible root causes and found it.
The root cause mentioned in Verify artifact names match sourceMappingURL value section. (But not exactly the same as my case)
Let’s say link below is my JS file and its source map online: https://a.b.com/s/project/asset/1.js https://a.b.com/s/project/asset/1.js.map (removed after uploaded to Sentry)
In Sentry, check the source map in release you will found that the source map labelled as: ~/asset/1.js.map
The character ~ represent the domain hostname, https://a.b.com, in another word, the source map uploaded to Sentry is: https://a.b.com/asset/1.js.map
That is the reason why Sentry is not referring to sourcemap uploaded in my case.
Solution
se urlPrefix in sentry webpack plugin: ~/s/project/
Re-upload and hit error again, you will see the error stack show as expected.