-
Notifications
You must be signed in to change notification settings - Fork 24.4k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
React-Native fetch Network request failed on android #20976
Comments
##desc ##fetch error: ##React Native Environment Info: |
@asir ... i am facing the same issue . please let me know if you resolved this issue. |
I do not know if it's optimized, but I solved the problem with this code: in MainApplication.java
In CustomClientFactory.java
|
@totofe - Its not working |
@anshumanburman @18601673727 when i update to react-native 0.57.1,the https is not work,but http is ok; |
This worked for me on android! Thanks! |
this is fixed in the master, and will be included in future releases. for work arounds see #23984 |
One of the problem for this bug may be, that API have some restricted characters in URL, like underscore. Look at link below |
Environment
React Native Environment Info:
System:
OS: macOS High Sierra 10.13.4
CPU: x64 Intel(R) Core(TM) i5-5350U CPU @ 1.80GHz
Memory: 47.66 MB / 8.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 8.11.3 - /usr/local/bin/node
npm: 5.6.0 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 11.4, macOS 10.13, tvOS 11.4, watchOS 4.3
Android SDK:
Build Tools: 23.0.1, 26.0.1, 26.0.3, 28.0.2
API Levels: 23, 26, 28
IDEs:
Xcode: 9.4.1/9F2000 - /usr/bin/xcodebuild
npmPackages:
react: 16.4.1 => 16.4.1
react-native: 0.56.0 => 0.56.0
npmGlobalPackages:
create-react-native-app: 1.0.0
react-native-cli: 2.0.1
Description
I try to call a https webservice using fetch. The webservice uses a certificate to be able to connect.
I had the same problem with IOS. I solved the problem by adding in the file RCTHTTPRequestHandler.m this code :
On Android, I have this message:
how can I solve this problem for android?
Reproducible Demo
The text was updated successfully, but these errors were encountered: