-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[React Native] V8.14.0 breaks normal fetch behavior #3027
Comments
Are you using |
Hi Cody, What I'm doing is just rendering a component with a three-fiber canvas within a parent component that also calls several of our own backend API's (just normal HTTPS endpoints with JSON responses). Exactly the same calls that would normally successfully execute (i.e. unpack the response using await reponse.json() or await response.arrayBuffer()) in any other place in the app, will fail as soon as I import stuff from the react-three-fiber/native 8.14.0 in that child component. We're on: |
I'm not able to reproduce locally, testing with |
The following commit seems to have broken the normal fetch() behavior in React Native:
It seems like the Polyfill(s) overwrites global behavior that results in broken fetch responses using RN's default fetch() API. After importing the library and calling my own https endpoints using fetch, the await response.json() throws an Unexpected identifier "object" error and the arrayBuffer of my response seems to be empty.
It's been a hell of a ride tracing this back to react-three-fiber 8.14.0 :) Downgrading to 8.13.9 seems to resolve the issue.
The text was updated successfully, but these errors were encountered: