marticliment / UniGetUI

UniGetUI: The Graphical Interface for your package managers. Could be terribly described as a package manager manager to manage your package managers
https://www.marticliment.com/unigetui/
MIT License
12.26k stars 420 forks source link

[BUG] System Chocolatey doesn't work since 3.1.0 stable #2411

Closed CypherNL closed 2 months ago

CypherNL commented 3 months ago

Please confirm these before moving forward

UniGetUI Version

3.1.0

Windows version, edition and architecture

Windows 10 Education 19045.4291 x64

Describe your issue

When using Chocolatey installed on my system ('Use system chocolatey' is enabled), Chocolatey doesn't get listed on Software Updates, Discover Packages and even on Installed Packages. On 3.0.2, this worked fine. UniGetUI does see Chocolatey and the executable file of it exist on my computer.

When disabling 'Use system Chocolatey' and rebooting UniGetUI, Chocolatey does work. Re-checking that option and rebooting the program, the issue returns.

Steps to reproduce the issue

  1. Install Chocolatey on you system outside of UnigetUI
  2. Enable Chocolatey in UniGetUI
  3. Make sure the option 'Use system chocolatey' is enabled in the settings menu under Chocolatey.
  4. Reboot UniGetUI.
  5. When searching packages, Chocolatey packages doesn't show.
  6. Go to the settings menu, open the Chocolatey section and you see that Chocolatey is being recognised.

UniGetUI Log

[03/07/2024 17:07:21] 
                         __  __      _ ______     __  __  ______
                        / / / /___  (_) ____/__  / /_/ / / /  _/
                       / / / / __ \/ / / __/ _ \/ __/ / / // /  
                      / /_/ / / / / / /_/ /  __/ /_/ /_/ // /   
                      \____/_/ /_/_/\____/\___/\__/\____/___/   
                          Welcome to UniGetUI Version 3.1.0
[03/07/2024 17:07:21]
[03/07/2024 17:07:21] Version Code:  3,1
[03/07/2024 17:07:21] Using bundled GSudo at C:\Program Files\WingetUI\Assets\Utilities\gsudo.exe
[03/07/2024 17:07:21] Loaded language locale: en
[03/07/2024 17:07:21] Randomly-generated background API auth token for the current session: er7taqup5fy2fjg5nnkkgehbq86f0w7tz3a4mjwbykte64mwto89f4tgredrxqyl
[03/07/2024 17:07:21] Api running on http://localhost:7058
[03/07/2024 17:07:21] Moving Bundled Chocolatey from old path to new path...
[03/07/2024 17:07:21] An error occurred while migrating chocolatey
[03/07/2024 17:07:21] System.ArgumentException: The path is empty. (Parameter 'relativeTo')
                         at System.IO.Path.GetRelativePath(String relativeTo, String path, StringComparison comparisonType)
                         at UniGetUI.PackageEngine.Managers.ChocolateyManager.Chocolatey.LoadManager() in C:\SomePrograms\WingetUI-Store\src\UniGetUI.PackageEngine.Managers.Chocolatey\Chocolatey.cs:line 278
[03/07/2024 17:07:21] Lang files were updated successfully from GitHub
[03/07/2024 17:07:21] The restored geometry did not have exactly 5 items (found length was 1)
[03/07/2024 17:07:21] Downloaded new icons and screenshots successfully!
[03/07/2024 17:07:22] UniGetUI is up to date
[03/07/2024 17:07:22] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                      █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                      █ Name: .NET Tool
                      █ Enabled: True
                      █ Found: False
                      █ THE MANAGER WAS NOT FOUND. PERHAPS IT IS NOT 
                      █ INSTALLED OR IT HAS BEEN MISCONFIGURED 
                      ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[03/07/2024 17:07:22] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                      █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                      █ Name: Winget
                      █ Enabled: True
                      █ Found: True
                      █ Fancye exe name: winget.exe
                      █ Executable path: C:\Users\username\AppData\Local\Microsoft\WindowsApps\winget.exe
                      █ Call arguments: 
                      █ Version: 
                      █   Naive WinGet CLI Version: v1.8.1791
                      █   Microsoft.WinGet.Client PSModule version: 
                      █   Using Native WinGet helper (COM Api)
                      ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[03/07/2024 17:07:22] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                      █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                      █ Name: Pip
                      █ Enabled: False
                      █ THE MANAGER IS DISABLED
                      ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[03/07/2024 17:07:22] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                      █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                      █ Name: Npm
                      █ Enabled: False
                      █ THE MANAGER IS DISABLED
                      ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[03/07/2024 17:07:23] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                      █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                      █ Name: Chocolatey
                      █ Enabled: True
                      █ Found: True
                      █ Fancye exe name: choco.exe
                      █ Executable path: C:\ProgramData\chocolatey\bin\choco.exe
                      █ Call arguments: 
                      █ Version: 
                      █   2.3.0
                      ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[03/07/2024 17:07:23] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                      █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                      █ Name: PowerShell
                      █ Enabled: True
                      █ Found: True
                      █ Fancye exe name: powershell.exe
                      █ Executable path: C:\WINDOWS\system32\windowspowershell\v1.0\powershell.exe
                      █ Call arguments:  -NoProfile -Command
                      █ Version: 
                      █   Name                           Value                                                                                   
                      █   ----                           -----                                                                                   
                      █   PSVersion                      5.1.19041.4291                                                                          
                      █   PSEdition                      Desktop                                                                                 
                      █   PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}                                                                 
                      █   BuildVersion                   10.0.19041.4291                                                                         
                      █   CLRVersion                     4.0.30319.42000                                                                         
                      █   WSManStackVersion              3.0                                                                                     
                      █   PSRemotingProtocolVersion      2.3                                                                                     
                      █   SerializationVersion           1.1.0.1
                      ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[03/07/2024 17:07:24] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                      █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                      █ Name: Scoop
                      █ Enabled: True
                      █ Found: True
                      █ Fancye exe name: scoop
                      █ Executable path: C:\WINDOWS\system32\windowspowershell\v1.0\powershell.exe
                      █ Call arguments:  -NoProfile -ExecutionPolicy Bypass -Command scoop
                      █ Version: 
                      █   Current Scoop version:
                      █   d337bb1f chore(release): Bump to version 0.4.2 (#5964)
                      █   
                      █   'main' bucket:
                      █   3c39f8dac x265: Update to version 3.6+33-ad1a30a
                      █   
                      █   'extras' bucket:
                      █   50b978a4a wingetui: Update to version 3.1.0
                      █   
                      █   'versions' bucket:
                      █   63720399d rstudio-daily: Update to version 2024.07.0-daily-271
                      █   
                      █   'nirsoft' bucket:
                      █   62f97d6 Update README.md
                      █   
                      █   'sysinternals' bucket:
                      █   7b0f09e ProcessMonitor: Update to version 4.01
                      █   
                      █   'nerd-fonts' bucket:
                      █   d16f2562 SarasaGothic: Update to version 1.0.15
                      █   
                      █   'nonportable' bucket:
                      █   305bb04 powertoys-np: Update to version 0.82.0
                      █   
                      █   'java' bucket:
                      █   fdb41b89 temurin17-nightly-jre: Update to version 17.0.12-6.0.ea
                      █   
                      █   'games' bucket:
                      █   9ae0edbdc pcsx2-dev: Update to version 1.7.5955
                      █   
                      █   'brawl' bucket:
                      █   c3f0e2a pwsh-stock: Update to version 7.4.1
                      █   
                      █   'confetti' bucket:
                      █   615ddf6 staxrip: Update to version 2.41.6
                      █   
                      █   'Cypher' bucket:
                      █   729ea64 tvrename: Added post_install to delete the PLUGINSDIR and Uninstaller files
                      █   
                      █   'dank-scoop' bucket:
                      █   fe865b5d rustdesk-nightly: Update to version 1720002028
                      █   
                      █   'Darkatse' bucket:
                      █   c3724aa Clash-Verge: Update to version 1.7.2
                      █   
                      █   'dorado' bucket:
                      █   a812984a todesk@4.7.4.0: Fix hash (Closes #860)
                      █   
                      █   'emulators' bucket:
                      █   512adec32 retroarch-nightly: Update to version 2024-07-03
                      █   
                      █   'iquiw' bucket:
                      █   c145a77 ghc96: Update to version to 9.6.6
                      █   
                      █   'jetbrains' bucket:
                      █   e4f497e4 IntelliJ-IDEA-Ultimate-EAP: Update to version 2024.2-242.19890.14
                      █   
                      █   'kazanami' bucket:
                      █   d8b6c3f neeview: Update to version 39.3
                      █   
                      █   'knotuntied' bucket:
                      █   4d19fd0 minify: Update to version 2.20.35
                      █   
                      █   'MAI' bucket:
                      █   ce2b4d6 Updated readme
                      █   
                      █   'naderi' bucket:
                      █   9f85c188 xpipe: Update to version 10.0.4
                      █   
                      █   'peach' bucket:
                      █   6c74ef7 Update schedule.yml
                      █   
                      █   'retools' bucket:
                      █   c5687f1 flare-floss: Update to version 3.1.0
                      █   
                      █   'scoops' bucket:
                      █   9d28b36 pfm2afm: fix URL
                      █   
                      █   'stasjok-bucket' bucket:
                      █   b7611aa duplicati: Update to version 2.0.8.1
                      █   
                      █   'wangzq' bucket:
                      █   c4daa53 perfview
                      █   
                      █   'yuusakuri' bucket:
                      █   06b4cc5 dotnetversions: Update to version 1.1.1
                      ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[03/07/2024 17:07:25] Found 0 available updates from Chocolatey
[03/07/2024 17:07:25] Found 0 installed packages from Chocolatey
[03/07/2024 17:07:25] Dependency WinGet PowerShell Module for manager Winget is present
[03/07/2024 17:07:25] Dependency Scoop-Search for manager Scoop is present
[03/07/2024 17:07:25] Dependency Git for manager Scoop is present
[03/07/2024 17:07:25] LoadComponentsAsync finished executing. All managers loaded. Proceeding to interface.
[03/07/2024 17:07:25] Found 90 installed packages from Scoop
[03/07/2024 17:07:26] Found 2 installed packages from PowerShell
[03/07/2024 17:07:29] Found 7 available packages from Winget with the query Firefox
[03/07/2024 17:07:29] Found 0 available packages from Chocolatey with the query Firefox
[03/07/2024 17:07:29] Found 31 available packages from Scoop with the query Firefox
[03/07/2024 17:07:30] Found 244 installed packages from Winget
[03/07/2024 17:07:30] Found 12 available updates from Winget
[03/07/2024 17:07:32] Found 1 available updates from PowerShell
[03/07/2024 17:07:40] Found 90 installed packages from Scoop
[03/07/2024 17:07:54] Upgradable scoop package not listed on installed packages - id=adb
[03/07/2024 17:07:54] Upgradable scoop package not listed on installed packages - id=ubisoftconnect
[03/07/2024 17:07:54] Found 0 available updates from Scoop
[03/07/2024 17:08:01] Found 0 available packages from PowerShell with the query Firefox

Package Managers Logs

Manager Chocolatey with version:
2.3.0

——————————————————————————————————————————

Logged subprocess-based task on manager Chocolatey. Task type is ListSources
Subprocess executable: "C:\ProgramData\chocolatey\bin\choco.exe"
Command-line arguments: " source list"
Process start time: 03/07/2024 17:07:22
Process end time:   03/07/2024 17:07:23

Return code: FAILED (1)

——————————————————————————————————————————

Logged subprocess-based task on manager Chocolatey. Task type is ListUpdates
Subprocess executable: "C:\ProgramData\chocolatey\bin\choco.exe"
Command-line arguments: " outdated"
Process start time: 03/07/2024 17:07:24
Process end time:   03/07/2024 17:07:25

Return code: FAILED (1)

——————————————————————————————————————————

Logged subprocess-based task on manager Chocolatey. Task type is ListPackages
Subprocess executable: "C:\ProgramData\chocolatey\bin\choco.exe"
Command-line arguments: " list"
Process start time: 03/07/2024 17:07:24
Process end time:   03/07/2024 17:07:25

Return code: FAILED (1)

——————————————————————————————————————————

Logged subprocess-based task on manager Chocolatey. Task type is ListSources
Subprocess executable: "C:\ProgramData\chocolatey\bin\choco.exe"
Command-line arguments: " source list"
Process start time: 03/07/2024 17:07:25
Process end time:   03/07/2024 17:07:25

Return code: FAILED (1)

——————————————————————————————————————————

Logged native task on manager Chocolatey. Task type is FindPackages
Process start time: 03/07/2024 17:07:29
Process end time:   03/07/2024 17:07:29

The task reported success

——————————————————————————————————————————

Logged subprocess-based task on manager Chocolatey. Task type is ListSources
Subprocess executable: "C:\ProgramData\chocolatey\bin\choco.exe"
Command-line arguments: " source list"
Process start time: 03/07/2024 17:07:29
Process end time:   03/07/2024 17:07:29

Return code: FAILED (1)

——————————————————————————————————————————

Relevant information

Running the chocolatey commands listed on the Package Managers logs do work in Windows Terminal.

Screenshots and videos

image image

marticliment commented 3 months ago

What happens if you run UniGetUI as administrator?

daykx commented 3 months ago

What happens if you run UniGetUI as administrator?

Same "An error occurred while migrating chocolatey"

marticliment commented 3 months ago

Please try to move the contents of a folder named %localappdata%\Programs\WingetUI\choco-cli to %localappdata%\UniGetUI\Chocolatey and delete the choco-cli folder

daykx commented 3 months ago

Please try to move the contents of a folder named %localappdata%\Programs\WingetUI\choco-cli to %localappdata%\UniGetUI\Chocolatey and delete the choco-cli folder

Done, regardless of running as administrator now there is no error about migrating and I can search for Chocolatey packages on "Discover Packages", but on "Software Updates" section still there is no updates for my Chocolatey apps.

Found 0 installed packages from Chocolatey I see in UniGetUI log, but I had a lot of them before 3.1.0

marticliment commented 3 months ago

Please share the Verbose Chocolatey logs

daykx commented 3 months ago

Is this at "Package Manager Logs / Chocolatey (Verbose)", right?

Manager Chocolatey with version:
2.2.2

——————————————————————————————————————————

Logged subprocess-based task on manager Chocolatey. Task type is ListSources
Subprocess executable: "C:\Users\daykr\AppData\Local\UniGetUI\Chocolatey\choco.exe"
Command-line arguments: " source list"
Process start time: 04.07.2024 1:03:57
Process end time:   04.07.2024 1:03:58

-- Process STDOUT
  Chocolatey v2.2.2
  chocolatey - https://community.chocolatey.org/api/v2/ | Priority 0|Bypass Proxy - False|Self-Service - False|Admin Only - False.

Return code: SUCCESS (0)

——————————————————————————————————————————

Logged subprocess-based task on manager Chocolatey. Task type is ListUpdates
Subprocess executable: "C:\Users\daykr\AppData\Local\UniGetUI\Chocolatey\choco.exe"
Command-line arguments: " outdated"
Process start time: 04.07.2024 1:03:59
Process end time:   04.07.2024 1:04:00

-- Process STDOUT
  Chocolatey v2.2.2
  Outdated Packages
   Output is package name | current version | available version | pinned?
  Chocolatey has determined 0 package(s) are outdated. 

Return code: SUCCESS (0)

——————————————————————————————————————————

Logged subprocess-based task on manager Chocolatey. Task type is ListPackages
Subprocess executable: "C:\Users\daykr\AppData\Local\UniGetUI\Chocolatey\choco.exe"
Command-line arguments: " list"
Process start time: 04.07.2024 1:03:59
Process end time:   04.07.2024 1:04:00

-- Process STDOUT
  Chocolatey v2.2.2
  0 packages installed.

Return code: SUCCESS (0)

——————————————————————————————————————————

Logged subprocess-based task on manager Chocolatey. Task type is ListSources
Subprocess executable: "C:\Users\daykr\AppData\Local\UniGetUI\Chocolatey\choco.exe"
Command-line arguments: " source list"
Process start time: 04.07.2024 1:03:59
Process end time:   04.07.2024 1:04:00

-- Process STDOUT
  Chocolatey v2.2.2
  chocolatey - https://community.chocolatey.org/api/v2/ | Priority 0|Bypass Proxy - False|Self-Service - False|Admin Only - False.

Return code: SUCCESS (0)

——————————————————————————————————————————
marticliment commented 3 months ago

Yes

marticliment commented 3 months ago

please run echo %chocolateyinstall% on a command prompt window

daykx commented 3 months ago

It's C:\ProgramData\chocolatey

Just in case, I tried to check "Use system Chocolatey" in options, restarted, but result is the same - "Found 0 installed packages from Chocolatey". And re-checked at ChocolateyGUI - there still are all my installed choco apps.

marticliment commented 3 months ago

Ok, please downgrade to 3.0.2 until I can find the root cause of this issue.

daykx commented 3 months ago

Yep, Chocolatey packages are back after downgrade

mrjoecat commented 3 months ago

I can confirm this behavior. No chocolatey packages are shown when I unset "Use system chocolatey". They only will show up, when I set this option. Additionally, the packages of my individually added sources don't show up, even if I use the chocolatey version shipped with UniGetUI. Everything works fine with WingetUI 3.0.2

Manut38 commented 3 months ago

I can further confirm that I was able to observe this behavior since the first 3.1.0-alpha0.

baltimoresports commented 2 months ago

Ok, please downgrade to 3.0.2 until I can find the root cause of this issue.

Tricky because once I install 3.0.2, even with "Automatically Update Winget" option unchecked, a green banner pops up and says that it will upgrade to 3.1.0 as soon as I close.

marticliment commented 2 months ago

Hello, please follow this guide in order to downgrade WingetUI

marticliment commented 2 months ago

Hello,

Please try this beta release, which should have this issue fixed: https://github.com/marticliment/UniGetUI/releases/tag/3.1.1-beta1

Direct downloadm URL: https://github.com/marticliment/UniGetUI/releases/download/3.1.1-beta1/UniGetUI.Installer.exe

Please let me know if the issue gets resolved or not

CypherNL commented 2 months ago

The issue is fixed! I still see one issue in the logs however, but i don't think it's related to the issue and might be related to my Chocolatey config.

Manager Chocolatey with version:
This is try 1/3. Retrying after 400 milliseconds.
 Error converted to warning:
 Access to the path 'C:\ProgramData\chocolatey\config\chocolatey.config.4156.update' is denied.
This is try 2/3. Retrying after 600 milliseconds.
 Error converted to warning:
 Access to the path 'C:\ProgramData\chocolatey\config\chocolatey.config.4156.update' is denied.
Maximum tries of 3 reached. Throwing error.
2.3.0
mrjoecat commented 2 months ago

Issues are fixed for me as well. Thank you! 🥇

difens commented 2 months ago

While the problem is gone when using system Chocolatey, I said in Issue #2425 (which was closed as a duplicate of this one) that Chocolatey bundled with UnigetUI does not work and it still does not work in newest beta. I'll be using system chocolatey for now. Thanks.