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

Viewed 5841

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?

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

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

Related