-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Description
Important Details
How are you running Sentry?
Saas (sentry.io)
Description
We're using sentry with sentry-cli to manually upload source maps.
Steps to Reproduce
- Generate source maps (with #sourceMappingURL comments)
- Upload source map with sentry-cli (artifact)
sentry-cli upload-sourcemaps --ext map --url-prefix xxxx --rewrite - Remove all *.map in production release.
- Remove all
#sourceMappingURLcomments in *.js
find '.next' -type f \( -iname \*.js -o -iname \*.css \) -exec sed -i -E 's/\/(\/|\*)# sourceMappingURL=[^ ]*\.(js|css)\.map(\*\/)?//' {} +
What you expected to happen
The error should still report with source map without sourceMappingURL comment.
(note: I can see the correct artifacts uploaded in sentry admin console )
I can confirm it works perfectly without step 4.
Possible Solution
The reason we want to strip the comment is that the browser will throw 404 warning when we open the console by default (chrome and safari) because we explicitly remove all *.map files on our actual server.
We want to console.log() some hiring information there but there're many *.map 404 warnings obstructing the information.
I google for a while and find SourceMap HTTP response header but it is not what we want. If browser see the header it will try to fetch the source map file and get 404 error.
It should work without the comment. ( like hidden-source-map? )
Metadata
Metadata
Assignees
Labels
Fields
Give feedbackProjects
Status
Status