-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
Is there an existing issue for this?
- I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- I 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 package are you using?
@sentry/react
SDK Version
6.13.2
Framework Version
17.0.0
Link to Sentry event
No response
Steps to Reproduce
On our react app, we're getting one error on safari browser and it's a single client specific issue. Same react app works on our end on safari browser. All our GraphQL api's are failing also all fetch api calls are failing. I spent a huge amount of time debugging the issue but wasn't able to replicate.
Error:
TypeError
options.headers.get is not a function. (In 'options.headers.get(key)', 'options.headers.get' is undefined)
The error stack is pointing out to this code
return originalFetch.apply(global, args).then(
(response: Response) => {
triggerHandlers('fetch', {
...handlerData,
endTimestamp: Date.now(),
response,
});
return response;
},
(error: Error) => {
triggerHandlers('fetch', {
...handlerData,
endTimestamp: Date.now(),
error,
});
// NOTE: If you are a Sentry user, and you are seeing this stack frame,
// it means the sentry.javascript SDK caught an error invoking your application code.
// This is expected behavior and NOT indicative of a bug with sentry.javascript.
throw error;
},
);
This code is from transports/instrument.ts of Sentry's source code.
From what I'd debug I feel as sentry is intercepting every request so due to some polyfill issue for native fetch, can this error occur ? Any help ?
Expected Result
Should work on safari browser!
Actual Result
Not working on safari browser!