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

MISSING PACKAGES #1721

Closed
marticliment opened this issue Jan 19, 2024 · 43 comments
Closed

MISSING PACKAGES #1721

marticliment opened this issue Jan 19, 2024 · 43 comments

Comments

@marticliment
Copy link
Owner

marticliment commented Jan 19, 2024

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:

  1. Go to WingetUI Settings -> Winget Preferences and click Reset Winget Sources
  2. Restart WingetUI

If you are running WingetUI 3.0.0 or lower, or the above did not work

  1. Quit WingetUI
  2. Delete the 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 MACHINE
  3. Start WingetUI and navigate to Settings -> Winget Preferences and click on Reset Winget Sources
  4. Restart WingetUI again and disable System Winget if you had enabled it.ç
  5. Restart WingetUI a final time.
@llvs
Copy link

llvs commented Jan 22, 2024

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.
I, however, was under the impression that the "Software Updates" tab in the UI now started a new search and did not immediately respond with "Hooray! No updates were found!" but the end result was the same.

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.

@marticliment
Copy link
Owner Author

Can you please share your WingetUI logs?

@llvs
Copy link

llvs commented Jan 22, 2024

🟢 Using cached lang file
🟡 Using bundled lang file (forced=True)
🔵 It took 0.03124260902404785 to load all language files
🟢 checkQueue Thread started!
🟡 Chocolatey was not found on the default location, perhaps a portable WingetUI installation?
🔵 Language file up-to-date
---------------------------------------------------------------------------------------------------

   WingetUI version 2.2.0 (version number 2.2) log
   All modules loaded successfully and sys.stdout patched correctly, starting main script
   Translator function language set to "en"

---------------------------------------------------------------------------------------------------

 Log legend:
 🔵: Verbose
 🟢: Information
 🟡: Warning
 🟠: Handled unexpected exception
 🔴: Unhandled unexpected exception

🔵 Starting main application...
🔵 Looking for alive instances...
🔵 Starting API with random session authentication token 5565241c27c7020cb350f4d180dea984095ba16b9c0b1df69ab25bbd0f22221d
🟡 Found lock file(s), reactivating...
🔵 Reloading Winget sources...
🔵 Loading WingetUI AUMID...
🔵 Starting update check
<urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1002)>
🟢 Downloaded latest metadata to local file from url https://raw.githubusercontent.com/marticliment/WingetUI/main/WebBasedData/screenshot-database-v2.json
🔵 Loaded metadata from local file
🔵 Starting Winget source search...
🟢 Winget source search finished with 0 sources
Exception in thread Thread-17 (updateIfPossible):
Traceback (most recent call last):
  File "urllib\request.py", line 1348, in do_open
  File "http\client.py", line 1283, in request
  File "http\client.py", line 1329, in _send_request
  File "http\client.py", line 1278, in endheaders
  File "http\client.py", line 1038, in _send_output
  File "http\client.py", line 976, in send
  File "http\client.py", line 1455, in connect
  File "ssl.py", line 517, in wrap_socket
  File "ssl.py", line 1075, in _create
  File "ssl.py", line 1346, in do_handshake
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1002)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File ".\Interface\Application.py", line 542, in updateIfPossible
  File "urllib\request.py", line 216, in urlopen
  File "urllib\request.py", line 519, in open
  File "urllib\request.py", line 536, in _open
  File "urllib\request.py", line 496, in _call_chain
  File "urllib\request.py", line 1391, in https_open
  File "urllib\request.py", line 1351, in do_open
urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1002)>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "threading.py", line 1038, in _bootstrap_inner
  File "threading.py", line 975, in run
  File ".\Interface\Application.py", line 545, in updateIfPossible
  File "urllib\request.py", line 216, in urlopen
  File "urllib\request.py", line 525, in open
  File "urllib\request.py", line 634, in http_response
  File "urllib\request.py", line 563, in error
  File "urllib\request.py", line 496, in _call_chain
  File "urllib\request.py", line 643, in http_error_default
urllib.error.HTTPError: HTTP Error 404: Not Found
🔵 Reactivation signal ignored: RaiseWindow_[1705911216.1409605]
🟢 Found valid aumid {6D809377-6AF0-444B-8957-A3773F02200E}\WingetUI\wingetui.exe
{'sudoFound': True, 'sudoVersion': 'gsudo v2.0.4 (Branch.tags-v2.0.4.Sha.506efa024af0cef6e4b0cfec42e0c8c5d0b1472c)\r', 'ScoopFound': False, 'ScoopVersion': 'Scoop is disabled', 'PipFound': False, 'PipVersion': 'Pip is disabled', 'NpmFound': False, 'NpmVersion': 'Npm is disabled', '.NET ToolFound': False, '.NET ToolVersion': '.NET Tool is disabled', 'ChocolateyFound': False, 'ChocolateyVersion': '', 'WingetFound': True, 'WingetVersion': '', 'PowerShellFound': False, 'PowerShellVersion': ''}
🔵 Reached main ui load milestone
🟢 Discover tab loaded successfully
🟢 Total packages: 0
🟢 Update tab loaded successfully
🔵 Reloading sources...
🔵 Reloading Winget sources...
🔵 Reloading sources...
🔵 Reloading Winget sources...
🟢 Searching for string ""
🔵 Reloading sources...
🔵 Reloading Winget sources...
🟢 Uninstall tab loaded successfully
🔵 Starting Winget search for installed packages
🔵 Starting Chocolatey search for installed packages
🔵 Starting PowerShell search for installed packages
🟢 Searching for string ""
🔵 Reloading Scoop sources...
🔵 Reloading Scoop sources...
🔵 Reloading Scoop sources...
🟢 Winget search for installed packages finished with 0 result(s)
🟠 Chocolatey got too few installed packages, retrying
🔵 Starting Winget search for installed packages
🟢 Chocolatey search for installed packages finished with 0 result(s)
🟠 Chocolatey got too few installed packages, retrying
🔵 Starting Chocolatey search for installed packages
🟢 Chocolatey search for installed packages finished with 1 result(s)
🔵 Starting Winget source search...
🟢 Winget search for installed packages finished with 0 result(s)
🔵 Starting Scoop source search...
🔵 Starting Chocolatey source search...
🔵 Starting PowerShell source search...
🟢 Settings tab loaded!
🟢 Winget source search finished with 0 sources
🟢 Chocolatey source search finished with 0 sources
🟢 About tab loaded!
Win32Mica Error: win32 version 19045 is not supported
Win32Mica Error: win32 version 19045 is not supported
🟢 Main application loaded...
🟢 Total packages: 0
🟢 Total packages: 0
🟢 Total packages: 0
🟢 Searching for string ""
🟢 Searching for string ""
Traceback (most recent call last):
  File ".\Interface\CustomWidgets\InstallerWidgets.py", line 669, in <lambda>
TypeError: 'NoneType' object is not callable
🟢 Scoop source search finished with 0 sources
🟢 PowerShell search for installed packages finished with 0 result(s)
🟢 Searching for string ""
🟢 Searching for string ""
🟢 Total packages: 1
🟢 PowerShell source search finished with 1 sources
🔵 Starting PowerShell source search...
🔵 Starting Chocolatey search for updates
🔵 Starting Winget search for updates
🟢 Chocolatey search for updates finished with 0 result(s)
🟢 Searching for string ""
🟢 Winget search for updates finished with 0 result(s)
🟢 Searching for string ""
🟢 PowerShell source search finished with 1 sources
🔵 Starting PowerShell search for updates
🔴  Traceback (most recent call last):

🔴  Traceback (most recent call last):

🔴    File ".\PackageEngine\Managers\powershell.py", line 138, in getAvailableUpdates

🔴    File ".\PackageEngine\Managers\powershell.py", line 138, in getAvailableUpdates

🔴  UnicodeDecodeError: 'utf-8' codec can't decode byte 0x81 in position 114: invalid start byte

🔴  UnicodeDecodeError: 'utf-8' codec can't decode byte 0x81 in position 114: invalid start byte

🔴 Note this traceback was caught by reporter and has been added to the log ('utf-8' codec can't decode byte 0x81 in position 114: invalid start byte)
🟢 Searching for string ""
🟢 Searching for string ""
🟡 Can't get custom interval time! (got value was '')
🟢 Total packages: 0
🔵 Starting Winget search for installed packages
🔵 Starting Chocolatey search for installed packages
🔵 Starting PowerShell search for installed packages
🟢 Searching for string ""
🟢 Chocolatey search for installed packages finished with 1 result(s)
🟠 Chocolatey got too few installed packages, retrying
🔵 Starting Chocolatey search for installed packages
🟢 Winget search for installed packages finished with 0 result(s)
🟠 Chocolatey got too few installed packages, retrying
🔵 Starting Winget search for installed packages
🟢 Chocolatey search for installed packages finished with 1 result(s)
🟢 Searching for string ""
🟢 Winget search for installed packages finished with 0 result(s)
🟢 Searching for string ""
🟢 PowerShell search for installed packages finished with 0 result(s)
🟢 Searching for string ""
🟢 Searching for string ""
🟢 Total packages: 1
🔵 Loading WingetUI log...
🔵 Loading WingetUI log...
🔵 Copying log to the clipboard...
🔵 Loading WingetUI log...

@marticliment
Copy link
Owner Author

Can you also share Package Manager logs?

@llvs
Copy link

llvs commented Jan 22, 2024

The logfile of 2.2.0. I again deleted the mentioned folders for both users.

🟢 Using cached lang file
🟡 Using bundled lang file (forced=True)
🔵 It took 0.014960765838623047 to load all language files
🟢 checkQueue Thread started!
🔵 Language file up-to-date
🟡 Chocolatey was not found on the default location, perhaps a portable WingetUI installation?
---------------------------------------------------------------------------------------------------

   WingetUI version 2.2.0 (version number 2.2) log
   All modules loaded successfully and sys.stdout patched correctly, starting main script
   Translator function language set to "en"

---------------------------------------------------------------------------------------------------

 Log legend:
 🔵: Verbose
 🟢: Information
 🟡: Warning
 🟠: Handled unexpected exception
 🔴: Unhandled unexpected exception

🔵 Starting main application...
🔵 Looking for alive instances...
🔵 Starting API with random session authentication token 8b9646f3f337be646d927844f91fffe21463586ef0975a9eb37e02da488a0ca2
🟡 Found lock file(s), reactivating...
🔵 Reloading Winget sources...
🔵 Loading WingetUI AUMID...
🔵 Starting update check
<urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1002)>
🟢 Downloaded latest metadata to local file from url https://raw.githubusercontent.com/marticliment/WingetUI/main/WebBasedData/screenshot-database-v2.json
🔵 Loaded metadata from local file
🔵 Starting Winget source search...
🟢 Winget source search finished with 0 sources
Exception in thread Thread-17 (updateIfPossible):
Traceback (most recent call last):
  File "urllib\request.py", line 1348, in do_open
  File "http\client.py", line 1283, in request
  File "http\client.py", line 1329, in _send_request
  File "http\client.py", line 1278, in endheaders
  File "http\client.py", line 1038, in _send_output
  File "http\client.py", line 976, in send
  File "http\client.py", line 1455, in connect
  File "ssl.py", line 517, in wrap_socket
  File "ssl.py", line 1075, in _create
  File "ssl.py", line 1346, in do_handshake
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1002)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File ".\Interface\Application.py", line 542, in updateIfPossible
  File "urllib\request.py", line 216, in urlopen
  File "urllib\request.py", line 519, in open
  File "urllib\request.py", line 536, in _open
  File "urllib\request.py", line 496, in _call_chain
  File "urllib\request.py", line 1391, in https_open
  File "urllib\request.py", line 1351, in do_open
urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1002)>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "threading.py", line 1038, in _bootstrap_inner
  File "threading.py", line 975, in run
  File ".\Interface\Application.py", line 545, in updateIfPossible
  File "urllib\request.py", line 216, in urlopen
  File "urllib\request.py", line 525, in open
  File "urllib\request.py", line 634, in http_response
  File "urllib\request.py", line 563, in error
  File "urllib\request.py", line 496, in _call_chain
  File "urllib\request.py", line 643, in http_error_default
urllib.error.HTTPError: HTTP Error 404: Not Found
🔵 Reactivation signal ignored: RaiseWindow_[1705911942.7514586]
🟢 Found valid aumid {6D809377-6AF0-444B-8957-A3773F02200E}\WingetUI\wingetui.exe
{'sudoFound': True, 'sudoVersion': 'gsudo v2.0.4 (Branch.tags-v2.0.4.Sha.506efa024af0cef6e4b0cfec42e0c8c5d0b1472c)\r', 'ScoopFound': False, 'ScoopVersion': 'Scoop is disabled', 'PipFound': False, 'PipVersion': 'Pip is disabled', 'NpmFound': False, 'NpmVersion': 'Npm is disabled', '.NET ToolFound': False, '.NET ToolVersion': '.NET Tool is disabled', 'ChocolateyFound': False, 'ChocolateyVersion': '', 'WingetFound': True, 'WingetVersion': '', 'PowerShellFound': False, 'PowerShellVersion': ''}
🔵 Reached main ui load milestone
🟢 Discover tab loaded successfully
🟢 Total packages: 0
🟢 Update tab loaded successfully
🔵 Reloading sources...
🔵 Reloading Winget sources...
🔵 Reloading sources...
🔵 Reloading Winget sources...
🟢 Searching for string ""
🔵 Reloading sources...
🔵 Reloading Winget sources...
🟢 Uninstall tab loaded successfully
🔵 Starting Winget search for installed packages
🔵 Starting Chocolatey search for installed packages
🔵 Reloading Scoop sources...
🔵 Reloading Scoop sources...
🔵 Reloading Scoop sources...
🔵 Starting PowerShell search for installed packages
🟢 Searching for string ""
🟢 Chocolatey search for installed packages finished with 1 result(s)
🟠 Chocolatey got too few installed packages, retrying
🔵 Starting Chocolatey search for installed packages
🟢 Winget search for installed packages finished with 0 result(s)
🟠 Chocolatey got too few installed packages, retrying
🔵 Starting Winget search for installed packages
🔵 Starting Winget source search...
🔵 Starting Scoop source search...
🟢 Chocolatey search for installed packages finished with 1 result(s)
🔵 Starting Chocolatey source search...
🔵 Starting PowerShell source search...
🟢 Settings tab loaded!
🟢 Winget search for installed packages finished with 0 result(s)
🟢 Chocolatey source search finished with 0 sources
🟢 About tab loaded!
🟢 Winget source search finished with 0 sources
Win32Mica Error: win32 version 19045 is not supported
Win32Mica Error: win32 version 19045 is not supported
🟢 Main application loaded...
🟢 Total packages: 0
🟢 Total packages: 0
🟢 Total packages: 0
Traceback (most recent call last):
  File ".\Interface\CustomWidgets\InstallerWidgets.py", line 669, in <lambda>
TypeError: 'NoneType' object is not callable
🟢 Searching for string ""
🟢 Searching for string ""
IndexError: list index out of range
IndexError: list index out of range
IndexError: list index out of range
IndexError: list index out of range
🟢 Scoop source search finished with 6 sources
🟢 PowerShell search for installed packages finished with 0 result(s)
🟢 Searching for string ""
🟢 Searching for string ""
🟢 Total packages: 1
🟢 PowerShell source search finished with 1 sources
🔵 Starting Chocolatey search for updates
🔵 Starting PowerShell source search...
🔵 Starting Winget search for updates
🟢 Chocolatey search for updates finished with 0 result(s)
🟢 Searching for string ""
🟢 Winget search for updates finished with 0 result(s)
🟢 Searching for string ""
🟢 PowerShell source search finished with 1 sources
🔵 Starting PowerShell search for updates
🔴  Traceback (most recent call last):

🔴  Traceback (most recent call last):

🔴    File ".\PackageEngine\Managers\powershell.py", line 138, in getAvailableUpdates

🔴    File ".\PackageEngine\Managers\powershell.py", line 138, in getAvailableUpdates

🔴  UnicodeDecodeError: 'utf-8' codec can't decode byte 0x81 in position 114: invalid start byte

🔴  UnicodeDecodeError: 'utf-8' codec can't decode byte 0x81 in position 114: invalid start byte

🔴 Note this traceback was caught by reporter and has been added to the log ('utf-8' codec can't decode byte 0x81 in position 114: invalid start byte)
🟢 Searching for string ""
🟢 Searching for string ""
🟡 Can't get custom interval time! (got value was '')
🟢 Total packages: 0
🔵 Loading WingetUI log...
🔵 Loading WingetUI log...
🔵 Copying log to the clipboard...
🔵 Loading WingetUI log...
🟢 Log copied to the clipboard successfully!
🔵 Copying log to the clipboard...
🔵 Loading WingetUI log...
🟢 Log copied to the clipboard successfully!
🔵 Copying log to the clipboard...
🔵 Loading WingetUI log...

This is empty: C:\Program Files\WingetUI\choco-cli\logs
There are no other files containing "log" in C:\Program Files\WingetUI and all its subfolders (except for three *.ps1 scripts).
Where do I find the logs you need?

Here mangled scoop entry possibly by localization problems:
wingetui-scoop-messed

@marticliment
Copy link
Owner Author

I need these ones:
image

@llvs
Copy link

llvs commented Jan 22, 2024

Sorry, stupid me. This however is short:

Outputs from package managers on the current session:
 ---------Chocolatey
The system cannot find the specified path. [Translated]

---------Winget

---------Chocolatey
The system cannot find the specified path. [Translated]
---------Winget---------

---------Chocolatey
The system cannot find the specified path. [Translated]
---------Winget

@marticliment
Copy link
Owner Author

Now, please try:

  1. Uninstall WingetUI
  2. Navigate to C:\Program Files\WingetUI
  3. Delete everything
  4. Reinstall WingetUI. On the Welcome Wizard choose Advanced and select only "Winget" when you are asked about Package Managers
  5. Perform the steps mentioned on the first post of this thread

@llvs
Copy link

llvs commented Jan 22, 2024

Did that. Unfortunately no change.
Uninstall already removed the "C:\Program Files\WingetUI" folder. Didn't have to delete anything manually.
Only difference to your list: I had to select "Reset WingetUI settings" to get to the wizard. The wizard did not appear after fresh install.
Current log:

🟢 Using cached lang file
🟡 Using bundled lang file (forced=True)
🔵 It took 0.003987550735473633 to load all language files
🟢 checkQueue Thread started!
🔵 Language file up-to-date
🟡 Chocolatey was not found on the default location, perhaps a portable WingetUI installation?
---------------------------------------------------------------------------------------------------

   WingetUI version 2.2.0 (version number 2.2) log
   All modules loaded successfully and sys.stdout patched correctly, starting main script
   Translator function language set to "de"

---------------------------------------------------------------------------------------------------

 Log legend:
 🔵: Verbose
 🟢: Information
 🟡: Warning
 🟠: Handled unexpected exception
 🔴: Unhandled unexpected exception

🔵 Starting main application...
🔵 Looking for alive instances...
🔵 Starting API with random session authentication token 3b4bf9548752588856386a19c9772981e837f2b74a0f1c04568e9afbf528090b
🟡 Found lock file(s), reactivating...
🔵 Reloading Winget sources...
🔵 Loading WingetUI AUMID...
🔵 Starting update check
<urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1002)>
🟢 Downloaded latest metadata to local file from url https://raw.githubusercontent.com/marticliment/WingetUI/main/WebBasedData/screenshot-database-v2.json
🔵 Loaded metadata from local file
🔵 Starting Winget source search...
🟢 Winget source search finished with 0 sources
Exception in thread Thread-13 (updateIfPossible):
Traceback (most recent call last):
  File "urllib\request.py", line 1348, in do_open
  File "http\client.py", line 1283, in request
  File "http\client.py", line 1329, in _send_request
  File "http\client.py", line 1278, in endheaders
  File "http\client.py", line 1038, in _send_output
  File "http\client.py", line 976, in send
  File "http\client.py", line 1455, in connect
  File "ssl.py", line 517, in wrap_socket
  File "ssl.py", line 1075, in _create
  File "ssl.py", line 1346, in do_handshake
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1002)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File ".\Interface\Application.py", line 542, in updateIfPossible
  File "urllib\request.py", line 216, in urlopen
  File "urllib\request.py", line 519, in open
  File "urllib\request.py", line 536, in _open
  File "urllib\request.py", line 496, in _call_chain
  File "urllib\request.py", line 1391, in https_open
  File "urllib\request.py", line 1351, in do_open
urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1002)>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "threading.py", line 1038, in _bootstrap_inner
  File "threading.py", line 975, in run
  File ".\Interface\Application.py", line 545, in updateIfPossible
  File "urllib\request.py", line 216, in urlopen
  File "urllib\request.py", line 525, in open
  File "urllib\request.py", line 634, in http_response
  File "urllib\request.py", line 563, in error
  File "urllib\request.py", line 496, in _call_chain
  File "urllib\request.py", line 643, in http_error_default
urllib.error.HTTPError: HTTP Error 404: Not Found
🔵 Reactivation signal ignored: RaiseWindow_[1705922291.4617932]
🟢 Found valid aumid {6D809377-6AF0-444B-8957-A3773F02200E}\WingetUI\wingetui.exe
{'sudoFound': True, 'sudoVersion': 'gsudo v2.0.4 (Branch.tags-v2.0.4.Sha.506efa024af0cef6e4b0cfec42e0c8c5d0b1472c)\r', 'ScoopFound': False, 'ScoopVersion': 'Scoop ist deaktiviert', 'ChocolateyFound': False, 'ChocolateyVersion': 'Chocolatey ist deaktiviert', 'PipFound': False, 'PipVersion': 'Pip ist deaktiviert', 'NpmFound': False, 'NpmVersion': 'Npm ist deaktiviert', '.NET ToolFound': False, '.NET ToolVersion': '.NET Tool ist deaktiviert', 'PowerShellFound': False, 'PowerShellVersion': 'PowerShell ist deaktiviert', 'WingetFound': True, 'WingetVersion': ''}
🔵 Reached main ui load milestone
🟢 Discover tab loaded successfully
🟢 Total packages: 0
🟢 Update tab loaded successfully
🟢 Searching for string ""
🔵 Reloading sources...
🔵 Reloading Winget sources...
🟢 Uninstall tab loaded successfully
🔵 Starting Winget search for installed packages
🟢 Searching for string ""
🔵 Reloading Scoop sources...
🟢 Winget search for installed packages finished with 0 result(s)
🟠 Chocolatey got too few installed packages, retrying
🔵 Starting Winget search for installed packages
🔵 Starting Winget source search...
🟢 Winget search for installed packages finished with 0 result(s)
🔵 Starting Scoop source search...
🔵 Starting Chocolatey source search...
🔵 Starting PowerShell source search...
🟢 Settings tab loaded!
🟢 Chocolatey source search finished with 0 sources
🟢 Winget source search finished with 0 sources
🟢 About tab loaded!
Win32Mica Error: win32 version 19045 is not supported
Win32Mica Error: win32 version 19045 is not supported
🟢 Main application loaded...
🔵 Starting Winget search for installed packages
🟢 Searching for string ""
🟢 Total packages: 0
🟢 Searching for string ""
Traceback (most recent call last):
  File ".\Interface\CustomWidgets\InstallerWidgets.py", line 669, in <lambda>
TypeError: 'NoneType' object is not callable
Traceback (most recent call last):
  File ".\Interface\CustomWidgets\InstallerWidgets.py", line 669, in <lambda>
TypeError: 'NoneType' object is not callable
Traceback (most recent call last):
  File ".\Interface\CustomWidgets\InstallerWidgets.py", line 669, in <lambda>
TypeError: 'NoneType' object is not callable
🟢 Winget search for installed packages finished with 0 result(s)
🟠 Chocolatey got too few installed packages, retrying
🔵 Starting Winget search for installed packages
🟢 Scoop source search finished with 0 sources
🟢 Winget search for installed packages finished with 0 result(s)
🟢 Searching for string ""
🟢 Searching for string ""
🟢 Total packages: 0
🟢 PowerShell source search finished with 1 sources
🔵 Starting Winget search for updates
🟢 Winget search for updates finished with 0 result(s)
🟢 Searching for string ""
🟢 Searching for string ""
🟡 Can't get custom interval time! (got value was '')
🟢 Total packages: 0
🔵 Loading WingetUI log...
🔵 Copying log to the clipboard...
🔵 Loading WingetUI log...

Package manager logs:

Outputs from package managers on the current session:
 ---------Winget

---------Winget

---------Winget---------Winget---------Winget

@llvs
Copy link

llvs commented Jan 22, 2024

Other machine, same problem, Win11.
I deleted now even the entire Winget folder in the AppData\Local\Microsoft folder. Did that for both users, normal and admin user. Here are the logs of the WingetUI start after folder deletion. I also did the uninstall/reinstall and reset Wingetui dance (again, the wizard didn't come up after reinstallation).

🟢 Using cached lang file
🟡 Using bundled lang file (forced=True)
🔵 It took 0.0030074119567871094 to load all language files
🟢 checkQueue Thread started!
🔵 Language file up-to-date
🟡 Chocolatey was not found on the default location, perhaps a portable WingetUI installation?
---------------------------------------------------------------------------------------------------

   WingetUI version 2.2.0 (version number 2.2) log
   All modules loaded successfully and sys.stdout patched correctly, starting main script
   Translator function language set to "de"

---------------------------------------------------------------------------------------------------

 Log legend:
 🔵: Verbose
 🟢: Information
 🟡: Warning
 🟠: Handled unexpected exception
 🔴: Unhandled unexpected exception

🔵 Starting main application...
🔵 Looking for alive instances...
🔵 Starting API with random session authentication token d327ffd3fee03f0abac4012a7c219a7750e9692216c8e4f5f4386029299cbdb9
🔵 Reloading Winget sources...
🟡 Found lock file(s), reactivating...
🔵 Loading WingetUI AUMID...
🔵 Starting update check
🟢 Downloaded latest metadata to local file from url https://raw.githubusercontent.com/marticliment/WingetUI/main/WebBasedData/screenshot-database-v2.json
🔵 Loaded metadata from local file
🔵 Version URL: https://www.marticliment.com/versions/wingetui.ver
🟢 Updates not found
🔵 Starting Winget source search...
🟢 Winget source search finished with 0 sources
🟢 Found valid aumid {6D809377-6AF0-444B-8957-A3773F02200E}\WingetUI\wingetui.exe
{'sudoFound': True, 'sudoVersion': 'gsudo v2.0.4 (Branch.tags-v2.0.4.Sha.506efa024af0cef6e4b0cfec42e0c8c5d0b1472c)\r', 'ScoopFound': False, 'ScoopVersion': 'Scoop ist deaktiviert', 'ChocolateyFound': False, 'ChocolateyVersion': 'Chocolatey ist deaktiviert', 'PipFound': False, 'PipVersion': 'Pip ist deaktiviert', 'NpmFound': False, 'NpmVersion': 'Npm ist deaktiviert', '.NET ToolFound': False, '.NET ToolVersion': '.NET Tool ist deaktiviert', 'PowerShellFound': False, 'PowerShellVersion': 'PowerShell ist deaktiviert', 'WingetFound': True, 'WingetVersion': ''}
🔵 Reached main ui load milestone
🟢 Discover tab loaded successfully
🟢 Total packages: 0
🟢 Update tab loaded successfully
🟢 Searching for string ""
🔵 Reloading sources...
🔵 Reloading Winget sources...
🟢 Uninstall tab loaded successfully
🔵 Starting Winget search for installed packages
🟢 Searching for string ""
🔵 Reloading Scoop sources...
🟢 Winget search for installed packages finished with 0 result(s)
🟠 Chocolatey got too few installed packages, retrying
🔵 Starting Winget search for installed packages
🔵 Starting Winget source search...
🔵 Starting Scoop source search...
🔵 Starting Chocolatey source search...
🔵 Starting PowerShell source search...
🟢 Settings tab loaded!
🟢 Winget search for installed packages finished with 0 result(s)
🟢 About tab loaded!
🟢 Winget source search finished with 0 sources
🟢 Chocolatey source search finished with 0 sources
🟢 Scoop source search finished with 0 sources
🟢 Main application loaded...
🔵 Starting Winget search for installed packages
🟢 Searching for string ""
🟢 Total packages: 0
Traceback (most recent call last):
  File ".\Interface\CustomWidgets\InstallerWidgets.py", line 669, in <lambda>
TypeError: 'NoneType' object is not callable
Traceback (most recent call last):
  File ".\Interface\CustomWidgets\InstallerWidgets.py", line 669, in <lambda>
TypeError: 'NoneType' object is not callable
Traceback (most recent call last):
  File ".\Interface\CustomWidgets\InstallerWidgets.py", line 669, in <lambda>
TypeError: 'NoneType' object is not callable
🟢 Searching for string ""
🟢 Winget search for installed packages finished with 0 result(s)
🟠 Chocolatey got too few installed packages, retrying
🔵 Starting Winget search for installed packages
🔵 Starting Winget search for updates
🟢 Winget search for installed packages finished with 0 result(s)
🟢 Searching for string ""
🟢 Searching for string ""
🟢 Total packages: 0
🟢 Winget search for updates finished with 0 result(s)
🟢 Searching for string ""
🟢 Searching for string ""
🟡 Can't get custom interval time! (got value was '')
🟢 Total packages: 0
🟢 PowerShell source search finished with 1 sources
🟢 Found reactivation lock file...
🔵 Starting Winget search for installed packages
🟢 Searching for string ""
🟢 Winget search for installed packages finished with 0 result(s)
🟠 Chocolatey got too few installed packages, retrying
🔵 Starting Winget search for installed packages
🟢 Winget search for installed packages finished with 0 result(s)
🟢 Searching for string ""
🟢 Searching for string ""
🟢 Total packages: 0
🔵 Loading WingetUI log...
🔵 Copying log to the clipboard...
🔵 Loading WingetUI log...
🟢 Log copied to the clipboard successfully!
🔵 Copying log to the clipboard...
🔵 Loading WingetUI log...
🟢 Log copied to the clipboard successfully!
🔵 Copying log to the clipboard...
🔵 Loading WingetUI log...

Package manager log. I disabled all other managers.

Outputs from package managers on the current session:
 ---------Winget

---------Winget---------Winget---------Winget

---------Winget---------Winget---------Winget

@marticliment
Copy link
Owner Author

Which device are you using? (OS Version, Processor, RAM, Etc.)

@llvs
Copy link

llvs commented Jan 22, 2024

Device1: Win10 22H2, Xeon W-2125 (Skylake), 32GB RAM
Device2: Win11 23H2, i7-13800H (Raptor Lake), 64GB RAM
So they are an old one and a new one. Both were quite freshly installed via Rufus. Both are domain-joined to our company domain. Installation of software via WingetUI as normal user worked in the beginning but failed after a few uses without a clear reason why.
Interestingly, the Winget on the command line still gives me output about updates. WingetUI just doesn't get that output and I have no idea, which cache/folder I could clear to fully reset the behavior.

@marticliment
Copy link
Owner Author

marticliment commented Jan 22, 2024

Specs are definitely not an issue...

What happens if you run the following commands on a cmd window?

"C:\Program Files\WingetUI\wingetui\PackageEngine\Managers\winget-cli_x64\winget.exe" --version

"C:\Program Files\WingetUI\wingetui\PackageEngine\Managers\winget-cli_x64\winget.exe" upgrade

@llvs
Copy link

llvs commented Jan 22, 2024

1st line gives no output. Errorlevel is -1978335231.
2nd line the same.
As desribed in the other issue 1683

@marticliment
Copy link
Owner Author

Try deleting C:\Users\<USERNAME>\AppData\Local\Microsoft\WinGet\Settings\defaultState for every user you can find on your machine.

@marticliment
Copy link
Owner Author

marticliment commented Jan 22, 2024

Because this code means corrupt databases

@llvs
Copy link

llvs commented Jan 22, 2024

Interesting. I had deleted that folders already. However, I found additional similar folders:

C:\Users\<ADMIN-USER>\AppData\Local\Temp\WinGet\defaultState\
C:\Users\<NON-ADMIN-USER>\AppData\Local\Temp\WinGet\defaultState\

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.

@captainfalcon23
Copy link

@marticliment the suggestion from @llvs fixed the issue for me (deleting C:\Users\AppData\Local\Temp\WinGet\defaultState) on latest version 2.2.0 🎉🎉🎉

@ExpPhysU
Copy link

Interesting. I had deleted that folders already. However, I found additional similar folders:

C:\Users\<ADMIN-USER>\AppData\Local\Temp\WinGet\defaultState\
C:\Users\<NON-ADMIN-USER>\AppData\Local\Temp\WinGet\defaultState\

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.

Worked for me too

@charlesroper
Copy link

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. :)

@qhq
Copy link

qhq commented Mar 2, 2024

3.0-beta0
installed packages sources only .NET
PixPin_2024-03-02_22-41-37
PixPin_2024-03-02_22-41-56

C:\Users\qhq\AppData\Local\WingetUI\CachedLangFiles\lang_zh_CN.json
Loaded language locale: zh_CN
Api auth token:
Starting update check
WingetUI is up to date
Lang files were updated successfully
Winget source update timed out. Current output was
Updating all sources...
Updating source: 中科大...

  • \ | Done
    Updating source: msstore...
    Done
    Updating source: winget...
  • \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ |
    LoadComponentsAsync finished executing. All managers loaded. Proceeding to interface.
    Error finding installed packages on manager Winget:
    System.ArgumentOutOfRangeException: Index and length must refer to a location within the string. (Parameter 'length')
    at System.String.ThrowSubstringArgumentOutOfRange(Int32 startIndex, Int32 length)
    at System.String.Substring(Int32 startIndex, Int32 length)
    at ModernWindow.PackageEngine.Managers.Winget.GetInstalledPackages_UnSafe() in Y:\WingetUI-Store\src\wingetui\PackageEngine\Managers\Winget.cs:line 229
    at ModernWindow.PackageEngine.Classes.PackageManager.GetInstalledPackages() in Y:\WingetUI-Store\src\wingetui\PackageEngine\Classes\Manager.cs:line 146

@marticliment
Copy link
Owner Author

This is a different issue, please open a new support ticket

@marticliment
Copy link
Owner Author

Try deleting the files mentioned in the top again

@LM1LC3N7
Copy link

Finally 🎉
Thanks @marticliment!

For the records:

  1. Quit WingetUI
  2. Delete all these folders (and say "Yes to All")
  3. Open WingetUI again: all winget packages are listed now
# Using elevated PowerShell
rmdir C:\Users\<current user>\AppData\Local\Microsoft\WinGet\Settings\defaultState
rmdir C:\Users\<current user>\AppData\Local\Temp\WinGet\defaultState\
rmdir C:\Users\<admin user>\AppData\Local\Microsoft\WinGet\Settings\defaultState

@skanda890
Copy link
Contributor

skanda890 commented Mar 14, 2024

Finally 🎉 Thanks @marticliment!

For the records:

  1. Quit WingetUI
  2. Delete all these folders (and say "Yes to All")
  3. Open WingetUI again: All Winget packages are listed now
# Using elevated PowerShell
rmdir C:\Users\<current user>\AppData\Local\Microsoft\WinGet\Settings\defaultState
rmdir C:\Users\<current user>\AppData\Local\Temp\WinGet\defaultState\
rmdir C:\Users\<admin user>\AppData\Local\Microsoft\WinGet\Settings\defaultState

If the admin user and the current user are the same should we avoid the first step?

@LM1LC3N7
Copy link

If the admin user and the current user are the same should we avoid the first step?

I think yes.

@LM1LC3N7
Copy link

On my side I get all installed packages now.

@skanda890
Copy link
Contributor

On my side I get all installed packages now.

Same.

@llvs
Copy link

llvs commented Mar 14, 2024

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!

# Self-elevate the script if required
if (-Not ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] 'Administrator')) {
 if ([int](Get-CimInstance -Class Win32_OperatingSystem | Select-Object -ExpandProperty BuildNumber) -ge 6000) {
  $CommandLine = "-File `"" + $MyInvocation.MyCommand.Path + "`" " + $MyInvocation.UnboundArguments
  Start-Process -FilePath PowerShell.exe -Verb Runas -ArgumentList $CommandLine
  Exit
 }
}
Remove-Item -Recurse -Force C:\Users\<current_user>\AppData\Local\Microsoft\WinGet\Settings\defaultState
Remove-Item -Recurse -Force C:\Users\<current_user>\AppData\Local\Temp\WinGet\defaultState\
Remove-Item -Recurse -Force C:\Users\<admin_user>\AppData\Local\Microsoft\WinGet\Settings\defaultState

The script elevation is shamelessly copied verbatim from here
Using Remove-Item to avoid the user prompting was discussed 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.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
█▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
█ Name: Winget
█ Enabled: True
█ Found: True
█ Fancye exe name: winget.exe
█ Executable path: C:\Program Files\WingetUI\PackageEngine\Managers\winget-cli_x64\winget.exe
█ Call arguments:
█ Version:
█ v1.7.10582
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀

@marticliment
Copy link
Owner Author

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!

# Self-elevate the script if required
if (-Not ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] 'Administrator')) {
 if ([int](Get-CimInstance -Class Win32_OperatingSystem | Select-Object -ExpandProperty BuildNumber) -ge 6000) {
  $CommandLine = "-File `"" + $MyInvocation.MyCommand.Path + "`" " + $MyInvocation.UnboundArguments
  Start-Process -FilePath PowerShell.exe -Verb Runas -ArgumentList $CommandLine
  Exit
 }
}
Remove-Item -Recurse -Force C:\Users\<current_user>\AppData\Local\Microsoft\WinGet\Settings\defaultState
Remove-Item -Recurse -Force C:\Users\<current_user>\AppData\Local\Temp\WinGet\defaultState\
Remove-Item -Recurse -Force C:\Users\<admin_user>\AppData\Local\Microsoft\WinGet\Settings\defaultState

The script elevation is shamelessly copied verbatim from here Using Remove-Item to avoid the user prompting was discussed 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. ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ █ Name: Winget █ Enabled: True █ Found: True █ Fancye exe name: winget.exe █ Executable path: C:\Program Files\WingetUI\PackageEngine\Managers\winget-cli_x64\winget.exe █ Call arguments: █ Version: █ v1.7.10582 ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀

@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

@llvs
Copy link

llvs commented Mar 14, 2024

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 :-).
Otherwise one might clean the Winget related temp files for all users, e.g. for every folder in C:\Users except for Default\, Public\, Default User\ and All Users\. I don't know if this would have side-effects for non-users of WingetUI to clean temp files. Maybe there could be issued a warning before cleaning with a list, what will be cleaned.

@marticliment
Copy link
Owner Author

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

@llvs
Copy link

llvs commented Mar 14, 2024

But you will need elevation to clear the admin folders. I don't see that in the ChatGPT solution.

@marticliment
Copy link
Owner Author

marticliment commented Mar 14, 2024

The "reset winget sources" is already launched as administrator from WingetUI, so this won't be a problem

@LM1LC3N7
Copy link

WingetUI was updated few minutes ago, and again, I no longer have winget packages listed.
Tried the solution provided #1721 (comment) but it still does not work.

@marticliment
Copy link
Owner Author

Please share your logs

@skanda890
Copy link
Contributor

skanda890 commented Mar 20, 2024

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.

@LM1LC3N7
Copy link

Here some logs:

WingetUI Logs
Welcome to WingetUI Version 3.0.1
               Version Code 3,01
C:\Users\<user>\AppData\Local\WingetUI\CachedLangFiles\lang_fr.json
Loaded language locale: fr
Api auth token: REDACTED
Starting update check
Api running on http://localhost:7058
Lang files were updated successfully
WingetUI is up to date
Downloaded icons and screenshots successfully!
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
█▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
█ Name: Chocolatey
█ Enabled: False
█ THE MANAGER IS DISABLED
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
█▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
█ Name: .NET Tool
█ Enabled: False
█ THE MANAGER IS DISABLED
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
█▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
█ Name: Winget
█ Enabled: True
█ Found: True
█ Fancye exe name: winget.exe
█ Executable path: C:\Program Files\WingetUI\PackageEngine\Managers\winget-cli_x64\winget.exe
█ Call arguments: 
█ Version: 
█   
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
█▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
█ Name: Pip
█ Enabled: False
█ THE MANAGER IS DISABLED
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
█▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
█ Name: Scoop
█ Enabled: False
█ THE MANAGER IS DISABLED
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
█▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
█ Name: Npm
█ Enabled: False
█ THE MANAGER IS DISABLED
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
█▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
█ Name: PowerShell
█ Enabled: False
█ THE MANAGER IS DISABLED
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
LoadComponentsAsync finished executing. All managers loaded. Proceeding to interface.
Start backup
Finished loading serializable objects. Serializing with format JSON
Finished serializing
Invalid value for UpdatesCheckInterval, using default value of 3600 seconds
Backup saved to C:\Users\<user>\OneDrive\Documents\WingetUI\Paquets installés sur PP899.json
Invalid value for UpdatesCheckInterval, using default value of 3600 seconds

@0xF4CED
Copy link

0xF4CED commented Apr 28, 2024

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
C:\Users\<USER>\AppData\Local\Microsoft\WinGet\Settings\defaultState and
C:\Users\<USER>\AppData\Local\Microsoft\WinGet\State\defaultState

It is easily reproducible:

  1. Be standard user with WingetUI in working state
  2. Install for example Eclipse Temurin JRE
  3. Uninstall Eclipse Temurin JRE (winget uses gsudo to escalate privileges)
    --> winget is broken because admin took over ownership of defaultState directories
# "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 Reset Winget Sources.
This is probably a bug. WDYT @marticliment

@marticliment
Copy link
Owner Author

Next UniGetUI version will use WinGet COM api to install packages, so this won't be an issue anymore

@rumplin
Copy link
Contributor

rumplin commented May 30, 2024

Closed WingetUI.

Deleted
C:\Users\<USER>\AppData\Local\Microsoft\WinGet\Settings\defaultState
and
C:\Users\<USER>\AppData\Local\Microsoft\WinGet\State\defaultState
and
C:\Users\<USER>\AppData\Local\WingetUI

Opened WingetUI.
And it resolved my issue.

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