Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Reason of Flutter error: SocketException: Failed to create server socket (OS Error: Failed to start accept), address = localhost, port = xxxx

Tags:

flutter

When I Run flutter run -d chrome command (ref), get the Failed to start accept error:

SocketException: Failed to create server socket (OS Error: Failed to start accept), address = localhost, port = 6670

Additional info:

flutter channel => beta

How can I solve it?

like image 306
Ramin Bateni Avatar asked Mar 10 '20 21:03

Ramin Bateni


2 Answers

OK, this is also my issue and I manage to find a workaround

  1. on cmd run "ipconfig"

  2. after running the "ipconfig" get the value of IPv4 Address.

  3. then on the app run:

    flutter run -d chrome --web-port=8080 --web-hostname= *the value of IPv4 Address*
    
like image 95
David B. Avatar answered Oct 31 '22 14:10

David B.


Go to Network LAN Properties -> Deselect the IPv6 Connectivity -> Click Ok. Its Works for me.

like image 1
Punitharaj Avatar answered Oct 31 '22 14:10

Punitharaj