12

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.

Adam.V
  • 779
  • 2
  • 9
  • 25
  • Could it be specific to your phone? E.g. Some Samsung phones have a "Secure wi-fi" app that blocks everything on a wi-fi unless you disable security for that specific wi-fi network. – Lars Hartviksen Feb 25 '20 at 11:39

2 Answers2

9

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

ashish pandey
  • 1,653
  • 1
  • 10
  • 15
0

my case is to turn off any antivirus like ( Avast )

keroles Monsef
  • 679
  • 7
  • 15