-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
Networking library has no exported methods on Android #39260
Comments
This seems to be unrelated to the issue where the community fetch polyfill doesn't work on Android, but made debugging more difficult so I'll leave this issue open. |
Hi @alessbell
What was the issue afterall? react-native/packages/react-native/Libraries/Network/RCTNetworking.android.js Lines 43 to 95 in 5a926c5
So I'm unsure why you noticed what you were reporting. |
Hi @cortinico, thanks for your reply.
The original issue was react-native-community/fetch#13: the community fetch polyfill that enables text streaming wasn't working on Android during local dev. It looks like some have found workarounds (see comment about disabling I also saw that |
This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
I've addressed this in #48166, there is not an actual issue in the functionality itself but it is rather some inconsistency in the exports as for iOS an object is exported and for Android a class. |
Description
Hi all 👋
I work on Apollo Client, and with
@defer
support coming to GraphQL, I've been investigating the state of text streaming in React Native so our community can use features that rely on it in their RN apps. I found #27741 which brought me to the polyfill, https://www.npmjs.com/package/react-native-fetch-api.There's an open bug about the polyfill not working on Android which I can reproduce: react-native-community/fetch#13
When I looked into it, I was puzzled by what I found: when I run the same program on iOS, the polyfill uses native APIs to make the fetch by doing
import { Networking } from 'react-native';
. ThatNetworking
module exports an interface that includes thesendRequest
method, which is how the request is fired by the polyfill.When I run it on Android, the
Networking
module has no exported methods at all. I also triedimport AndroidNetworking from "react-native/Libraries/Network/RCTNetworking.android.js";
and again found an empty object.Since others using the polyfill are experiencing the same thing, it seems like it's not a local configuration issue I may be having. Happy to provide any additional info, thanks!
React Native Version
0.72.4
Output of
npx react-native info
Steps to reproduce
See README.md in https://github.com/alessbell/RNMultipartSubsDemo
Snack, screenshot, or link to a repository
https://github.com/alessbell/RNMultipartSubsDemo
The text was updated successfully, but these errors were encountered: