8

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?

3
  • 1
    after flutter upgrade, i am facing the same issue now. Commented Mar 18, 2020 at 16:06
  • i find a wordaround, just restart your pc. the issue maybe caused by chrome debug session process hang. Commented Mar 18, 2020 at 16:39
  • Im actually waiting for any update for this since its also my issue Commented Apr 29, 2020 at 13:02

5 Answers 5

9

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*
    
Sign up to request clarification or add additional context in comments.

1 Comment

Yes, that's what happened when I tried it. Thank you so much.
1

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

1 Comment

What do you mean about "Network LAN Properties"? Can you change in a more specific description?
1

Internet permission

The issue has to do with the app's "Capabilities". You need to allow "Outgoing Connections (Client)".

The .entitlements file should have this:

    <key>com.apple.security.network.client</key>
    <true/>

For AndroidManifest.xml it is:

<uses-permission android:name="android.permission.INTERNET"/>

Here's in Xcode: enter image description here

Comments

0

In my case, i just had installed the release app, which has different signature, I guess, so I just had to uninstall it from the emulator, then debug and everything worked out just fine.

Comments

0

Go to your PowerShell run as administer run following commond

1.net stop hns

2.net start hns

1 Comment

unclear what this is supposed to mean and how it is related

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.