Devolutions / Devolutions/UniGetUI

[BUG] Using Chocolatey causes choco.exe process to hang on update check infinitely using CPU cycles.

Open
#3,708 14 comments 0 reactions 1 assignee Claimed by @marticliment View on GitHub
bug chocolatey needs-further-study
Dominant language
C#
Stars
26.1k
Forks
924
Avg merge
15h 52m
Merged PRs (30d)
52

Description

### Please confirm these before moving forward

- [x] I have searched for my issue and have not found a work-in-progress/duplicate/resolved issue.
- [x] I have tested that this issue has not been fixed in the latest [(beta or stable) release](https://github.com/marticliment/WingetUI/releases/).
- [x] I have checked the [FAQ](https://github.com/marticliment/WingetUI#frequently-asked-questions) section for solutions.
- [x] This issue is about a bug (if it is not, please use the [correct template](https://github.com/marticliment/WingetUI/issues/new/choose)).

### UniGetUI Version

3.2.0

### Windows version, edition, and architecture

Windows 11 Pro 23H2 22631.5413 // 1000.22700.1106.0 (x64)

### Describe your issue

When using UniGetUI Chocolatey manager process, `choco.exe` can get stuck permanently trying to find updated packages.
Each attempt to find updates during UniGetUI launch spawns two stuck choco.exe threads [list and outdated commands], each using quite a chunk of CPU power. After launch each attempt spawns +1 process.

They won't terminate with time (despite 60 seconds timeout), neither they will terminate if UniGetUI becomes closed. They will unattach from process and continue hanging eating out CPU power.

Issue happens with both UniGetUI own, as well as system wide Chocolatey called via UniGetUI one.

### Steps to reproduce the issue

1. Launch UniGetUI
2. Watch task manager (or other system/load monitoring tool)...

Well, that is pretty much all that's needed.
Sometimes it can take one or two tries to start happening for me, but after it starts, it will happen 100% of times.

### UniGetUI Log

```text
[01.06.2025 22:28:48] Manager Chocolatey failed to list installed packages with exception TimeoutException: Task _getInstalledPackages for manager Chocolatey did not finish after 60 seconds, aborting. You may disable timeouts from UniGetUI Advanced Settings
[01.06.2025 22:28:48] Since this was the first attempt, Chocolatey.AttemptFastRepair() will be called and the procedure will be restarted
[01.06.2025 22:28:48] Manager Chocolatey failed to list available updates with exception TimeoutException: Task _getInstalledPackages for manager Chocolatey did not finish after 60 seconds, aborting. You may disable timeouts from UniGetUI Advanced Settings
[01.06.2025 22:28:48] Since this was the first attempt, Chocolatey.AttemptFastRepair() will be called and the procedure will be restarted
[01.06.2025 22:29:48] Error finding updates on manager Chocolatey
[01.06.2025 22:29:48] Error finding installed packages on manager Chocolatey
[01.06.2025 22:29:48] System.TimeoutException: Task _getInstalledPackages for manager Chocolatey did not finish after 60 seconds, aborting. You may disable timeouts from UniGetUI Advanced Settings
at UniGetUI.PackageEngine.ManagerClasses.Manager.PackageManager._getAvailableUpdates(Boolean SecondAttempt) in C:\SomePrograms\WingetUI-Store\src\UniGetUI.PackageEngine.PackageManagerClasses\Manager\PackageManager.cs:line 206
[01.06.2025 22:29:48] System.TimeoutException: Task _getInstalledPackages for manager Chocolatey did not finish after 60 seconds, aborting. You may disable timeouts from UniGetUI Advanced Settings
at UniGetUI.PackageEngine.ManagerClasses.Manager.PackageManager._getInstalledPackages(Boolean SecondAttempt) in C:\SomePrograms\WingetUI-Store\src\UniGetUI.PackageEngine.PackageManagerClasses\Manager\PackageManager.cs:line 255
```

### Package Managers Logs

```text
Logged subprocess-based task on manager Chocolatey. Task type is ListUpdates
Subprocess executable: "C:\Users\DimkaTsv\AppData\Local\UniGetUI\Chocolatey\choco.exe"
Command-line arguments: " outdated "
Process start time: 01.06.2025 22:31:31
Process end time: UNFINISHED

-- Process STDOUT
Chocolatey v2.4.3
Outdated Packages
Output is package name | current version | available version | pinned?

Return code: Process has not finished yet
```

### Relevant information

Perhaps issue roots in fact that i have 0 packages installed via Chocolatey. So it cannot find any to update and retries infinitely?
Disabling Chocolatey makes issue disappear (but that's quite obvious...)
Switching to diffetent Chocolatey mode makes issue disappear for one or two attempts, then it returns.

### Screenshots and videos

UniGetUI Chocolatey:
![Image](https://github.com/user-attachments/assets/e8c27a2f-e7e6-42c0-b2d0-36299fcbac3c)

System-wide Chocolatey:
![Image](https://github.com/user-attachments/assets/e9537100-3128-4d95-b4f4-e4118592d8c2)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.