Does real device cannot use LAN?


#1

Hi, I use react-native-debugger to debug app, so I have to use LAN in Expo. I want to use animation in my app and debug, so I want to use a real device.

I can use Tunnel with simulator or real device, but LAN just works with simulator, real device always notices me “There was a problem loading the experience…Make sure your device is on the same network as the server or try using a tunnel”. I use app to check if my computer and my iPhone is on the same network, and it shows Yes. Then I have to use simulator, but cannot use any animation in app, since animation in simulator is too slow.

Do you have any suggestion about how to check my network and see where is the problem. Or just cannot use real device with LAN?

BTW, the error masseage is “Error while loading: The request timed out…” (code -1001)


#2

What do you get if you go to the experience URL directly from your phone’s browser (replacing exp:// with http://)


#3

(post withdrawn by author, will be automatically deleted in 24 hours unless flagged)


#4

Genymotion will get 192.168.62,1:19000 open in browser and show a json object. iPhone will try to connect 192.168.62.1:19000 in browser but no response.


#5

Sorry this slipped through the cracks!
Hopefully you’ve gotten around this already, but the phone and your development machine need to be on the same network for that request to come back with valid json and the experience to load. Your phone might have been using the cell network.


#6

I have used a Android device without SIM card connected same WiFi to test this, same problem. So it’s not caused by different network , I think.


#7

same here, while in airplane mode (with wifi on) on iOS i get “there was a problem loading the experience. it looks like you may using LAN url. make sure your device is on the same network as the server or try using a tunnel.”

the main reason i tried LAN is because the tunnel is too slow

any idea on how to fasten up testing on real device?

thanks


#8

yes. If you can ping to real Iphone (for my case) you can deploy app to that one to test.
I spend 2 painful days to run expo on iphone through Lan network.
The reason was that, I installed both Virtual Box Oracle (when i installed genymotion) and also want to test on real device.
The issue is we have to local ipaddress . on on Virtual Box and on our PC. So should choose only one option .
Emulator or real device.