Error while installing: "An existing connection was forcibly closed by the remote host."
Occasionally packages will be slow to download, progressing 1% every 5 seconds or so, and then once they hit 99% they will error with a An existing connection was forcibly closed by the remote host. error as shown below
Boxstarter/chocolatey is not a perfect system, and this issue has been ongoing since the beginning of Commando. We have worked with Chocolatey and MyGet to pin down this issue but we cannot find out why some packages download so slowly and then fail during install.
The Fix
The fix is to install packages manually from an administrative command prompt, as shown below:
cinst <packagename> -y
For the screenshot above, you could type cinst ilspy.flare -y in an administrative command or PowerShell prompt and the install will usually complete within seconds, further mystifying the slow speed during the automated install.
IMPORTANT These packages can be installed while the install is ongoing and it will not cause issues. This way, if a package fails and you spot it, you can manually install and on the next reboot, the script will realize that the package has been installed and will move on to the next package; which will speed up the overall install process. THIS WILL DRASTICALLY DECREASE OVERALL INSTALL TIME
As shown below, ilspy.flare was installed while an install was ongoing:
