Source mapping not working with existing artifacts

I am trying to use sentry with an angular application and i cannot make it work on production with source maps .
I am using sentry-cli to upload the source maps.

I can see the files in the release (js and map). Nevertheless, when the application is throwing an error, i see the stack trace of the uglified js.

I have the following questions:

  1. considering that i don’t use the business plan and i am not handling the releases trough it, is it possible to use the source maps from the releases? It doesn’t make sense. Probably i am missing something…
  2. the stack trace points to /main.e103c0e2134f03c1027b.js and the artifacts are like ~/ Could this be the reason why it’s not working? If so, how can i make the artifacts have the same form as the one from the stack trace?
  3. i am using the new feature of angular cli, hidden source maps. If understood it correctly, it generates the source maps normally, but it doesn’t map them to the js files. I don’t have a connection like // at the end of the file.
    Could this be the problem? Should i add the link to source map in the js file and upload only the js file to the server?
    This would mean for the angular application to build with the sourcemap option set to true, upload the files with sentry-cli, remove the source map files and finally deploy.

Thank you,

1 Like

Man, this source mapping process with artifacts is completely broken. I spent literally two days trying to configure it but had no success.
The only working option is to enable “Enable JavaScript source fetching” in your project’s settings and expose source maps to the world using “source-map” webpack devtool instead of “hidden-source-map”. I’m sure there is something similar in angular cli.