React-native: [Android] fetch throwing "Network request failed" in 0.14

Created on 9 Nov 2015  路  3Comments  路  Source: facebook/react-native

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.

Locked

Most helpful comment

Hi, how to specify the ip?

All 3 comments

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.

Hi, how to specify the ip?

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

despairblue picture despairblue  路  3Comments

anchetaWern picture anchetaWern  路  3Comments

DreySkee picture DreySkee  路  3Comments

aniss picture aniss  路  3Comments

josev55 picture josev55  路  3Comments