android - React native expo - Reponse timed out -


i'm trying run app inside android emulator , on iphone using expo , create react native app.

i' ve ran following commands this.

create-react-native-app myfirstapp  npm run android 

after doing run command app runs in emulator following error:

something went wrong! not load *ip*. network response timed out.  uncaught error: java.net.sockettimeoutexception: connect timed out. 

the same thing happens when scan qr code on iphone , can't reach ip in web browser.

i've found following fixes on internet nothing seems work:

  • add port 19000 inbound rules in windows firewall
  • update java , npm
  • npm start instead of npm run android

edit:

i installed expo xde start server. works fine when use tunnel option extremely slow when reloading changes. still doesn't work localhost or lan. possible have use port forwarding open port on router?

also: when typ: localhost:19000 in google chrome json returned. doesn't work when i'm in expo!

fixed problem! found following solution:

go cmd , type ipconfig

get ip4 adress of virtual machine , copy it.

than go computer > properties > advanced system settings > environment variables , add following system variable: react_native_packager_hostname

as value variable had paste ip4 of virtual machine.


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -