I’m working on a React Native app (for Android), and my emulator (on Windows) fails to pass any network request.
Basic symptom: when I try to fetch
in my app, I get an error “Network Request Failed”. But also the emulator shows there’s no Wi-Fi connection. Other notes on symptoms and attempts to fix:
- My host Windows device has an internet connection;
- I have some apps hosted on localhost on different ports. This post made me think that some of them may cause a conflict, and I’ve tried disabling some of them, but I’m not sure how to do this consistently (i.e. what ports should I ensure to be free, do I have to restart the emulator each time, etc);
- I’ve checked AVD Manager that the device has network enabled (Edit → Show Advanced Settings → Network Speed: Full, Latency: None);
- Emualtor settings (the window opened by clicking “…”) has only “Cellular” and “Settings” tabs, no “Wi-Fi” (is it expected to be there?); in Settings → Proxy “No proxy” is selected (see the screenshot below (1));
- An attempt to open
https://google.com
in the WebView Browser Tester leads to the ERR_INTERNET_DISCONNECTED error; - Like I’ve mentioned, the Wi-Fi inside emulator is not connected. In the Settings app, “Network & Internet” shows “Networks available” (2), but inside it, none are listed regardless whether I press the Wi-Fi toggle or not (3). I’ve also tried to press the button (“reset network settings”?) in the top right corner, to no avail.
- And yeah, I’ve tried to restart the emulator and Wipe Data in AVD Manager.
So my question is: how can I debug this further?
I can also provide versions of all the components, if needed (like gradle 8.5, or JDK17, or whatever is needed)
(1)
(2)
(3)