Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(angular) Hidden source maps flag breaks linking #7234

Closed
smeubank opened this issue Feb 20, 2023 · 4 comments
Closed

(angular) Hidden source maps flag breaks linking #7234

smeubank opened this issue Feb 20, 2023 · 4 comments
Assignees

Comments

@smeubank
Copy link
Member

Description

Issue when setting hidden: "true"

https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/#use-hidden-source-map

Example repo:
https://github.com/indra-uolles/test-sentry-angular

Solution

Confirm if only impacting angular

There is a work around in GH discussion: min.js in your extension then the algorithm in Sentry will make it work, but this approach didn;t work

update docs, to include the work around has the "official solution" unless there is a fix

@Lms24
Copy link
Member

Lms24 commented Mar 3, 2023

First observation with an Angular 15 test app: Can't reproduce this with the Sentry webpack plugin 1.x (pre-unplugin). Uploading hidden sourcemaps works ootb w/o additional configuration.

@Lms24
Copy link
Member

Lms24 commented Mar 3, 2023

Tried reproducing with Angular 15 test app + Sentry CLI v2 -> not reproducible. Hidden source maps work.

Reproduced so far only with the provided test app. Maybe source maps were emitted differently in Angular 12?

@Lms24
Copy link
Member

Lms24 commented Mar 3, 2023

Found it! It's because of an unnecessary command in the upload script provided in the repro:

sentry-cli releases files "$version" upload docs

is unnecessary because

sentry-cli releases files "$version" upload-sourcemaps docs

already uploads js and map files. No need to upload them separately. My suspicion is that because the js files were uploaded before, some rewriting or matching rules weren't applied in the same way. When removing the upload command, source maps are correctly displayed.

I don't think there's something we need to do here in the SDK. Perhaps a docs change to point this out?

related: getsentry/sentry-cli#1483

@Lms24
Copy link
Member

Lms24 commented Mar 6, 2023

Closing because IMO there's no action required on our end. Hidden source maps work ootb with the webpack plugin and with Sentry-CLI as long as all files are uploaded in one command (i.e. js files and source maps are not separately uploaded). Checked the docs and we never tell users to upload them separately.

@smeubank should we follow up with the customer?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants