Flutter App only runs when anti virus is disabled

Viewed 91
    admin@DS1 MINGW64 ~/Desktop/app
$ flutter run
Multiple devices found:
Windows (desktop) • windows • windows-x64    • Microsoft Windows [Version 10.0.22000.739]
Chrome (web)      • chrome  • web-javascript • Google Chrome 102.0.5005.115
Edge (web)        • edge    • web-javascript • Microsoft Edge 102.0.1245.44
[1]: Windows (windows)
[2]: Chrome (chrome)
[3]: Edge (edge)
Please choose one (To quit, press "q/Q"): 3
Launching lib\main.dart on Edge in debug mode...
Failed to bind web development server:
SocketException: Failed to create server socket (OS Error: An attempt was made to access a socket in a way forbidden by its access permissions.
, errno = 10013), address = localhost, port = 0
#0      _NativeSocket.bind (dart:io-patch/socket_patch.dart:996:7)
<asynchronous suspension>
#1      WebAssetServer.start (package:flutter_tools/src/isolated/devfs_web.dart:205:22)
<asynchronous suspension>
#2      WebDevFS.create (package:flutter_tools/src/isolated/devfs_web.dart:732:22)
<asynchronous suspension>
#3      ResidentWebRunner.run.<anonymous closure> (package:flutter_tools/src/isolated/resident_web_runner.dart:285:25)
<asynchronous suspension>
#4      asyncGuard.<anonymous closure> (package:flutter_tools/src/base/async_guard.dart:111:24)
<asynchronous suspension>

Failed to bind web development server:
SocketException: Failed to create server socket (OS Error: An attempt was made to access a socket in a way forbidden by its access permissions.
, errno = 10013), address = localhost, port = 0

I am already checked with defining the port and hostname as well but the problem is still and only runs the app while the antivirus is disabled.

1 Answers

I've figured out the problem and the problem is system firewall blocked the internet access for the following applications.

dart.exe and git-remote-https.exe

So, I've add the both exe files in system firewall and allow the internet access for them.

To resolve the issue find the below .exe files and add them to the firewall and also allow internet access to them.

Path of dart.exe: drive://flutter_dir/bin/cache/dart-sdk/bin/dart.exe

Path of git-remote-https.exe: C://Program Files/git/mingw64/libexec/git-core/git-remote-https.exe

Related