pretzel icon indicating copy to clipboard operation
pretzel copied to clipboard

Uninstall Hangs

Open WalkerCodeRanger opened this issue 10 years ago • 5 comments

I installed version 0.2.0.42 from Chocolatey. I want to use a build off master instead (important bug fixes there that aren't in any build, you really need a new build). Running choco uninstall pretzel in admin console prints:

Chocolatey v0.9.9.5
Uninstalling the following packages:
pretzel

pretzel v0.2.0.42
The package pretzel wants to run 'chocolateyUninstall.ps1'.
Note: If you don't run this script, the installation will fail.
Do you want to run the script?
 1) yes
 2) no
 3) print

I select 1 and it hangs.

WalkerCodeRanger avatar May 05 '15 12:05 WalkerCodeRanger

Thanks for the feedbak. Normally this is fixed with the current master branch, can you try it? You can find the latest binaries on AppVeyor and here is a guide on how to test Chocolatey packages.

The issue was coming from the Remove-Item $pretzelPath line of the uninstall script, a --recurse parameter was missing.

laedit avatar May 06 '15 06:05 laedit

I downloaded pretzel.0.2.1.169.nupkg from AppVeyor since I have it building on my machine, but the build.cmd file doesn't seem to produce a properly versioned nuget package. Then from an administrator cmd window I ran

choco install pretzel -fdv -s "%cd%"

from the directory with the nupkg file I downloaded (I tried specifying the whole package file name, but that failed fast). The install failed. Here is a copy of the relevant section of C:\ProgramData\chocolatey\logs\chocolatey.log

2015-05-06 07:03:10,716 [INFO ] - ============================================================
2015-05-06 07:03:10,856 [INFO ] - Chocolatey v0.9.9.5
2015-05-06 07:03:10,903 [DEBUG] - Chocolatey is running on Windows v 6.1.7601.65536
2015-05-06 07:03:10,934 [DEBUG] - Attempting to delete file "C:/ProgramData/chocolatey/choco.exe.old".
2015-05-06 07:03:10,950 [DEBUG] - Attempting to delete file "C:\ProgramData\chocolatey\choco.exe.old".
2015-05-06 07:03:10,997 [DEBUG] - Command line: "C:\ProgramData\chocolatey\choco.exe" install pretzel -fdv -s "C:\data\projects-outside\pretzel\appveyor"
2015-05-06 07:03:11,012 [DEBUG] - Received arguments: install pretzel -fdv -s C:\data\projects-outside\pretzel\appveyor
2015-05-06 07:03:11,200 [DEBUG] - 
NOTE: Hiding sensitive configuration data! Please double and triple 
 check to be sure no sensitive data is shown, especially if copying 
 output to a gist for review.
2015-05-06 07:03:11,262 [DEBUG] - Configuration: CommandName='install'|
CacheLocation='C:\Users\jwalker\AppData\Local\Temp'|
ContainsLegacyPackageInstalls='True'|
CommandExecutionTimeoutSeconds='2700'|
Sources='C:\data\projects-outside\pretzel\appveyor'|Debug='True'|
Verbose='True'|Force='True'|Noop='False'|HelpRequested='False'|
RegularOutput='True'|PromptForConfirmation='True'|
AcceptLicense='False'|
AllowUnofficialBuild='False'|Input='pretzel'|AllVersions='False'|
SkipPackageInstallProvider='False'|PackageNames='pretzel'|
Prerelease='False'|ForceX86='False'|OverrideArguments='False'|
NotSilent='False'|IgnoreDependencies='False'|
AllowMultipleVersions='False'|ForceDependencies='False'|
Information.PlatformType='Windows'|
Information.PlatformVersion='6.1.7601.65536'|
Information.PlatformName='Windows 7'|
Information.ChocolateyVersion='0.9.9.5'|
Information.ChocolateyProductVersion='0.9.9.5'|
Information.FullName='choco, Version=0.9.9.5, Culture=neutral, PublicKeyToken=79d02ea9cad655eb'|

Information.Is64Bit='True'|Information.IsInteractive='True'|
Information.IsUserAdministrator='True'|
Information.IsProcessElevated='True'|Features.AutoUninstaller='False'|
Features.CheckSumFiles='True'|ListCommand.LocalOnly='False'|
ListCommand.IncludeRegistryPrograms='False'|
UpgradeCommand.FailOnUnfound='False'|
NewCommand.AutomaticPackage='False'|SourceCommand.Command='unknown'|
FeatureCommand.Command='unknown'|PushCommand.TimeoutInSeconds='0'|
PinCommand.Command='unknown'|
2015-05-06 07:03:11,324 [DEBUG] - _ Chocolatey:ChocolateyInstallCommand - Normal Run Mode _
2015-05-06 07:03:11,371 [INFO ] - Installing the following packages:
2015-05-06 07:03:11,387 [INFO ] - pretzel
2015-05-06 07:03:11,402 [INFO ] - By installing you accept licenses for the packages.
2015-05-06 07:03:12,323 [INFO ] - Installing 'pretzel 0.2.1.169'.
2015-05-06 07:03:12,370 [DEBUG] - Added file 'chocolateyInstall.ps1' to folder 'pretzel\tools'.
2015-05-06 07:03:12,401 [DEBUG] - Added file 'chocolateyUninstall.ps1' to folder 'pretzel\tools'.
2015-05-06 07:03:12,432 [DEBUG] - Added file 'pretzel.nupkg' to folder 'pretzel'.
2015-05-06 07:03:12,448 [INFO ] - Successfully installed 'pretzel 0.2.1.169'.
2015-05-06 07:03:12,463 [INFO ] - 
pretzel v0.2.1.169 (forced)
2015-05-06 07:03:12,682 [DEBUG] - Contents of 'C:\ProgramData\chocolatey\lib\pretzel\tools\chocolateyInstall.ps1':
2015-05-06 07:03:12,697 [DEBUG] - $packageName = 'Pretzel'
$url = 'https://github.com/Code52/Pretzel/releases/download/0.2.1.169/Pretzel.0.2.1.169.zip'

$binRoot = Get-BinRoot
$pretzelPath = "$binRoot\$packageName"

Install-ChocolateyZipPackage "$packageName" "$url" $pretzelPath
Install-ChocolateyPath $pretzelPath

2015-05-06 07:03:12,728 [INFO ] - The package pretzel wants to run 'chocolateyInstall.ps1'.
2015-05-06 07:03:12,744 [INFO ] - Note: If you don't run this script, the installation will fail.
2015-05-06 07:03:12,822 [INFO ] - Do you want to run the script?
2015-05-06 07:03:12,838 [INFO ] -  1) yes
2015-05-06 07:03:12,853 [INFO ] -  2) no
2015-05-06 07:03:12,869 [INFO ] -  3) print
2015-05-06 07:03:15,224 [DEBUG] - Calling command ['"C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -NoLogo -ExecutionPolicy Bypass -Command "[System.Threading.Thread]::CurrentThread.CurrentCulture = '';[System.Threading.Thread]::CurrentThread.CurrentUICulture = ''; & import-module -name 'C:\ProgramData\chocolatey\helpers\chocolateyInstaller.psm1'; & 'C:\ProgramData\chocolatey\helpers\chocolateyScriptRunner.ps1' -packageScript 'C:\ProgramData\chocolatey\lib\pretzel\tools\chocolateyInstall.ps1' -installArguments '' -packageParameters ''"']
2015-05-06 07:03:16,410 [DEBUG] -  DEBUG: Posh version is 2.0
2015-05-06 07:03:16,738 [DEBUG] -  DEBUG: Loading community extensions
2015-05-06 07:03:16,784 [INFO ] -  VERBOSE: Exporting function 'Get-BinRoot'.
2015-05-06 07:03:16,800 [INFO ] -  VERBOSE: Exporting function 'Get-ChecksumValid'.
2015-05-06 07:03:16,816 [INFO ] -  VERBOSE: Exporting function 'Get-ChocolateyUnzip'.
2015-05-06 07:03:16,847 [INFO ] -  VERBOSE: Exporting function 'Get-ChocolateyWebFile'.
2015-05-06 07:03:16,862 [INFO ] -  VERBOSE: Exporting function 'Get-EnvironmentVariable'.
2015-05-06 07:03:16,878 [INFO ] -  VERBOSE: Exporting function 'Get-EnvironmentVariableNames'.
2015-05-06 07:03:16,909 [INFO ] -  VERBOSE: Exporting function 'Get-FtpFile'.
2015-05-06 07:03:16,925 [INFO ] -  VERBOSE: Exporting function 'Get-ProcessorBits'.
2015-05-06 07:03:16,940 [INFO ] -  VERBOSE: Exporting function 'Get-UACEnabled'.
2015-05-06 07:03:16,956 [INFO ] -  VERBOSE: Exporting function 'Get-VirusCheckValid'.
2015-05-06 07:03:16,987 [INFO ] -  VERBOSE: Exporting function 'Get-WebFile'.
2015-05-06 07:03:17,003 [INFO ] -  VERBOSE: Exporting function 'Get-WebHeaders'.
2015-05-06 07:03:17,018 [INFO ] -  VERBOSE: Exporting function 'Install-BinFile'.
2015-05-06 07:03:17,034 [INFO ] -  VERBOSE: Exporting function 'Install-ChocolateyDesktopLink'.
2015-05-06 07:03:17,065 [INFO ] -  VERBOSE: Exporting function 'Install-ChocolateyEnvironmentVariable'.
2015-05-06 07:03:17,081 [INFO ] -  VERBOSE: Exporting function 'Install-ChocolateyExplorerMenuItem'.
2015-05-06 07:03:17,096 [INFO ] -  VERBOSE: Exporting function 'Install-ChocolateyFileAssociation'.
2015-05-06 07:03:17,128 [INFO ] -  VERBOSE: Exporting function 'Install-ChocolateyInstallPackage'.
2015-05-06 07:03:17,143 [INFO ] -  VERBOSE: Exporting function 'Install-ChocolateyPackage'.
2015-05-06 07:03:17,159 [INFO ] -  VERBOSE: Exporting function 'Install-ChocolateyPath'.
2015-05-06 07:03:17,190 [INFO ] -  VERBOSE: Exporting function 'Install-ChocolateyPinnedTaskBarItem'.
2015-05-06 07:03:17,206 [INFO ] -  VERBOSE: Exporting function 'Install-ChocolateyPowershellCommand'.
2015-05-06 07:03:17,221 [INFO ] -  VERBOSE: Exporting function 'Install-ChocolateyShortcut'.
2015-05-06 07:03:17,237 [INFO ] -  VERBOSE: Exporting function 'Install-ChocolateyVsixPackage'.
2015-05-06 07:03:17,252 [INFO ] -  VERBOSE: Exporting function 'Install-Vsix'.
2015-05-06 07:03:17,268 [INFO ] -  VERBOSE: Exporting function 'Install-ChocolateyZipPackage'.
2015-05-06 07:03:17,299 [INFO ] -  VERBOSE: Exporting function 'Set-EnvironmentVariable'.
2015-05-06 07:03:17,315 [INFO ] -  VERBOSE: Exporting function 'Start-ChocolateyProcessAsAdmin'.
2015-05-06 07:03:17,315 [INFO ] -  VERBOSE: Exporting function 'Test-ProcessAdminRights'.
2015-05-06 07:03:17,330 [INFO ] -  VERBOSE: Exporting function 'Uninstall-BinFile'.
2015-05-06 07:03:17,346 [INFO ] -  VERBOSE: Exporting function 'Uninstall-ChocolateyPackage'.
2015-05-06 07:03:17,362 [INFO ] -  VERBOSE: Exporting function 'UnInstall-ChocolateyZipPackage'.
2015-05-06 07:03:17,377 [INFO ] -  VERBOSE: Exporting function 'Update-SessionEnvironment'.
2015-05-06 07:03:17,393 [INFO ] -  VERBOSE: Exporting function 'Write-ChocolateyFailure'.
2015-05-06 07:03:17,408 [INFO ] -  VERBOSE: Exporting function 'Write-ChocolateySuccess'.
2015-05-06 07:03:17,424 [INFO ] -  VERBOSE: Exporting function 'Write-FileUpdateLog'.
2015-05-06 07:03:17,440 [INFO ] -  VERBOSE: Exporting alias 'Generate-BinFile'.
2015-05-06 07:03:17,455 [INFO ] -  VERBOSE: Exporting alias 'Add-BinFile'.
2015-05-06 07:03:17,471 [INFO ] -  VERBOSE: Exporting alias 'Remove-BinFile'.
2015-05-06 07:03:17,486 [DEBUG] -  DEBUG: Running 'Get-BinRoot'
2015-05-06 07:03:17,502 [INFO ] -  Get-BinRoot is going to be deprecated by v1. Many packages no longer require it since the folders no longer have versions on them.
2015-05-06 07:03:17,518 [DEBUG] -  DEBUG: Running 'Install-ChocolateyZipPackage' for Pretzel with 
2015-05-06 07:03:17,533 [INFO ] -  url:'https://github.com/Code52/Pretzel/releases/download/0.2.1.169/Pretzel.0.2.
2015-05-06 07:03:17,549 [INFO ] -  1.169.zip', unzipLocation: 'C:\tools\Pretzel', url64bit: 
2015-05-06 07:03:17,564 [INFO ] -  'https://github.com/Code52/Pretzel/releases/download/0.2.1.169/Pretzel.0.2.1.16
2015-05-06 07:03:17,580 [INFO ] -  9.zip', specificFolder: '', checksum: '', checksumType: '', checksum64: '', 
2015-05-06 07:03:17,596 [INFO ] -  checksumType64: '' 
2015-05-06 07:03:17,611 [DEBUG] -  DEBUG: Running 'Get-ChocolateyWebFile' for Pretzel with 
2015-05-06 07:03:17,627 [INFO ] -  url:'https://github.com/Code52/Pretzel/releases/download/0.2.1.169/Pretzel.0.2.
2015-05-06 07:03:17,642 [INFO ] -  1.169.zip', 
2015-05-06 07:03:17,658 [INFO ] -  fileFullPath:'C:\Users\jwalker\AppData\Local\Temp\chocolatey\Pretzel\PretzelIns
2015-05-06 07:03:17,674 [INFO ] -  tall.zip', 
2015-05-06 07:03:17,689 [INFO ] -  url64bit:'https://github.com/Code52/Pretzel/releases/download/0.2.1.169/Pretzel
2015-05-06 07:03:17,705 [INFO ] -  .0.2.1.169.zip', checksum: '', checksumType: '', checksum64: '', 
2015-05-06 07:03:17,720 [INFO ] -  checksumType64: ''
2015-05-06 07:03:17,736 [DEBUG] -  DEBUG: Running 'Get-ProcessorBits'
2015-05-06 07:03:17,752 [DEBUG] -  DEBUG: CPU is 64 bit
2015-05-06 07:03:17,752 [DEBUG] -  DEBUG: Setting url to 
2015-05-06 07:03:17,767 [INFO ] -  'https://github.com/Code52/Pretzel/releases/download/0.2.1.169/Pretzel.0.2.1.16
2015-05-06 07:03:17,783 [INFO ] -  9.zip' and bitPackage to 64
2015-05-06 07:03:17,798 [DEBUG] -  DEBUG: Running 'Get-WebHeaders' with 
2015-05-06 07:03:17,814 [INFO ] -  url:'https://github.com/Code52/Pretzel/releases/download/0.2.1.169/Pretzel.0.2.
2015-05-06 07:03:17,830 [INFO ] -  1.169.zip', userAgent: 'chocolatey command line'
2015-05-06 07:03:19,499 [DEBUG] -  DEBUG: Setting the UserAgent to 'chocolatey command line'
2015-05-06 07:03:19,530 [DEBUG] -  DEBUG: Request Headers:
2015-05-06 07:03:19,546 [DEBUG] -  DEBUG:   'Accept':'*/*'
2015-05-06 07:03:19,561 [DEBUG] -  DEBUG:   'User-Agent':'chocolatey command line'
2015-05-06 07:03:21,123 [DEBUG] -  DEBUG: Converting Security Protocol to SSL3 only for Powershell v2
2015-05-06 07:03:21,139 [DEBUG] -  DEBUG: Running 'Get-WebHeaders' with 
2015-05-06 07:03:21,154 [INFO ] -  url:'https://github.com/Code52/Pretzel/releases/download/0.2.1.169/Pretzel.0.2.
2015-05-06 07:03:21,170 [INFO ] -  1.169.zip', userAgent: 'chocolatey command line'
2015-05-06 07:03:21,186 [DEBUG] -  DEBUG: Setting the UserAgent to 'chocolatey command line'
2015-05-06 07:03:21,201 [DEBUG] -  DEBUG: Request Headers:
2015-05-06 07:03:21,217 [DEBUG] -  DEBUG:   'Accept':'*/*'
2015-05-06 07:03:21,232 [DEBUG] -  DEBUG:   'User-Agent':'chocolatey command line'
2015-05-06 07:03:22,558 [ERROR] -  Exception calling "GetResponse" with "0" argument(s): "The underlying connectio
2015-05-06 07:03:22,590 [ERROR] -  n was closed: An unexpected error occurred on a send."
2015-05-06 07:03:22,605 [ERROR] -  At C:\ProgramData\chocolatey\helpers\functions\Get-WebHeaders.ps1:77 char:37
2015-05-06 07:03:22,621 [DEBUG] - Command ['"C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -NoLogo -ExecutionPolicy Bypass -Command "[System.Threading.Thread]::CurrentThread.CurrentCulture = '';[System.Threading.Thread]::CurrentThread.CurrentUICulture = ''; & import-module -name 'C:\ProgramData\chocolatey\helpers\chocolateyInstaller.psm1'; & 'C:\ProgramData\chocolatey\helpers\chocolateyScriptRunner.ps1' -packageScript 'C:\ProgramData\chocolatey\lib\pretzel\tools\chocolateyInstall.ps1' -installArguments '' -packageParameters ''"'] exited with '1'
2015-05-06 07:03:22,621 [ERROR] -  +     $response = $request.GetResponse <<<< ();
2015-05-06 07:03:22,652 [ERROR] -      + CategoryInfo          : NotSpecified: (:) [], ParentContainsErrorRecordE 
2015-05-06 07:03:22,668 [ERROR] -     xception
2015-05-06 07:03:22,683 [ERROR] -      + FullyQualifiedErrorId : DotNetMethodException
2015-05-06 07:03:22,777 [DEBUG] - Attempting to create directory "C:\ProgramData\chocolatey\.chocolatey\pretzel.0.2.1.169".
2015-05-06 07:03:22,808 [DEBUG] - Attempting to delete file "C:\ProgramData\chocolatey\.chocolatey\pretzel.0.2.1.169\.sxs".
2015-05-06 07:03:22,824 [DEBUG] - Attempting to delete file "C:\ProgramData\chocolatey\.chocolatey\pretzel.0.2.1.169\.pin".
2015-05-06 07:03:22,839 [ERROR] - The install of pretzel was NOT successful.
2015-05-06 07:03:22,870 [ERROR] - Error while running 'C:\ProgramData\chocolatey\lib\pretzel\tools\chocolateyInstall.ps1'.
 See log for details.
2015-05-06 07:03:22,902 [DEBUG] - Moving 'C:\ProgramData\chocolatey\lib\pretzel'
 to 'C:\ProgramData\chocolatey\lib-bad\pretzel'
2015-05-06 07:03:24,976 [WARN ] - 
Chocolatey installed 0/1 package(s). 1 package(s) failed.
 See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
2015-05-06 07:03:24,992 [ERROR] - Failures:
2015-05-06 07:03:25,008 [ERROR] -  - pretzel
2015-05-06 07:03:25,023 [DEBUG] - Exiting with 1

WalkerCodeRanger avatar May 06 '15 11:05 WalkerCodeRanger

My bad, the problem is that the zip file on GitHub is not available right now... You can either modify the install script in the nupkg or wait for the next version. I plan to release it in about a week normally.

About the build.cmd, I am fixing it right now.

laedit avatar May 06 '15 12:05 laedit

The new version is finally here, can you test it? You can use chocolatey directly but you have to explicitly use the 0.3.0 version since the package haven't been validated yet.

laedit avatar Dec 14 '15 07:12 laedit

Is it still the case?

laedit avatar Feb 08 '17 18:02 laedit