lquixada / cross-fetch

Universal WHATWG Fetch API for Node, Browsers and React Native.
MIT License
1.67k stars 104 forks source link

IOS 9.3.5 'a problem repeatedly occurred' on safari #49

Closed Dammic closed 5 years ago

Dammic commented 5 years ago

Hey,

I'm currently fighting with a problem. A library we're using, airbrake-js, has cross-fetch as dependency. For some reason, when we launch the page on safari on ios 9.3.5, the page doesn't load with this cryptic message on page and no way to debug it properly. The package resolves to newest version, 3.0.3

I've tracked the issue to this package, when I don't include the other library and just include this one directly in code as:

import 'cross-fetch';

The page crashes (with debugger) while loading with no error other than the one on the screenshot. If I comment this line, it works.

What's more, when I use

import 'cross-fetch/polyfill';

It doesn't crash, so it suggests there is a problem with default export maybe? We're using react-create-app with newest webpack version 3. We've recently migrated through react-create-app from webpack 1 to webpack 3 and there are reports it worked fine before. I would assume some kind of polyfill might be missing. Could you perhaps point me to what might be the problem (or what kind of polyfill could be missing)? I would appreciate any help!

error

Dammic commented 5 years ago

I've found the issue behind it - the 3.0.3 somehow lost support for ios 9.3.5. I've downgraded the library version to 3.0.1 and it works fine.

Can be closed, if that is intended. Leaving that in case anybody stumbles upon this problem.

lquixada commented 5 years ago

Hi @Dammic ! Thanks for taking the time to report the issue. I was able to reproduce the error and fix it. Please check if the version 3.0.4 solves the problem in your environment.

Dammic commented 5 years ago

Hey @lquixada I've checked our app with the updated version and indeed it works great now. Thanks for the fix!

lquixada commented 5 years ago

that's great news! I'm glad it worked for you. Closing the issue.