-
-
Notifications
You must be signed in to change notification settings - Fork 460
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
MISSING PACKAGES #1721
Comments
Thank you for investigating! Unfortunately, to me that didn't help. In more detail: I was running WingetUI 2.1.1 as somewhere was written that one should revert to the older version (which did not help anyway). I deleted that abovementioned folder with being my non-admin user. This did not change anything. I then deleted the folder also for being my admin user. That also didn't change anything. I updated back to 2.2.0 but this did also not change anything. I also toggled the "use system winget" option to no avail. One thing I noticed, maybe unrelated, in the "Installed Packages" tab there is one single entry from Chocolatey having name and ID reading "Das" as in a German description starting with this German article. I use WingetUI with an English UI setting although my system is in German. Maybe a localization containing spaces messed things up? Just a guess. In my impression this whole thing is either a localization bug or a permission bug. |
Can you please share your WingetUI logs? |
|
Can you also share Package Manager logs? |
The logfile of 2.2.0. I again deleted the mentioned folders for both users.
This is empty: C:\Program Files\WingetUI\choco-cli\logs |
Sorry, stupid me. This however is short:
|
Now, please try:
|
Did that. Unfortunately no change.
Package manager logs:
|
Other machine, same problem, Win11.
Package manager log. I disabled all other managers.
|
Which device are you using? (OS Version, Processor, RAM, Etc.) |
Device1: Win10 22H2, Xeon W-2125 (Skylake), 32GB RAM |
Specs are definitely not an issue... What happens if you run the following commands on a cmd window?
|
1st line gives no output. Errorlevel is -1978335231. |
Try deleting |
Because this code means corrupt databases |
Interesting. I had deleted that folders already. However, I found additional similar folders:
Deleting the second one from the non-admin user seems to have fixed it now. I will keep investigating, but the first look is very promising. |
@marticliment the suggestion from @llvs fixed the issue for me (deleting C:\Users\AppData\Local\Temp\WinGet\defaultState) on latest version 2.2.0 🎉🎉🎉 |
Worked for me too |
Deleting the Temp defaultState fixed it for me too. I thought the fix in the OP didn't work and went off looking for other solutions before coming back here and finding these replies way down the thread. Might be worth adding this extra info to the OP. :) |
This is a different issue, please open a new support ticket |
Try deleting the files mentioned in the top again |
Finally 🎉 For the records:
|
If the admin user and the current user are the same should we avoid the first step? |
I think yes. |
On my side I get all installed packages now. |
Same. |
This could be used as a quick remedy, as temp file cleaning is still needed quite frequently. Save the following as Powershell script with extension .ps1 and double-click. Don't forget to change <current_user> and <admin_user> placeholders!
The script elevation is shamelessly copied verbatim from here @marticliment: The temp files issue may be diagnosed if the returned version string is empty. When everything works, a version is reported. Otherwise winget.exe exits with the discussed error code and does not return a version number. |
@llvs, I am no powershell genius. Do you think it would be possible to automate retrieving the <current_user> and <admin_user> with a for loop ran for every user? If so, I could add this part of the script to the "Reset Winget Sources" tool within WingetUI |
Unfortunately, I am not a powershell genius either. However, I am quite sure that you can obtain a list of users in Windows through some API function (I am also no WinAPI expert :-). |
It seems as if ChatGPT is a PowerShell Genius. $users = Get-ChildItem -Path 'C:\Users' -Directory
foreach ($user in $users) {
$path = "C:\Users\$($user.Name)\AppData\Local\Microsoft\WinGet\Settings\defaultState"
if (-not (Test-Path -Path $path)) {
continue
}
Remove-Item -Path $path -Recurse -Force
$path = "C:\Users\$($user.Name)\AppData\Local\Temp\WinGet\defaultState\"
Remove-Item -Path $path -Recurse -Force
}
I will add this part of code to the Reset Sources command |
But you will need elevation to clear the admin folders. I don't see that in the ChatGPT solution. |
The "reset winget sources" is already launched as administrator from WingetUI, so this won't be a problem |
WingetUI was updated few minutes ago, and again, I no longer have winget packages listed. |
Please share your logs |
Every time the computer is off, it can auto-update, and when I turn it on, the packages go missing, but after I reset sources, it will be normal. |
Here some logs: WingetUI Logs
|
This is a big problem for standard users (non-admin users) because every time WingetUI uses gsudo for winget it messes up the ownership of It is easily reproducible:
# "icacls C:\Users\winuser\AppData\Local\Microsoft\WinGet\ /T"
--- before gsudo
+++ after gsudo
@@ -13,8 +13,8 @@
-C:\Users\winuser\AppData\Local\Microsoft\WinGet\Settings\defaultState Computer\winuser:(F)
- Computer\winuser:(OI)(CI)(IO)(F)
+C:\Users\winuser\AppData\Local\Microsoft\WinGet\Settings\defaultState Computer\admin:(F)
+ Computer\admin:(OI)(CI)(IO)(F)
PREDEFINED\Administrators:(F)
PREDEFINED\Administrators:(OI)(CI)(IO)(F)
NT AUTHORITY\SYSTEM:(F)
@@ -24,8 +24,8 @@
-C:\Users\winuser\AppData\Local\Microsoft\WinGet\State\defaultState Computer\winuser:(F)
- Computer\winuser:(OI)(CI)(IO)(F)
+C:\Users\winuser\AppData\Local\Microsoft\WinGet\State\defaultState Computer\admin:(F)
+ Computer\admin:(OI)(CI)(IO)(F)
PREDEFINED\Administrators:(F)
PREDEFINED\Administrators:(OI)(CI)(IO)(F)
NT AUTHORITY\SYSTEM:(F) To get back to a working state, you need to change ownership back to the user or just delete the two directories and |
Next UniGetUI version will use WinGet COM api to install packages, so this won't be an issue anymore |
Closed WingetUI. Deleted Opened WingetUI. |
If your packages have gone missing recently, there is a high chance you have been affected by a Winget bug. To solve it, just do the following:
If you are running WingetUI 3.0.1 or higher:
Reset Winget Sources
If you are running WingetUI 3.0.0 or lower, or the above did not work
C:\Users\<EVERY-USER>\AppData\Local\Microsoft\WinGet\Settings\defaultState
folder and its contents. You may be requested for administrator permission. Click "Yes". DO THIS FOR EVERY USER ON YOUR MACHINEReset Winget Sources
The text was updated successfully, but these errors were encountered: