Closed
Description
Is there an existing issue for this?
- I have checked for existing issues https://github.com/getsentry/sentry-javascript/issuesI have reviewed the documentation https://docs.sentry.io/I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
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.
rm build/static/{js,css}/*.map
sed -i'' -e '/\/\/# sourceMappingURL.*/d' build/static/js/*.js
sed -i'' -e '/\/\*# sourceMappingURL.*/d' build/static/css/*.css
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.
Metadata
Metadata
Assignees
Type
Projects
Status
Waiting for: Product Owner
Milestone
Relationships
Development
No branches or pull requests
Activity
AbhiPrasad commentedon Oct 26, 2023
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
7.73.0
was regarding session replay, are you using that?Providing a minimal reproduction would also allow us to debug this faster. Thanks!
nathanchapman commentedon Oct 26, 2023
Hey @AbhiPrasad thank you for the quick response!
We're uploading source maps with the GitHub Action https://github.com/getsentry/action-release/
Then we delete them from the application bundle using the snippet in the issue description
Then we deploy to Firebase with https://github.com/w9jds/firebase-action/
Nothing has changed with anything else, those dependencies are pinned and I've repeatedly confirmed it's the upgrade to
7.73.0
and above causing the issue.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)
AbhiPrasad commentedon Oct 26, 2023
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
nathanchapman commentedon Oct 26, 2023
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
main
("live" hosting channel for development) so this wasn't caught in the original PR until after merged and deployed (because the preview channel worked fine / tests passed). I've confirmed it's only the combination of deleting sourcemaps + upgrading to @sentry/browser v7.73.0 and above, by adding the deletion of source maps to our PR workflow on a branch with the upgrade being the only other change. When I remove thedelete sourcemaps
step, the app with sentry 7.73.0+ loads just fineThe addition/removal of the sourcemap upload with
getsentry/action-release
had no affect22 remaining items