-
-
Notifications
You must be signed in to change notification settings - Fork 225
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
Sourcemap inject breaks with paperjs #2273
Comments
Hi @netpok, thank you for reaching out, and thank you for providing a full reproduction of the issue; it makes it much easier for us to help. Unfortunately, the error you are observing is to be expected, since the For an embedded sourcemap, the //# sourceMappingURL=data:application/json;base64,[base-64 encoded data here] But, in your case, the part where we would expect the base-64 encoded data to be instead contains this string: Most likely, a template engine is supposed to replace this string with the actual base-64 encoded sourcemap data, but due to some bug or misconfiguration with your bundler, this is not happening, and so the template string is being copied into your compiled JavaScript source file. I would suggest checking your bundler configuration, and if you cannot find any problems, I would recommend raising an issue with your bundler or possibly with PaperJS. Something is going wrong in the compilation process, before Sentry CLI is invoked. |
Hi @szokeasaurusrex, I still think this is an error because it's not an embedded sourcemap, it's a javascript string literal that is used to add a sourcemap to a file, originating from here: https://github.com/paperjs/paper.js/blob/92775f5279c05fb7f0a743e9e7fa02cd40ec1e70/src/core/PaperScript.js#L441 The For example this bug also makes impossible to strip similar sourcemaps with the following code: |
Oh, I think I missed the `)+v),/^(inline|both)$/.test(A)&&(v+=`
//# sourceMappingURL=data:application/json;base64,`+wt.btoa(unescape(encodeURIComponent(JSON.stringify(Z))))),v+=` So, the In this case, I think that yes, this is a bug. |
CLI Version
2.39.1
Operating System and Architecture
Operating System Version
Linux Mint 21.3
Link to reproduction repository
https://github.com/netpok/paperjs-vite-sentry-inject-poc
CLI Command
sentry-cli sourcemaps inject dist/assets
Exact Reproduction Steps
npm install
andnpm build
(optional, prebuilt dist files are also in the repo)sentry-cli sourcemaps inject dist/assets
Expected Results
Debug ids successfully injected
Actual Results
CLI throws error:
Invalid embedded sourcemap in source file dist/assets/index-DAUKG_fp.js
because it finds string literal of sourceMappingURLhttps://github.com/netpok/paperjs-vite-sentry-inject-poc/blob/main/dist/assets/index-DAUKG_fp.js#L35
Logs
The text was updated successfully, but these errors were encountered: