Choco: Error in PowerShell: String Length cannot be zero

Created on 7 Oct 2019  ยท  2Comments  ยท  Source: chocolatey/choco

What You Are Seeing?

I cannot use certain features such as install and upgrade due to a String Length problem. The error message states that the "string length cannot be zero parameter : variable" (The original error message is in Korean, this is a translated version).

What is Expected?

choco install { package name } is supposed to install a package.

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

Downloaded Chocolatey 0.10.15 via PowerShell Script in Admin Mode and immediately started choco install git.
Also tried every single installation from version 0.10.10, every single time this happens.

Output Log



Full Log Output

~~~sh 2019-10-07 17:07:32,136 32020 [INFO ] - Chocolatey v0.10.15 2019-10-07 17:07:32,150 32020 [DEBUG] - Chocolatey is running on Windows v 10.0.17763.0 2019-10-07 17:07:32,160 32020 [DEBUG] - Attempting to delete file "C:/ProgramData/chocolatey/choco.exe.old". 2019-10-07 17:07:32,162 32020 [DEBUG] - Attempting to delete file "C:\ProgramData\chocolatey\choco.exe.old". 2019-10-07 17:07:32,171 32020 [DEBUG] - Command line: "C:\ProgramData\chocolatey\choco.exe" install -dv git 2019-10-07 17:07:32,179 32020 [DEBUG] - Received arguments: install -dv git 2019-10-07 17:07:32,285 32020 [DEBUG] - RemovePendingPackagesTask is now ready and waiting for PreRunMessage. 2019-10-07 17:07:32,292 32020 [DEBUG] - Sending message 'PreRunMessage' out if there are subscribers... 2019-10-07 17:07:32,303 32020 [DEBUG] - [Pending] Removing all pending packages that should not be considered installed... 2019-10-07 17:07:32,355 32020 [WARN ] - [Pending] Removing incomplete install for 'git.install' 2019-10-07 17:07:32,489 32020 [DEBUG] - Performing validation checks. 2019-10-07 17:07:32,497 32020 [DEBUG] - Global Configuration Validation Checks: 2019-10-07 17:07:32,504 32020 [DEBUG] - - Package Exit Code / Exit On Reboot = Checked 2019-10-07 17:07:32,509 32020 [DEBUG] - System State Validation Checks: 2019-10-07 17:07:32,523 32020 [DEBUG] - Reboot Requirement Checks: 2019-10-07 17:07:32,530 32020 [DEBUG] - - Pending Computer Rename = Checked 2019-10-07 17:07:32,548 32020 [DEBUG] - - Pending Component Based Servicing = Checked 2019-10-07 17:07:32,556 32020 [DEBUG] - - Pending Windows Auto Update = Checked 2019-10-07 17:07:32,569 32020 [DEBUG] - - Pending File Rename Operations = Ignored 2019-10-07 17:07:32,586 32020 [DEBUG] - - Pending Windows Package Installer = Checked 2019-10-07 17:07:32,603 32020 [DEBUG] - - Pending Windows Package Installer SysWow64 = Checked 2019-10-07 17:07:32,620 32020 [INFO ] - 2 validations performed. 2 success(es), 0 warning(s), and 0 error(s). 2019-10-07 17:07:32,633 32020 [DEBUG] - The source 'https://chocolatey.org/api/v2/' evaluated to a 'normal' source type 2019-10-07 17:07:32,647 32020 [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. 2019-10-07 17:07:32,687 32020 [DEBUG] - Configuration: CommandName='install'| CacheLocation='C:\Users\thekp\AppData\Local\Temp\chocolatey'| ContainsLegacyPackageInstalls='True'| CommandExecutionTimeoutSeconds='2700'|WebRequestTimeoutSeconds='30'| Sources='https://chocolatey.org/api/v2/'|SourceType='normal'| Debug='True'|Verbose='True'|Trace='False'|Force='False'|Noop='False'| HelpRequested='False'|UnsuccessfulParsing='False'|RegularOutput='True'| QuietOutput='False'|PromptForConfirmation='True'|AcceptLicense='False'| AllowUnofficialBuild='False'|Input='git'|AllVersions='False'| SkipPackageInstallProvider='False'|PackageNames='git'| Prerelease='False'|ForceX86='False'|OverrideArguments='False'| NotSilent='False'|ApplyPackageParametersToDependencies='False'| ApplyInstallArgumentsToDependencies='False'|IgnoreDependencies='False'| AllowMultipleVersions='False'|AllowDowngrade='False'| ForceDependencies='False'|Information.PlatformType='Windows'| Information.PlatformVersion='10.0.17763.0'| Information.PlatformName='Windows 10'| Information.ChocolateyVersion='0.10.15.0'| Information.ChocolateyProductVersion='0.10.15'| Information.FullName='choco, Version=0.10.15.0, Culture=neutral, PublicKeyToken=79d02ea9cad655eb'| Information.Is64BitOperatingSystem='True'| Information.Is64BitProcess='True'|Information.IsInteractive='True'| Information.UserName='thekp'| Information.UserDomainName='DESKTOP-8H6K68F'| Information.IsUserAdministrator='True'| Information.IsUserSystemAccount='False'| Information.IsUserRemoteDesktop='False'| Information.IsUserRemote='True'| Information.IsProcessElevated='True'| Information.IsLicensedVersion='False'|Information.LicenseType='Foss'| Information.CurrentDirectory='C:\WINDOWS\system32'| Features.AutoUninstaller='True'|Features.ChecksumFiles='True'| Features.AllowEmptyChecksums='False'| Features.AllowEmptyChecksumsSecure='True'| Features.FailOnAutoUninstaller='False'| Features.FailOnStandardError='False'|Features.UsePowerShellHost='True'| Features.LogEnvironmentValues='False'|Features.LogWithoutColor='False'| Features.VirusCheck='False'| Features.FailOnInvalidOrMissingLicense='False'| Features.IgnoreInvalidOptionsSwitches='True'| Features.UsePackageExitCodes='True'| Features.UseEnhancedExitCodes='False'| Features.UseFipsCompliantChecksums='False'| Features.ShowNonElevatedWarnings='True'| Features.ShowDownloadProgress='True'| Features.StopOnFirstPackageFailure='False'| Features.UseRememberedArgumentsForUpgrades='False'| Features.IgnoreUnfoundPackagesOnUpgradeOutdated='False'| Features.SkipPackageUpgradesWhenNotInstalled='False'| Features.RemovePackageInformationOnUninstall='False'| Features.ExitOnRebootDetected='False'| Features.LogValidationResultsOnWarnings='True'| Features.UsePackageRepositoryOptimizations='True'| Features.ScriptsCheckLastExitCode='False'| ListCommand.LocalOnly='False'| ListCommand.IdOnly='False'|ListCommand.IncludeRegistryPrograms='False'| ListCommand.PageSize='25'|ListCommand.Exact='False'| ListCommand.ByIdOnly='False'|ListCommand.ByTagOnly='False'| ListCommand.IdStartsWith='False'|ListCommand.OrderByPopularity='False'| ListCommand.ApprovedOnly='False'| ListCommand.DownloadCacheAvailable='False'| ListCommand.NotBroken='False'| ListCommand.IncludeVersionOverrides='False'| UpgradeCommand.FailOnUnfound='False'| UpgradeCommand.FailOnNotInstalled='False'| UpgradeCommand.NotifyOnlyAvailableUpgrades='False'| UpgradeCommand.ExcludePrerelease='False'| NewCommand.AutomaticPackage='False'| NewCommand.UseOriginalTemplate='False'|SourceCommand.Command='unknown'| SourceCommand.Priority='0'|SourceCommand.BypassProxy='False'| SourceCommand.AllowSelfService='False'| SourceCommand.VisibleToAdminsOnly='False'| FeatureCommand.Command='unknown'|ConfigCommand.Command='unknown'| ApiKeyCommand.Remove='False'|PinCommand.Command='unknown'| OutdatedCommand.IgnorePinned='False'|Proxy.BypassOnLocal='True'| 2019-10-07 17:07:32,780 32020 [DEBUG] - _ Chocolatey:ChocolateyInstallCommand - Normal Run Mode _ 2019-10-07 17:07:32,790 32020 [INFO ] - Installing the following packages: 2019-10-07 17:07:32,829 32020 [INFO ] - git 2019-10-07 17:07:32,834 32020 [INFO ] - By installing you accept licenses for the packages. 2019-10-07 17:07:33,051 32020 [DEBUG] - Using 'https://chocolatey.org/api/v2/'. 2019-10-07 17:07:33,474 32020 [DEBUG] - - Supports prereleases? 'True'. 2019-10-07 17:07:33,484 32020 [DEBUG] - - Is ServiceBased? 'True'. 2019-10-07 17:07:33,885 32020 [DEBUG] - Package 'git' found on source 'https://chocolatey.org/api/v2/' 2019-10-07 17:07:33,980 32020 [INFO ] - [NuGet] Attempting to resolve dependency 'git.install (= 2.23.0)'. 2019-10-07 17:07:37,668 32020 [INFO ] - [NuGet] Attempting to resolve dependency 'chocolatey-core.extension (โ‰ฅ 1.3.3)'. 2019-10-07 17:07:37,744 32020 [INFO ] - [NuGet] Attempting to resolve dependency 'chocolatey (โ‰ฅ 0.10.7)'. 2019-10-07 17:07:39,790 32020 [INFO ] - [NuGet] Installing 'git.install 2.23.0'. 2019-10-07 17:07:39,830 32020 [DEBUG] - [NuGet] Added file 'LICENSE.txt' to folder 'git.install\legal'. 2019-10-07 17:07:39,842 32020 [DEBUG] - [NuGet] Added file 'VERIFICATION.txt' to folder 'git.install\legal'. 2019-10-07 17:07:39,854 32020 [DEBUG] - [NuGet] Added file 'chocolateyInstall.ps1' to folder 'git.install\tools'. 2019-10-07 17:07:40,260 32020 [DEBUG] - [NuGet] Added file 'Git-2.23.0-32-bit.exe' to folder 'git.install\tools'. 2019-10-07 17:07:40,669 32020 [DEBUG] - [NuGet] Added file 'Git-2.23.0-64-bit.exe' to folder 'git.install\tools'. 2019-10-07 17:07:40,682 32020 [DEBUG] - [NuGet] Added file 'helpers.ps1' to folder 'git.install\tools'. 2019-10-07 17:07:40,802 32020 [DEBUG] - [NuGet] Added file 'git.install.nupkg' to folder 'git.install'. 2019-10-07 17:07:41,158 32020 [DEBUG] - [NuGet] Added file 'git.install.nuspec' to folder 'git.install'. 2019-10-07 17:07:41,162 32020 [INFO ] - [NuGet] Successfully installed 'git.install 2.23.0'. 2019-10-07 17:07:41,166 32020 [INFO ] - git.install v2.23.0 [Approved] 2019-10-07 17:07:41,186 32020 [INFO ] - git.install package files install completed. Performing other installation steps. 2019-10-07 17:07:41,267 32020 [ERROR] - git not installed. An error occurred during installation: ๋ฌธ์ž์—ด์˜ ๊ธธ์ด๋Š” 0์ผ ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค. ๋งค๊ฐœ ๋ณ€์ˆ˜ ์ด๋ฆ„: variable 2019-10-07 17:07:41,272 32020 [INFO ] - git package files install completed. Performing other installation steps. 2019-10-07 17:07:41,274 32020 [DEBUG] - No package information as package is null. 2019-10-07 17:07:41,285 32020 [DEBUG] - No package information to save as package is null. 2019-10-07 17:07:41,297 32020 [DEBUG] - Sending message 'HandlePackageResultCompletedMessage' out if there are subscribers... 2019-10-07 17:07:41,302 32020 [ERROR] - The install of git was NOT successful. 2019-10-07 17:07:41,306 32020 [ERROR] - git not installed. An error occurred during installation: ๋ฌธ์ž์—ด์˜ ๊ธธ์ด๋Š” 0์ผ ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค. ๋งค๊ฐœ ๋ณ€์ˆ˜ ์ด๋ฆ„: variable 2019-10-07 17:07:41,319 32020 [WARN ] - Chocolatey installed 1/2 packages. 1 packages failed. See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log). 2019-10-07 17:07:41,338 32020 [INFO ] - 2019-10-07 17:07:41,357 32020 [ERROR] - Failures 2019-10-07 17:07:41,361 32020 [ERROR] - - git (exited 1) - git not installed. An error occurred during installation: ๋ฌธ์ž์—ด์˜ ๊ธธ์ด๋Š” 0์ผ ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค. ๋งค๊ฐœ ๋ณ€์ˆ˜ ์ด๋ฆ„: variable 2019-10-07 17:07:41,375 32020 [DEBUG] - Sending message 'PostRunMessage' out if there are subscribers... 2019-10-07 17:07:41,468 32020 [DEBUG] - Exiting with 1 ~~~

Invalid / Not Issue / No repro / Not Implementing

Most helpful comment

@thekpaul Thank you for filing this issue, I ran into the same trouble, also WinCUPL installed. Googling for this very quickly pointed me to this issue here! Uninstalling WinCUPL released PowerShell immediately from this confusing bug.

All 2 comments

After factory-resetting my computer I found out that this problem happened because of a seemingly conflicting application called WinCUPL, which is also known to mess with other environmental variables such as the $PATH variable. Since this does not seem to be related to the Chocolatey project itself, I will close this issue.

@thekpaul Thank you for filing this issue, I ran into the same trouble, also WinCUPL installed. Googling for this very quickly pointed me to this issue here! Uninstalling WinCUPL released PowerShell immediately from this confusing bug.

Was this page helpful?
0 / 5 - 0 ratings