skip to Main Content

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?

3

Answers


  1. Chosen as BEST ANSWER

    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.

    Update

    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.

    See also...

    Use your IP

    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.

    Other pointers


  2. 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

    Login or Signup to reply.
  3. 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

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search