winutil icon indicating copy to clipboard operation
winutil copied to clipboard

reinstall of Winget fails

Open TheBigBear opened this issue 1 year ago • 5 comments

Describe the bug

using Winget Reinstall under config -> fixes fails

Steps to reproduce

  1. Go to config fixes
  2. Click on WinGet Reinstall
  3. See the error.
Checking if Chocolatey is Installed...
===========================================
---      Chocolatey is installed        ---
===========================================
Version: v2.4.2
Chocolatey v2.4.2
3 validations performed. 2 success(es), 1 warning(s), and 0 error(s).

Validation Warnings:
 - A pending system reboot request has been detected, however, this is
   being ignored due to the current Chocolatey configuration.  If you
   want to halt when this occurs, then either set the global feature
   using:
     choco feature enable --name="exitOnRebootDetected"
   or pass the option --exit-when-reboot-detected.

Installing the following packages:
winget
By installing, you accept licenses for the packages.
Downloading package from source 'https://chocolatey.org/api/v2/'
Progress: Downloading microsoft-vclibs-140-00 14.0.33321... 100%

microsoft-vclibs-140-00 v14.0.33321 (forced)
microsoft-vclibs-140-00 package files install completed. Performing other installation steps.
ERROR: The type initializer for '<Module>' threw an exception.
The install of microsoft-vclibs-140-00 was NOT successful.
Error while running 'C:\ProgramData\chocolatey\lib\microsoft-vclibs-140-00\tools\chocolateyInstall.ps1'.
 See log for details.
Failed to install winget-cli because a previous dependency failed.
Failed to install winget because a previous dependency failed.

Chocolatey installed 0/3 packages. 3 packages failed.
 See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).

Failures
 - microsoft-vclibs-140-00 (exited -1) - Error while running 'C:\ProgramData\chocolatey\lib\microsoft-vclibs-140-00\tools\chocolateyInstall.ps1'.
 See log for details.
 - winget - Failed to install winget because a previous dependency failed.
 - winget-cli - Failed to install winget-cli because a previous dependency failed.

Expected behavior

expect it would simply re-install winget

Screenshots

Additional context

Issue validation

  • [ ] I checked for duplicate issues.
  • [ ] I checked for already existing discussions.
  • [ ] I checked for an already existing pull request addressing the issue.

TheBigBear avatar Feb 04 '25 10:02 TheBigBear

something is messing up with python3 install that causes winget to want to reinstall and then chocolatey fails at installing everything except pyenv.win (i had a lot of programs selected, something messes up with it, when i deselect python3 everything works fine, for reference ive used this tool since it was released with no issues at all on my system.

theverloxs avatar Feb 06 '25 06:02 theverloxs

Is this by any chance a fresh windows 10 install? If yes, open the Microsoft Store and let it initialize, then update the MS store apps, then run windows update and finally restart the PC.

Can't say I've run into this sort of issue on W11 yet but worth a shot if it's a fresh install

https://github.com/ChrisTitusTech/winutil/issues/3160#issuecomment-2594063739

NotYourAverageGamer avatar Feb 11 '25 01:02 NotYourAverageGamer

I believe I discovered the issue, it was that the microsoft store was not installed, right now I use windows ltsc 2021, ltsc versions come barebones without anything installed, the fix i did was just entering "WSReset -i&&TimeOut 20&&WSReset -i&&exit" into an elevated cmd and then microsoft store was installed normally.

theverloxs avatar Feb 17 '25 04:02 theverloxs

Is this by any chance a fresh windows 10 install? If yes, open the Microsoft Store and let it initialize, then update the MS store apps, then run windows update and finally restart the PC.

Can't say I've run into this sort of issue on W11 yet but worth a shot if it's a fresh install

#3160 (comment)

no, it is a win 11 pro 24H2 with there ms store installed, sorry should have said I only get this error on win 11 pro with 24h2

TheBigBear avatar Feb 17 '25 09:02 TheBigBear

I believe I discovered the issue, it was that the microsoft store was not installed, right now I use windows ltsc 2021, ltsc versions come barebones without anything installed, the fix i did was just entering "WSReset -i&&TimeOut 20&&WSReset -i&&exit" into an elevated cmd and then microsoft store was installed normally.

thanks for your comment, but I am on win 11 pro with 24H2 and the Microsoft Windows store is installed and in use.

TheBigBear avatar Feb 17 '25 09:02 TheBigBear

This issue was marked as stale due to inactivity.

github-actions[bot] avatar May 19 '25 00:05 github-actions[bot]

Winget is a bit annoying to install as microsoft manages to break the installation every few versions. To resolve this please do the following (if still applicable)

Download and install the newest (stable) version of winutil manually Winget CLI (you need the .msixbundle) and see if the issue still persists

/close

Marterich avatar May 22 '25 18:05 Marterich