wkh237 / react-native-fetch-blob

A project committed to making file access and data transfer easier, efficient for React Native developers.
MIT License
2.61k stars 1.59k forks source link

Blocking the main thread or JS thread or something else weird #563

Open blackxored opened 6 years ago

blackxored commented 6 years ago

Hi, I've spent quite a lot of time trying to figure out this odd behavior, and while ideally I'd be 100% sure unfortunately I'm not. I've traced this back to this combination of libraries, and will continue to look further if it weren't to be the culprit but seems like it is. I start an upload with react-native-fetch-blob (technically Blob build plus polyfilled XMLHttpRequest in React Native). While the UI seems to respond fine while it's uploading, when issuing new queries (by navigating to new items) with Apollo I'm stuck into the loader state and the query result never seems to return.

An unrelated issue that was source of confusion is that you seem to disable the network activity indicator regardless it was opted in or not in config.

528 might look related, but naively disabling this doesn't fix my original issue.

blackxored commented 6 years ago

I've since figured out it's due to the XMLHttpRequest polyfill. Apollo seems to behave weirdly when that's loaded, hence my requests are never completing in its eyes. I'm investigating further.