react-native icon indicating copy to clipboard operation
react-native copied to clipboard

[Android] fetch throwing "Network request failed" in 0.14

Open madwed opened this issue 11 years ago • 3 comments

Fetch is throwing a Network request failed error when I try to make a request to a local server. I'm pretty sure the request isn't getting out of the app. I've checked and double checked the request headers and target URL. I tried disabling CORS on my local server. I'm using digits in my app and digits is able to make contact with its server outside the app and return authorization.

madwed avatar Nov 09 '15 19:11 madwed

Figured out the issue, because the android emulator runs in a VM localhost points at the device. You need to specify your ip or 10.0.2.2 instead.

madwed avatar Nov 09 '15 21:11 madwed

Hi, how to specify the ip?

blacksunset avatar Feb 01 '16 09:02 blacksunset

Where do we need to change the ip...?

waifo avatar Jan 13 '18 07:01 waifo