-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
Fetch throws 'Network request failed' on Android SDK Platform 24 #15100
Comments
Just curious, does this reproduce using Snack? |
@hramos, this doesn't reproduces using Snack: https://snack.expo.io/rJYNZk0B- works fine. |
Hi @DmitryMaksakov, I have just started to face this same issue when I updated our react-native package to 0.46.4. What's odd is that, on development, using a Ngrok URL to our local server, everything works, but not with our production API URL. UpdateThat's a bug on Android 7.0, as described here. I could get it working on Android using the first workaround proposed by Vicky Chijwani, which was:
|
thank you @diegocouto! Changing my nginx config from ssl_ecdh_curve secp384r1 to ssl_ecdh_curve prime256v1 absolutely fixed this problem for me. |
Appears to be a bug with Android. Closing. |
Same issue with iOS and android in react native version 0.48.2 |
Same issue with : "react-native": "^0.46.4" |
Hey @cinder92, @pvsong - have you reached a fix for it? I'm facing the very same issue after upgrading to 0.50 :/ I appreciate your replies. |
i have also same issue ,plz provide solution |
@diegocouto and @hramos , if it is android 7.0 bug, why does native request work well on Android 7.0 for same url as mentioned by @DmitryMaksakov |
and for the sample https://snack.expo.io/rJYNZk0B- shared by @DmitryMaksakov , it always shows "Network request failed" |
Damn. Same boat here. |
I had the same problem after upgrading to react 0.49 and react 0.52. Everything was fine with react 0.15. (Yes, it was about time to do the upgrade :P). I did not like the idea of changing our server settings, so what I did was following. I forked https://github.com/wkh237/react-native-fetch-blob, added the necessary cipher suites and changed all fetch functions with RNFetchBlob.fetch and now it works again. |
Same here, any fix yet? |
Currently having this same issue, but I tried running on Android 6.0 with sdk 23 and the issue still persists |
Same problem here. I am on 0.53 |
same issue on 0.54 |
same issue 0.55 |
same .54 |
1 similar comment
same .54 |
I was getting the same error this morning. fetch worked on my Android 7.1.1 device, but not on an Android 6.0 one. I then ran across this post https://community.letsencrypt.org/t/unable-to-get-local-issuer-certificate/15004. I was also using the plain certificate in my ssl setup; when I switched to using the full chain certificate (i.e., the one with all the intermediaries, too) fetch started working on both devices. |
I'm having this issue, but the server is using chain - thoughts, @jjd314 ? |
Sorry, @ericLoansnap, I don't have a clue. I was just lucky that I stumbled on that other post. Apart from suggesting obvious things like making sure the certificate works with something other than react-native, I have no advice. Good luck. |
if you point to the local host web service. The solution is to replace localhost with the IP address of your machine. but ios works fine |
i dont know why, but uninstall apk and reinstall ,it's ok |
Is this a bug report?
Yes
Have you read the Bugs section of the Contributing to React Native Guide?
Yes
Environment
react-native -v
: react-native-cli: 2.0.1 react-native: 0.46.3node -v
: v7.7.3npm -v
: 4.1.2yarn --version
(if you use Yarn): ---Then, specify:
Steps to Reproduce
Expected Behavior
Request should return HTTP code 200 and some data or HTTP code 401.
Actual Behavior
I have an error:
Reproducible Demo
(Paste the link to an example project and exact instructions to reproduce the issue.)
I have tested different API SDK Platform versions (from 22 up to 26), the problem reproduces only on API SDK Platform 24 (Android 7.0).
I also did this request via native Android app and it was successful on all Platform versions, even 24.
The text was updated successfully, but these errors were encountered: