I am unable to launch a Flutter (Chrome) web app on a public WiFi (train, plane, library, coffee shop, etc).
Can you flutter run
on a public WiFi?
try to open with the IP address of the wifi on laptop
ex: http://123.456.78.90:(port number given by Flutter)
or use ngrok and access like above
As of
Flutter 3.7.8 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 90c64ed42b (6 days ago) • 2023-03-21 11:27:08 -0500
Engine • revision 9aa7816315
Tools • Dart 2.19.5 • DevTools 2.20.1
this ceased to be an issue. I can flutter run
on a public WiFi.
Now at
[✓] Flutter (Channel stable, 3.7.10,
on macOS 11.7.4 20G1120 darwin-x64, locale en-CA)
it's again a problem, with the error
SocketException: Failed host lookup: 'localhost'
(OS Error: nodename nor servname provided,
or not known, errno = 8)
hence the question is once again open.
The following may work for you
flutter run -d chrome --web-port=8080 --web-hostname=101.112.123.1349
where the four numbers are your IP.
Try to use your IP's machine, if you don't know, you can try opening a cmd terminal in windows and type ipconfig
and get your local IP. Or terminal in linux/mac type ifconfig
and find your local IP