Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Expo - Network Response Time Out Error (create-react-native-app) (Windows 10)

I have the exact same problem as here: Network Response Time Out Error (create-react-native-app) (expo). Every time I try to scan the QR code from my phone on LAN, I get the network response timeout error.

I've gone through every single response in both the linked stackoverflow post and the associated github thread: https://github.com/react-community/create-react-native-app/issues/144#issuecomment-296631692 to no avail.

Everything I've tried

  • set REACT_NATIVE_PACKAGER_HOSTNAME='my-custom-ip-address-or-hostname' with my static ip
  • disable all connections aside from my wifi (The only other connection I had to disable was "Local Area Connection 4", I didn't have virtualbox like others)
  • set my wifi connection to private
  • completely disable windows firewall
  • make exceptions to 19000, 19001, 19002 (entirely redundant given I disabled firewall, but I was desperate)
  • restart computer multiple times
  • use same network on phone as on computer
  • put the line, "android": "set REACT_NATIVE_PACKAGER_HOSTNAME={your wifi ip address} && react-native-scripts android" in my package.json

Note: A friend on the same network (also using a windows 10 laptop) got expo over LAN to work perfectly fine to his phone, so it's probably specific to my computer.

Note #2: Tunnel qr scanning works fine, but is painstakingly slow to reload so not realistic to use. Local brings me directly to "Something went wrong", no timeout error.

like image 208
Adam.V Avatar asked Oct 31 '18 00:10

Adam.V


1 Answers

I wasted my whole day searching for answer and finally i got solution accidentally. Just change connection from LAN to tunnel

Below is the image, enter image description here

like image 51
ashish pandey Avatar answered Sep 17 '22 15:09

ashish pandey