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

Correctly handle source mapping URLs with query strings &c. #1733

Closed
loewenheim opened this issue Sep 5, 2023 · 2 comments
Closed

Correctly handle source mapping URLs with query strings &c. #1733

loewenheim opened this issue Sep 5, 2023 · 2 comments
Assignees

Comments

@loewenheim
Copy link
Contributor

So apparently source mapping URLs (as given in //# sourceMappingURL comments in JS source files) can contain elements such as URL query strings. This obviously presents a problem when we look for the sourcemap files in the local file system. On the other hand, we can't just completely discard this stuff either—it might be relevant when scraping the sourcemap from the internet.

I think

fn collect_sourcemap_references(&mut self) {
should strip away everything from a source mapping URL that would prevent finding the file in the local filesystem. Since add_sourcemap_references is based on this function, this would also mean that the "cleaned up" URLs end up in the sourcemap bundle metadata, which is what we want.

@loewenheim loewenheim linked a pull request Sep 5, 2023 that will close this issue
@rodolfoBee
Copy link
Member

Hi @loewenheim i can see that the issue was fixed in symbolic via 809.

Would source maps work in sentry even when the debugID is not injected in the source map file (only on the minified file) and the debugID is present in the event? (the original issue encountered by a user)

@loewenheim
Copy link
Contributor Author

Would source maps work in sentry even when the debugID is not injected in the source map file (only on the minified file) and the debugID is present in the event? (the original issue encountered by a user)

It might work, in the same way that sourcemaps worked before we introduced debug ids, i.e. by matching on file names. But the debug id in the minified file and in the event would not be very useful in that case.

How come the user has debug ids in minified files, but not in sourcemaps?

@loewenheim loewenheim self-assigned this Sep 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants