You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Cannot read property 'then' of undefined (getNativeFetchImplementation) #5792
For fetch to not be defined, are you monkeypatching or changing the fetch global in any way? We are just grabbing the fetch impl from the possible scope. The error you linked seems to not have any browser info, is that code being run as part of server-side rendering?
changed the title [-]Cannot read property 'then' of undefined[/-][+]Cannot read property 'then' of undefined (`getNativeFetchImplementation`)[/+]on Oct 14, 2022
Hey, thank you for investigation time into this problem.
We have the same issue. 284k errors for the last 30 days. How we can help you with information for understanding this problem?
File which is reported with error -> @senty/browser/types/transports/fetch.d.ts
We have TypeError. Array.forEach(native)
Message: Cannot read property 'then' of undefined
Stack trace
// webpack://client/../src/transports/fetch.ts in makeRequest at line 33:1returnnativeFetch(options.url,requestOptions).then(response=>({statusCode: response.status,headers: {'x-sentry-rate-limits': response.headers.get('X-Sentry-Rate-Limits'),'retry-after': response.headers.get('Retry-After'),},
Additional info which connected with this error
// native in Array.forEach// webpack://client/../src/syncpromise.ts in t._executeHandlers at line 176:1constcachedHandlers=this._handlers.slice();this._handlers=[];cachedHandlers.forEach(handler=>{if(handler[0]){return;}if(this._state===States.RESOLVED){
Are you monkeypatching or changing the fetch global in any way?
We only use @babel/preset-env (7.12.16) & core-js (3.19.3) And for us looks like that when we downgrade these versions the amount of mistakes decreases. But not looks like a permanent decision, because today we have 2200 errors on it.
@AbhiPrasad ok, thank you! For now I didn't find anything in our application which could change native fetch. I only thought maybe transpiler or a side effect from npm library. But found nothing. Looks like we not touch somehow fetch.
Activity
AbhiPrasad commentedon Sep 22, 2022
Hey, thanks for writing in!
For fetch to not be defined, are you monkeypatching or changing the
fetchglobal in any way? We are just grabbing the fetch impl from the possible scope. The error you linked seems to not have any browser info, is that code being run as part of server-side rendering?[-]Cannot read property 'then' of undefined[/-][+]Cannot read property 'then' of undefined (`getNativeFetchImplementation`)[/+]AbhiPrasad commentedon Oct 17, 2022
Tracking internally in https://www.notion.so/sentry/undefined-nativeFetch-call-347f73dcf0494660910235e286197da6 as we've had a Sentry saas customer report this as well.
webelart commentedon Oct 24, 2022
Hey, thank you for investigation time into this problem.
We have the same issue. 284k errors for the last 30 days. How we can help you with information for understanding this problem?
File which is reported with error -> @senty/browser/types/transports/fetch.d.ts
We have TypeError. Array.forEach(native)
Message: Cannot read property 'then' of undefined
Stack trace
Additional info which connected with this error
AbhiPrasad commentedon Oct 24, 2022
@liveldi are you monkeypatching
fetchin anyway? Could you share the Sentry errors where this is happening?webelart commentedon Oct 24, 2022
@AbhiPrasad Thank you for answering!
Are you monkeypatching or changing the fetch global in any way?
We only use @babel/preset-env (7.12.16) & core-js (3.19.3) And for us looks like that when we downgrade these versions the amount of mistakes decreases. But not looks like a permanent decision, because today we have 2200 errors on it.
Also we don't use transforms. Some screenshots
AbhiPrasad commentedon Oct 25, 2022
@liveldi thanks for getting back! Are you using any 3rd party SDKs that might be mutating/monkeypatching fetch in any way?
AbhiPrasad commentedon Oct 25, 2022
For now we are patching this to stop any future errors. Fix will be part of the next release!
webelart commentedon Oct 25, 2022
@AbhiPrasad ok, thank you! For now I didn't find anything in our application which could change native fetch. I only thought maybe transpiler or a side effect from npm library. But found nothing. Looks like we not touch somehow fetch.
AbhiPrasad commentedon Oct 25, 2022
@liveldi might be a browser extension here, which we really can't do anything about. Will continue to investigate!