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

11

10

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

Madelle answered 14/10, 2019 at 18:43 Comment(3)
click on "View Error logs" of Errors screen in emulatorDitzel
This message Appears: Uncaught Error:java.net.SocketTimeOutException:timeoutMadelle
Try clicking the reload icon (the one to the right, not the house). This was all I needed to do. I wouldn't expect that it always works, though.Maryammaryann
P
17

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

Phyllome answered 31/1, 2020 at 14:52 Comment(2)
Great answer. Thanks. I wasted about 2 hours looking up another post on stackoverflow for the same problem where it said to set an environment variable in command window i.e. set REACT_NATIVE_PACKAGER_HOSTNAME=10.0.0.124 to the wifi IPV4 address obtained from ipconfig command, but it didn't work. This solution you recommended worked.Walkup
how to do in mac?Synod
A
6
  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.

Aday answered 23/11, 2020 at 19:28 Comment(1)
is there any solution that my friend can run an app on his device because we both have different connection at that time??Synod
C
2

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.

Carpathoukraine answered 25/3, 2020 at 21:27 Comment(1)
For me, changing the network profile to private was enough. This is good because you should avoid disabling the firewall.Pomade
A
2

Make your PC discoverable. Go to the wifi list on the bottom right in windows > click "properties" > toggle the "Network Profile" setting to "Private". Should solve it for you.

Algiers answered 7/12, 2020 at 1:44 Comment(0)
T
1

simply change your wifi settings to private and turn off the firewall too.

Tolmach answered 27/4, 2021 at 8:17 Comment(1)
I never had the issue and strangely now, but what you suggested really helped.Shela
C
0

right click on your wifi name >properties > make the network private then in network protection& firewall >> turn off firewall protection of private network

this worked fine with me

Carrasco answered 19/7, 2020 at 18:11 Comment(0)
S
0

Go to your windows firewall settings and set new inbound rule for port 19000.

Shela answered 12/9, 2022 at 22:40 Comment(0)
P
0

Expo may give you a QR code that your Android can't reach.

After you check the firewall port 19000, and check that Android is on the same WiFi network as your dev machine, check if the url is 192.168.10.xxx whereas your phone is on 192.168.1.xxx. Find the IP address of your dev machine on the 192.168.1 subnet (same subnet as the Android device). Use that instead.

Peraza answered 2/3, 2023 at 2:48 Comment(0)
C
0

I fixed this issue in my Ubuntu device by allowing 19000/tcp in my firewall

1- sudo ufw allow 19000/tcp

2- sudo ufw disable

3- sudo ufw enable

4- And then go to your project files and run npm start

That works well with me on Ubuntu,

Thanks.

Consultant answered 18/3, 2023 at 11:36 Comment(0)
M
0

enter image description here

something went wrong network response timed out means

1 Go to settings 2 network & internet 3 go to Wifi 4 change network profile to public to private

Mair answered 30/4 at 5:36 Comment(0)
T
-1

This solution worked for me. Set your WIFI to private and disable the firewall for a private network.

Talkie answered 4/11, 2022 at 10:7 Comment(1)
As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.Musketeer

© 2022 - 2024 — McMap. All rights reserved.