-
-
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
TypeError: Cannot set properties of undefined (setting 'Accept') #7783
Comments
+++, have same bug after deps update |
@kelnei I've solved it by aligning sentry packages version (tracing had newer version than core sentry package) |
@kelnei can you verify that all your Sentry package versions are aligned as @MalkovVladimir suggested? |
Side note, you do not need to install @sentry/tracing anymore - you can remove it from your package.json and just import directly from e.g. |
In this specific project, I'm only using @sentry/react, and importing BrowserTracing directly from that (as part of the upgrade to 7.47.0), so it's not a misalignment in the current project, but I do think you and @MalkovVladimir are right. We run multiple instances of Sentry, this bundle is ran on multiple sites and includes it's own monitoring (hence the reason it uses Hub directly and not Sentry.init), but some of these sites use their own Sentry JS too and that's where the version misalignment is. |
I was able to test this in one of our staging environments by deploying our bundle and simultaneously updating the sentry bundle on one of our sites, and the error did indeed go away when aligning the versions of the multiple instances of sentry on the page. |
Have a same problem |
@surger Please align all the versions of your Sentry dependencies. |
Closing this as it seems solvable by aligning dependencies. |
My code is embedded into other website, which has their own version of sentry installed. I can't control it, had to rollback sentry update from 7.47.0 back to 6.11.0. @lforst Can you reopen, please? |
Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using? If you use the CDN bundles, please specify the exact bundle (e.g.
bundle.tracing.min.js
) in your SDK setup.@sentry/react
SDK Version
7.47.0
Framework Version
React 18.2.0, Axios 1.3.5
Link to Sentry event
https://sentry.io/organizations/fullbeakercom/issues/4065197371/events/4fed505225e1467d9ba84d2e607105bc/?project=1274657
SDK Setup
Steps to Reproduce
We are making a typed axios request and awaiting the result.
And for some reason the internal sentry_xhr object doesn't not have a request_headers property and so setting the Accept header fails.
Expected Result
I expect Sentry's instrumentation not to cause an exception when intercepting the XHR.
Actual Result
The text was updated successfully, but these errors were encountered: