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

Source maps don't get associated to scripts with a blob: URL #18222

Open
getkey opened this issue Apr 13, 2020 · 2 comments
Open

Source maps don't get associated to scripts with a blob: URL #18222

getkey opened this issue Apr 13, 2020 · 2 comments

Comments

@getkey
Copy link

getkey commented Apr 13, 2020

Important Details

How are you running Sentry?

Saas (sentry.io)

Description

When an error happens in as script with a blob: URL, its source maps doesn't get associated, and error below is shown.

image

URL for which the issue happened
image

But this file ends with

//# sourceMappingURL=bundle.js.map

And bundle.js.map has been uploaded to the artifacts:

image

@CaptObvious described the same issue as me here https://forum.sentry.io/t/source-maps-not-loading-for-js-blobs/3736

Steps to Reproduce

You can use the script below to use a script from a blob: URL. Just replace blobScript with a minified script and upload its sourcemap.

const blobScript = `console.log(\'Hello world!\');
throw new Error('Triggering sentry');
//# sourceMappingURL=bundle.js.map
`;
const blob = new Blob([blobScript]);
const url = URL.createObjectURL(blob);

const script = document.createElement('script');
script.setAttribute('src', url);
document.body.appendChild(script);

What you expected to happen

The same behavior as when the script is loaded with a normal URL: being able to see the error in the context of the original source.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 6, 2021

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Accepted, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

@tgrant59
Copy link

tgrant59 commented Feb 9, 2021

I'm experiencing this a lot with mobile browsers

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

4 participants