choco install -y command seems to hang and requires user to interact with shell in powershell

Created on 9 Jan 2018  路  22Comments  路  Source: chocolatey/choco

What You Are Seeing?

During the installation of some packages with following command:

choco install -y packagename anotherpackagename

The process seems to wait for user input or maybe window focus? I am running on a fresh Windows 10 installation and had this behaviour quite a few times lately. The installation seems to sit there and wait for something to happen and it unfreezes only when I press enter on the shell. There is no prompt written.

image

What is Expected?

The installation should continue until the end of execution without having the user to input anything.

How Did You Get This To Happen? (Steps to Reproduce)

Install windows 10, install chocolatey with powershell, close powershell, open again (as administrator) and run the following command:

choco install -y pip python python2 adobereader android-sdk androidstudio baretail chocolateygui cmake cmder curl compass conemu cpu-z speccy directx dotnet4.0 dotnet4.5 fiddler4 flashplayeractivex flashplayerplugin gitextensions github gitkraken imagemagick javaruntime kdiff3 logparser meld mysqlworkbench nmap nodejs.install nugetpackageexplorer procmon ruby sourcetree sqlitebrowser sublimetext3 vcredist2008 vcredist2010 vcredist2013 vim windirstat winmerge yeoman

Output Log

It's not very helpful to paste the whole output for this above command, but I had it stop before these two lines when it was installing flashplayerplugin:

Download of install_flash_player_28_plugin.msi (20.91 MB) completed.
Hashes match.

It continued after focusing on the window and pressing enter. Maybe I'm not patient and I did not wait for hours, but it really seem to lock and wait for a user input sometimes.

Version informations

PS C:\Windows\system32> [System.Environment]::OSVersion.Version

Major  Minor  Build  Revision
-----  -----  -----  --------
10     0      16299  0
PS C:\Windows\system32> choco --version
0.10.8

:v:

Documentation

Most helpful comment

@verzada this sounds like its due to the following: https://serverfault.com/questions/204150/sometimes-powershell-stops-sending-output-until-i-press-enter-why

Powershell pauses output completely if you click into it, for whatever reason. Was happenign to me to. Once I adjusted the settings mentioned in that post, it was fine.

All 22 comments

Please submit the detailed log of this from chocolatey.log (it will start at about ======== and you will see the command you run. Copy from there to the next ===== and submit that).

That will help us out.

I will post a log here next time I work on a windows system, but I had this problem a few times in the past too and on different systems for different packages.

I take it you already destroyed the system where you saw this then? The log file would still be there otherwise.

ah indeed this time it wasn鈥檛 on a vm, it鈥檚 at the office, I鈥檒l post the log tomorrow morning. :)

@GabLeRoux if you have that log file, that would be most helpful.

Same issue on my machine. Windows 10, PowerShell. My log is pasted below. It did not freeze for everything, it only froze at the following points:

Rather than enter, I pressed ctl+c to get it moving along.

my log

Those two points are where it takes forever to do something. If you lift the console up for any reason or click on it, the console stops logging until you hit enter (or possibly Ctrl+C). This is a "feature" of the console window.

It's not actually frozen in that choco is waiting, it's that the console isn't outputting the log until you do something.

Experienced the same thing just now on my vm. The powershell console continued after i pressed 'enter', the logging to programdata was also paused till I pressed a key.

@verzada this sounds like its due to the following: https://serverfault.com/questions/204150/sometimes-powershell-stops-sending-output-until-i-press-enter-why

Powershell pauses output completely if you click into it, for whatever reason. Was happenign to me to. Once I adjusted the settings mentioned in that post, it was fine.

@ndom91 output meaning also log output? That just sounds weird.

i am experiencing this when running:

choco install vcbuildtools

as suggested in this post about:

MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe"

on Windows 10, it seems to have been 'frozen' for about 15 mins at:

PS C:\WINDOWS\system32> choco install vcbuildtools
Chocolatey v0.10.11
[Pending] Removing incomplete install for 'tmpDDC8.tmp'
Installing the following packages:
vcbuildtools
By installing you accept licenses for the packages.
Progress: Downloading DotNet4.5.1 4.5.1.20140606... 100%
Progress: Downloading vcbuildtools 2015.4... 100%

DotNet4.5.1 v4.5.1.20140606 [Approved]
dotnet4.5.1 package files install completed. Performing other installation steps.
The package DotNet4.5.1 wants to run 'ChocolateyInstall.ps1'.
Note: If you don't run this script, the installation will fail.
Note: To confirm automatically next time, use '-y' or consider:
choco feature enable -n allowGlobalConfirmation
Do you want to run the script?([Y]es/[N]o/[P]rint): Y

Microsoft .Net 4.5.1 Framework is already installed on your machine.
 The install of dotnet4.5.1 was successful.
  Software install location not explicitly set, could be in package or
  default install location if installer.

vcbuildtools v2015.4 [Approved]
vcbuildtools package files install completed. Performing other installation steps.
The package vcbuildtools wants to run 'chocolateyinstall.ps1'.
Note: If you don't run this script, the installation will fail.
Note: To confirm automatically next time, use '-y' or consider:
choco feature enable -n allowGlobalConfirmation
Do you want to run the script?([Y]es/[N]o/[P]rint): Y

Downloading vcbuildtools
  from 'https://go.microsoft.com/fwlink/?LinkId=691126'
Progress: 100% - Completed download of C:\Users\Me\AppData\Local\Temp\chocolatey\vcbuildtools\2015.4\visualcppbuildtools_full.exe (3.14 MB).
Download of visualcppbuildtools_full.exe (3.14 MB) completed.
Hashes match.
Installing vcbuildtools...

I have tried pressing Enter as suggested in the comments above, but that doesn't have an effect.

EDIT

I kept waiting, and installation finished after another 5 mins or so.

I also got this when using Windows Powershell ISE rather than the powershell command line.

cinst gittfs

It Paused forever at the hint it provides to run
choco feature enable -n allowGlobalConfirmation

No keyboard input, mouse click worked. I had to kill choco.exe.

Just had same problem with "choco install rust".

I can confirm the same on every windows system i use

Hi guys, I'm also getting this issue. I am trying to use chocolatey to install packages on a windows docker container.

I am using multiple choco commands by putting them in a powershell file but when the last package installs, it just hangs. Any ideas? :)

@ndom91 THANK YOU for linking me to this. my god what a stupid "feature". its been driving me nuts but i couldnt reproduce it consistently enough to report it.

choco maintainers im sorry for doubting you and nearly opening an issue about this.

@the-vampiire no worries.

@ndom91 This seems like something we should put into troubleshooting docs? I always was able to do this, but I never knew it was because I had those options checked.

@steviecoaster for awareness.

Yeah I'm definitely all for putting this into the docs. Seems like a general powershell gotcha that can (and apparantely does) happen to anyone.

I'm not very familiar with this project, where's the best place to put it?

Wiki - https://github.com/chocolatey/choco-wiki (Troubleshooting.md)

@ferventcoder okay great, made a PR: https://github.com/chocolatey/choco-wiki/pull/191

Was this page helpful?
0 / 5 - 0 ratings