In React Native, a fetch that cannot complete at the network level throws TypeError: Network request failed. It deliberately carries no detail, and it is different from an HTTP error: a 404 or 500 response is a completed request and does not throw this. This error means no response arrived at all. The causes are a short, checkable list, and one of them, the address of “localhost” from inside an emulator, accounts for a large share of cases.
localhost is the emulator itself; the development machine is 10.0.2.2. On the iOS simulator, localhost does reach the host Mac. On a physical device, use the development machine's LAN address and make sure the server binds to it (listens on 0.0.0.0, not just 127.0.0.1) and the firewall allows it.http:// by default. Android needs usesCleartextTraffic enabled (or a network security config) for the development server; iOS needs an App Transport Security exception. In production, the real fix is HTTPS.response.ok and complains, the request succeeded at network level; a different bug is being reported.10.0.2.2 host mapping, in almost every case.Why does fetch not say what went wrong? The web fetch specification surfaces network failures as a generic TypeError by design, partly so pages cannot probe internal network details. React Native inherits that behavior, which is why the checklist approach beats reading the message.
Postman can reach the API, why can't the app? Postman runs on the development machine, where localhost is correct and cleartext rules do not apply. The app runs in a different network context; reproduce from the device or emulator, not from the desktop.
Does CORS cause this in React Native? No. React Native does not enforce CORS; that is a browser rule. A failure that looks like CORS in a mobile app is one of the network causes on this page.