Skip to content
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

Invalid responseType: blob #21

Open
BuddhaBing opened this issue Dec 14, 2023 · 2 comments
Open

Invalid responseType: blob #21

BuddhaBing opened this issue Dec 14, 2023 · 2 comments

Comments

@BuddhaBing
Copy link

BuddhaBing commented Dec 14, 2023

After installing this library and using react-native-polyfill-globals to polyfill, I'm unable to successfully fetch any data because every request results in Invalid responseType: blob. I encountered this both on an existing project (which uses react-native v0.72.7) and on a completely new/clean app that I spun up to test (again using react-native v0.72.7).

If I add the following to the root index.js file, it works but I'm not sure why this fixes it (this is some code recommended to get network logs working in the now deprecated React Native Debugger) or what the implications would be:

global.XMLHttpRequest = global.originalXMLHttpRequest || global.XMLHttpRequest;
@aciaschetti
Copy link

This is happening for me too. The code you provided fixes the issue but feels dirty. I'm using the polyfill as well as Supabase and the comments Supabase provides in their suggests a problem with CORS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants