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.
Problem solved.