Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

visualstudio-installer v2.0.2 ERROR #119

Closed
lucknaumann opened this issue Oct 10, 2021 · 4 comments
Closed

visualstudio-installer v2.0.2 ERROR #119

lucknaumann opened this issue Oct 10, 2021 · 4 comments

Comments

@lucknaumann
Copy link

lucknaumann commented Oct 10, 2021

I just got this odd error when attempting to upgrade through the upgrade all command:

visualstudio-installer v2.0.2 [Approved]
visualstudio-installer package files upgrade completed. Performing other installation steps.
ERROR: The string is missing the terminator: '.
The upgrade of visualstudio-installer was NOT successful.
Error while running 'C:\ProgramData\chocolatey\lib\visualstudio-installer\tools\ChocolateyInstall.ps1'.
 See log for details.

Here's the log entry:

2021-10-07 11:53:04,344 141116 [DEBUG] - Package 'visualstudio-installer' found on source 'https://chocolatey.org/api/v2/'
2021-10-07 11:53:04,345 141116 [WARN ] - 
You have visualstudio-installer v2.0.1 installed. Version 2.0.2 is available based on your source(s).
2021-10-07 11:53:04,408 141116 [DEBUG] - visualstudio-installer - Adding remembered arguments for upgrade:  --package-parameters="'--add Microsoft.VisualStudio.Workload.VCTools --includeRecommended'" --cache-location="'C:\Users\USER\AppData\Local\Temp\chocolatey'"
2021-10-07 11:53:04,500 141116 [DEBUG] - Backing up existing visualstudio-installer prior to operation.
2021-10-07 11:53:04,501 141116 [DEBUG] - Moving 'C:\ProgramData\chocolatey\lib\visualstudio-installer'
 to 'C:\ProgramData\chocolatey\lib-bkp\visualstudio-installer'
2021-10-07 11:53:06,535 141116 [DEBUG] - Attempting to create directory "C:\ProgramData\chocolatey\lib\visualstudio-installer".
2021-10-07 11:53:06,537 141116 [DEBUG] - Attempting to copy "C:\ProgramData\chocolatey\lib-bkp\visualstudio-installer\visualstudio-installer.nupkg"
 to "C:\ProgramData\chocolatey\lib\visualstudio-installer\visualstudio-installer.nupkg".
2021-10-07 11:53:06,571 141116 [DEBUG] - Attempting to copy "C:\ProgramData\chocolatey\lib-bkp\visualstudio-installer\visualstudio-installer.nuspec"
 to "C:\ProgramData\chocolatey\lib\visualstudio-installer\visualstudio-installer.nuspec".
2021-10-07 11:53:06,574 141116 [DEBUG] - Attempting to create directory "C:\ProgramData\chocolatey\lib\visualstudio-installer\tools".
2021-10-07 11:53:06,575 141116 [DEBUG] - Attempting to copy "C:\ProgramData\chocolatey\lib-bkp\visualstudio-installer\tools\ChocolateyInstall.ps1"
 to "C:\ProgramData\chocolatey\lib\visualstudio-installer\tools\ChocolateyInstall.ps1".
2021-10-07 11:53:06,579 141116 [DEBUG] - Attempting to copy "C:\ProgramData\chocolatey\lib-bkp\visualstudio-installer\tools\ChocolateyUninstall.ps1"
 to "C:\ProgramData\chocolatey\lib\visualstudio-installer\tools\ChocolateyUninstall.ps1".
2021-10-07 11:53:08,090 141116 [DEBUG] - Deleting file C:\ProgramData\chocolatey\lib\visualstudio-installer\tools\ChocolateyInstall.ps1
2021-10-07 11:53:08,090 141116 [DEBUG] - Attempting to delete file "C:\ProgramData\chocolatey\lib\visualstudio-installer\tools\ChocolateyInstall.ps1".
2021-10-07 11:53:08,092 141116 [DEBUG] - Deleting file C:\ProgramData\chocolatey\lib\visualstudio-installer\tools\ChocolateyUninstall.ps1
2021-10-07 11:53:08,092 141116 [DEBUG] - Attempting to delete file "C:\ProgramData\chocolatey\lib\visualstudio-installer\tools\ChocolateyUninstall.ps1".
2021-10-07 11:53:08,093 141116 [DEBUG] - Capturing package files in 'C:\ProgramData\chocolatey\lib\visualstudio-installer'
2021-10-07 11:53:08,094 141116 [DEBUG] -  Found 'C:\ProgramData\chocolatey\lib\visualstudio-installer\visualstudio-installer.nupkg'
  with checksum '9423A8A3F6E4DD4EE0E5777C2216A2B9'
2021-10-07 11:53:08,095 141116 [DEBUG] -  Found 'C:\ProgramData\chocolatey\lib\visualstudio-installer\visualstudio-installer.nuspec'
  with checksum 'FE66B3B6FA864D7C06AB18C9DCF8829D'
2021-10-07 11:53:11,036 141116 [INFO ] - [NuGet] Attempting to resolve dependency 'chocolatey-visualstudio.extension (= 1.10.0)'.
2021-10-07 11:53:11,631 141116 [INFO ] - [NuGet] Uninstalling 'visualstudio-installer 2.0.1'.
2021-10-07 11:53:11,633 141116 [DEBUG] - [NuGet] Removed folder 'C:\ProgramData\chocolatey\lib\visualstudio-installer\tools'.
2021-10-07 11:53:11,635 141116 [DEBUG] - [NuGet] Removed file 'visualstudio-installer.nuspec' to folder 'C:\ProgramData\chocolatey\lib\visualstudio-installer'.
2021-10-07 11:53:11,636 141116 [DEBUG] - [NuGet] Removed file 'visualstudio-installer.nupkg' to folder 'C:\ProgramData\chocolatey\lib\visualstudio-installer'.
2021-10-07 11:53:11,637 141116 [DEBUG] - [NuGet] Removed folder 'C:\ProgramData\chocolatey\lib\visualstudio-installer'.
2021-10-07 11:53:11,639 141116 [INFO ] - [NuGet] Successfully uninstalled 'visualstudio-installer 2.0.1'.
2021-10-07 11:53:11,748 141116 [INFO ] - [NuGet] Installing 'visualstudio-installer 2.0.2'.
2021-10-07 11:53:11,751 141116 [DEBUG] - [NuGet] Added file 'ChocolateyInstall.ps1' to folder 'visualstudio-installer\tools'.
2021-10-07 11:53:11,753 141116 [DEBUG] - [NuGet] Added file 'ChocolateyUninstall.ps1' to folder 'visualstudio-installer\tools'.
2021-10-07 11:53:11,755 141116 [DEBUG] - [NuGet] Added file 'visualstudio-installer.nupkg' to folder 'visualstudio-installer'.
2021-10-07 11:53:11,963 141116 [DEBUG] - [NuGet] Added file 'visualstudio-installer.nuspec' to folder 'visualstudio-installer'.
2021-10-07 11:53:11,963 141116 [INFO ] - [NuGet] Successfully installed 'visualstudio-installer 2.0.2'.
2021-10-07 11:53:11,964 141116 [INFO ] - 
visualstudio-installer v2.0.2 [Approved]
2021-10-07 11:53:11,971 141116 [INFO ] - visualstudio-installer package files upgrade completed. Performing other installation steps.
2021-10-07 11:53:12,138 141116 [DEBUG] - Setting installer args for visualstudio-installer
2021-10-07 11:53:12,138 141116 [DEBUG] - Setting package parameters for visualstudio-installer
2021-10-07 11:53:12,139 141116 [DEBUG] - Contents of 'C:\ProgramData\chocolatey\lib\visualstudio-installer\tools\ChocolateyInstall.ps1':
2021-10-07 11:53:12,140 141116 [DEBUG] - Write-Debug 'Empty script to avoid Chocolatey Package Verifier false positive warning (https://github.com/chocolatey/package-validator/issues/178).'

2021-10-07 11:53:12,141 141116 [DEBUG] - Calling built-in PowerShell host with ['[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\visualstudio-installer\tools\ChocolateyInstall.ps1' -installArguments 'ADD_CMAKE_TO_PATH=System' -packageParameters '\"'--add Microsoft.VisualStudio.Workload.VCTools'']
2021-10-07 11:53:12,155 141116 [DEBUG] - Redirecting Microsoft.WSMan.Management.resources, Version=3.0.0.0, Culture=en-US, PublicKeyToken=31bf3856ad364e35, requested by ''
2021-10-07 11:53:13,668 141116 [ERROR] - ERROR: The string is missing the terminator: '.
2021-10-07 11:53:13,678 141116 [DEBUG] - Built-in PowerShell host called with ['[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\visualstudio-installer\tools\ChocolateyInstall.ps1' -installArguments 'ADD_CMAKE_TO_PATH=System' -packageParameters '\"'--add Microsoft.VisualStudio.Workload.VCTools''] exited with '-1'.
2021-10-07 11:53:13,679 141116 [DEBUG] - Calling command ['"C:\WINDOWS\System32\shutdown.exe" /a']
2021-10-07 11:53:13,759 141116 [DEBUG] - Command ['"C:\WINDOWS\System32\shutdown.exe" /a'] exited with '1116'
2021-10-07 11:53:13,921 141116 [DEBUG] - Capturing package files in 'C:\ProgramData\chocolatey\lib\visualstudio-installer'
2021-10-07 11:53:13,923 141116 [DEBUG] -  Found 'C:\ProgramData\chocolatey\lib\visualstudio-installer\visualstudio-installer.nupkg'
  with checksum '851EFBF4C7C2AE91B91C4FDFD7FA0371'
2021-10-07 11:53:13,924 141116 [DEBUG] -  Found 'C:\ProgramData\chocolatey\lib\visualstudio-installer\visualstudio-installer.nuspec'
  with checksum 'E27BC0216CFD24351874DC25178231F8'
2021-10-07 11:53:13,925 141116 [DEBUG] -  Found 'C:\ProgramData\chocolatey\lib\visualstudio-installer\tools\ChocolateyInstall.ps1'
  with checksum '8E1D285E979D06AFE55C52D5CB404903'
2021-10-07 11:53:13,926 141116 [DEBUG] -  Found 'C:\ProgramData\chocolatey\lib\visualstudio-installer\tools\ChocolateyUninstall.ps1'
  with checksum 'F45CB9F2E9439412401DD939F7CCA8DE'
2021-10-07 11:53:13,927 141116 [DEBUG] - Attempting to create directory "C:\ProgramData\chocolatey\.chocolatey\visualstudio-installer.2.0.2".
2021-10-07 11:53:13,928 141116 [DEBUG] - There was no original file at 'C:\ProgramData\chocolatey\.chocolatey\visualstudio-installer.2.0.2\.files'
2021-10-07 11:53:13,929 141116 [DEBUG] - Attempting to delete file "C:\ProgramData\chocolatey\.chocolatey\visualstudio-installer.2.0.2\.arguments".
2021-10-07 11:53:13,929 141116 [DEBUG] - Attempting to delete file "C:\ProgramData\chocolatey\.chocolatey\visualstudio-installer.2.0.2\.extra".
2021-10-07 11:53:13,930 141116 [DEBUG] - Attempting to delete file "C:\ProgramData\chocolatey\.chocolatey\visualstudio-installer.2.0.2\.version".
2021-10-07 11:53:13,931 141116 [DEBUG] - Attempting to delete file "C:\ProgramData\chocolatey\.chocolatey\visualstudio-installer.2.0.2\.sxs".
2021-10-07 11:53:13,931 141116 [DEBUG] - Attempting to delete file "C:\ProgramData\chocolatey\.chocolatey\visualstudio-installer.2.0.2\.pin".
2021-10-07 11:53:13,933 141116 [DEBUG] - Sending message 'HandlePackageResultCompletedMessage' out if there are subscribers...
2021-10-07 11:53:13,934 141116 [ERROR] - The upgrade of visualstudio-installer was NOT successful.
2021-10-07 11:53:13,939 141116 [ERROR] - Error while running 'C:\ProgramData\chocolatey\lib\visualstudio-installer\tools\ChocolateyInstall.ps1'.
 See log for details.
2021-10-07 11:53:13,941 141116 [DEBUG] - Moving 'C:\ProgramData\chocolatey\lib\visualstudio-installer'
 to 'C:\ProgramData\chocolatey\lib-bad\visualstudio-installer'
2021-10-07 11:53:15,947 141116 [DEBUG] - Attempting rollback
2021-10-07 11:53:15,948 141116 [DEBUG] - Moving 'C:\ProgramData\chocolatey\lib-bkp\visualstudio-installer'
 to 'C:\ProgramData\chocolatey\lib\visualstudio-installer'
2021-10-07 11:53:18,042 141116 [DEBUG] - Attempting to delete file "C:\Users\USER\AppData\Local\NuGet\Cache\visualstudio-installer.2.0.2.nupkg".
@jberezanski
Copy link
Owner

This looks like an issue with Chocolatey, not with the package. It appears that choco.exe is quoting the package parameters incorrectly when it tries to invoke the installation script.
You should probably report it to https://github.com/chocolatey/choco.

@jberezanski
Copy link
Owner

One other thought: I can see you are using the "Use Remembered Options for Upgrade" and "Apply Package Parameters To Dependencies" choco features. These features, especially the second one, are not useful for Visual Studio packages and will most certainly cause problems (even if choco quoted the parameters correctly).

@jberezanski
Copy link
Owner

Oh, I can see the problem in choco has already been reported: chocolatey/choco#2410

Also, related issue here: #118

@lucknaumann
Copy link
Author

Thanks for your response and the info.

I don't see "Apply Package Parameters To Dependencies" when running the choco feature list command. I have enabled the "Use Remembered Options for Upgrade" feature since I need it for other packages.

I upvoted and subscribed to the 2410 issue. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants