-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Sentry breaks application when sourcemaps aren't included with application bundle #9378
Comments
Hey @nathanchapman - could you provide your SDK setup? Could you go into details about your firebase setup? How are you uploading sourcemaps? The only major change in Providing a minimal reproduction would also allow us to debug this faster. Thanks! |
Hey @AbhiPrasad thank you for the quick response! We're uploading source maps with the GitHub Action https://github.com/getsentry/action-release/ Nothing has changed with anything else, those dependencies are pinned and I've repeatedly confirmed it's the upgrade to We are not using session replay to my knowledge (EDIT: confirmed we are not). That's the most puzzling part of this (it took a very long time to narrow this down lol) |
If you remove the source maps github action (but still delete sourcemaps), does the error still occur? This might be because we are using an outdated version of sentry-cli in the GitHub Action: getsentry/action-release#168 |
Yes, that's actually how we handle PRs. The app is deployed to a preview "hosting channel" in Firebase but no source map upload to Sentry occurs since it's not a "release" We were only deleting source maps on the workflow that runs on The addition/removal of the sourcemap upload with |
So the error happens when you 1) run delete sourcemaps step 2) use I guess the deletion of There is no logic in the SDK that aims to look for this, so I assume it may be a bundling issue of some kind. What bundler are you using? |
great call! Removing this did the trick. Is it fine to leave those lines even if there are no sourcemaps in the bundle?
|
yeah it's fine to leave it, all that happens is that dev-tools will display a warning like what you showed above. One theory of why this is happening is that when you mutate the file after webpack has outputted it, it messes up the subresource integrity. So webpack generates an If you still want to remove the |
Are you using something like https://www.npmjs.com/package/webpack-subresource-integrity? |
Brilliant, thank you so much for the help!
Nope! Confirming that this is definitely the issue: It's deleting the source map URL line (e.g. |
thanks for helping debug this @nathanchapman - appreciate the help 😄 |
I think we specifically weren't doing this because we didn't want to have to build twice |
Huge thanks to you. I really appreciate the support and quick responses! |
Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/browser
SDK Version
7.73.0+
Framework Version
React 17.0.2
Link to Sentry event
No response
SDK Setup
No response
Steps to Reproduce
Upgraded from 7.72.0 to 7.73.0 (and later, tested up to 7.75.1 as well)
Upload source maps to sentry
Delete source maps from bundle e.g.
Deploy application (in our case, to Firebase)
Expected Result
Application loads as expected, like it did with 7.72.0 and earlier
Actual Result
Application fails to load with
Uncaught (in promise) ChunkLoadError: Loading chunk 825 failed.
The text was updated successfully, but these errors were encountered: