I’m developing a Flutter app with NodeJS API & trying to run it on a physical device; but it gives me the message of "Connectin timed out",
I’m using my IPV4
and I’ve tried to run it on an emulator with the ip 10.0.2.2
and it worked,
So anyone have a solution for that? I’ve been trying for a lot of time
Thanks for help!.
2
Answers
I haven't solve it the right way, but it works I used ngrok package that makes the app working on the global internent just with (node run)
I call it with https and not http
Your computer and physical device have to be connected to the same Network. To access the webpage from a Physical Device you need to use the IP address of your computer instead of
localhost
.ipconfig
on Windowsip addr
on Linuxifconfig
on macOSAttaching an example from Windows’s
ipconfig
Now, On your physical device you’ll be using (maybe IPv4, your choice) http://10.0.0.110:8000 and it’ll work if your physical device is on the same network.