Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Expo network response Timed Out, Can't run Expo app on android emulator

I'm trying to run My react-native application, I'm running it on android emulator and my phone HUAWEI Y3II and same thing happens. I was working on it fine a few days ago but suddenly this error keeps coming up:
Could not load exp://*myip*:19000 network response timed out

enter image description here

enter image description here And the terminal Log shows:

Fetching the user profile failed
connect ETIMEDOUT 104.197.216.164:443
aTrying to open the project on Android...
Opening on Android device

I tried setting the environment variable REACT_NATIVE_PACKAGER_HOSTNAME to my ip address, I tried turning off the firewall, I ensured that the ports are allowed in the firewall, I tried changing my network from public to private. Here is my package.json file:

{
    "main": "node_modules/expo/AppEntry.js",
    "scripts": {
        "start": "expo start",
        "android": "expo start --android",
        "ios": "expo start --ios",
        "web": "expo start --web",
        "eject": "expo eject"
    },
    "dependencies": {
        "expo": "^35.0.0",
        "react": "16.8.3",
        "react-dom": "16.8.3",
        "react-native": "file:../../../../Users/RiggedToBlow/Downloads/Compressed/react-native-sdk-35.0.0.tar.gz",
        "react-native-gesture-handler": "~1.3.0",
        "react-native-reanimated": "~1.2.0",
        "react-native-web": "^0.11.7",
        "react-navigation": "^4.0.10",
        "react-navigation-stack": "^1.9.4"
    },
    "devDependencies": {
        "babel-preset-expo": "^7.0.0"
    },
    "private": true
}

I really need to work on this please help

like image 542
Muhannad Avatar asked Oct 14 '19 18:10

Muhannad


People also ask

Why can't I run the Expo app on my phone?

make sure that your mobile and computer is connected to the same WIFI network if your computer is connected to your mobile hotspot then try running the app using expo start --tunnel command if it still doesn't solve the issue then change your WIFI to private and turn off the firewall for private network.

Why can’t I connect to the Expo CLI?

If you are on ubuntu check your firewall status and make sure to either allow the expo port or disable the firewall (it is disabled by default). Sorry, something went wrong. Load more… The "Network response timed out" error means your phone can not connect to the Expo CLI running on your computer. Here are some things you can check:

What does network response timed out mean?

Please describe it in a more elaborative way in another ticket. Ok, will do. Sorry, something went wrong. The "Network response timed out" error means your phone can not connect to the Expo CLI running on your computer. Here are some things you can check: Is Expo CLI running?

How long does JSON response take on Android emulator?

When I go to "192.168.43.188:19000" in my browser (on android studio emulator and my real device), I can see the JSON response (it takes about 25 seconds). Also I can see 192.168.43.188:19002 as well. I turned off any firewalls too.


3 Answers

Just go to wifi setting Click on your WIFI name And enable Make this pc discoverable Good luck

like image 118
Sadegh Rahimi Avatar answered Oct 08 '22 12:10

Sadegh Rahimi


  1. make sure that your mobile and computer is connected to the same WIFI network

  2. if your computer is connected to your mobile hotspot then try running the app usingexpo start --tunnel command if it still doesn't solve the issue then

  3. change your WIFI to private and turn off the firewall for private network.

like image 40
Wasiq Ahmadzai Avatar answered Oct 08 '22 12:10

Wasiq Ahmadzai


Alternatively you need to change your WiFi settings from public to private especially if you have the firewall settings turned on in Windows 10. This worked perfectly for me.

like image 2
Nelson M Avatar answered Oct 08 '22 10:10

Nelson M