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.04k stars 404 forks source link

[BUG] Installation Options are not retained when saving a Package Bundle #2696

Open ninbura opened 1 week ago

ninbura commented 1 week ago

Please confirm these before moving forward

UniGetUI Version

3.1.1

Windows version, edition, and architecture

Windows 11 Pro N for Workstations 23H2 22631.4112 x64

Describe your issue

Installation Options are not retained when saving a Package Bundle.

Steps to reproduce the issue

  1. Create a package bundle, or open an existing one.
  2. Modify Installation Options on a package in the bundle.
  3. Save the bundle.
  4. Verify that Installation options are not saved in the .json file.

UniGetUI Log

[2024/09/02 20:23:08]    __  __      _ ______     __  __  ______
                        / / / /___  (_) ____/__  / /_/ / / /  _/
                       / / / / __ \/ / / __/ _ \/ __/ / / // /
                      / /_/ / / / / / /_/ /  __/ /_/ /_/ // /
                      \____/_/ /_/_/\____/\___/\__/\____/___/
                          Welcome to UniGetUI Version 3.1.1
[2024/09/02 20:23:08]
[2024/09/02 20:23:08] Version Code:  3.11
[2024/09/02 20:23:08] Encoding Code Page set to 437
[2024/09/02 20:23:09] Using bundled GSudo at C:\Program Files\WingetUI\Assets\Utilities\gsudo.exe
[2024/09/02 20:23:09] Loaded language locale: en
[2024/09/02 20:23:10] Randomly-generated background API auth token for the current session: oyvgpvodskqz617glr310oi89264r2enk369o50aex4g9y555qstc6aqmuae5i8r
[2024/09/02 20:23:10] Api running on http://localhost:7058
[2024/09/02 20:23:11] Lang files were updated successfully from GitHub
[2024/09/02 20:23:11] UniGetUI is up to date
[2024/09/02 20:23:11] Downloaded new icons and screenshots successfully!
[2024/09/02 20:23:11] Command npm was not found on the system
[2024/09/02 20:23:11] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                      █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                      █ Name: Npm
                      █ Enabled: False
                      █ THE MANAGER IS DISABLED
                      ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[2024/09/02 20:23:11] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                      █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                      █ Name: .NET Tool
                      █ Enabled: False
                      █ THE MANAGER IS DISABLED
                      ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[2024/09/02 20:23:11] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                      █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                      █ Name: PowerShell
                      █ Enabled: False
                      █ THE MANAGER IS DISABLED
                      ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[2024/09/02 20:23:12] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                      █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                      █ Name: Pip
                      █ Enabled: False
                      █ THE MANAGER IS DISABLED
                      ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[2024/09/02 20:23:12] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                      █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                      █ Name: Chocolatey
                      █ Enabled: False
                      █ THE MANAGER IS DISABLED
                      ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[2024/09/02 20:23:12] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                      █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                      █ Name: Winget
                      █ Enabled: True
                      █ Found: True
                      █ Fancy exe name: winget.exe
                      █ Executable path: C:\Users\gabri\AppData\Local\Microsoft\WindowsApps\winget.exe
                      █ Call arguments: 
                      █ Version: 
                      █   System WinGet CLI Version: v1.8.1911
                      █   Microsoft.WinGet.Client PSModule version: ""
                      █   Using Native WinGet helper (COM Api)
                      ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[2024/09/02 20:23:12] Command scoop was not found on the system
[2024/09/02 20:23:12] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                      █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                      █ Name: Scoop
                      █ Enabled: False
                      █ THE MANAGER IS DISABLED
                      ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[2024/09/02 20:23:12] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                      █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                      █ Name: PowerShell7
                      █ Enabled: False
                      █ THE MANAGER IS DISABLED
                      ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[2024/09/02 20:23:13] Microsoft.Powershell.Client detection has been forcefully skipped as the module is not required on the current context
[2024/09/02 20:23:13] Dependency WinGet PowerShell Module for manager Winget is present
[2024/09/02 20:23:13] LoadComponentsAsync finished executing. All managers loaded. Proceeding to interface.
[2024/09/02 20:23:15] Found 2 available updates from Winget
[2024/09/02 20:23:16] Found 179 installed packages from Winget
[2024/09/02 20:24:52] Found 179 installed packages from Winget
[2024/09/02 20:27:41] Registering package Rufus.Rufus from manager Winget: winget
[2024/09/02 20:27:41] Non-MSStore WinGet Native Icons have been forcefully disabled on code
[2024/09/02 20:27:41] Loaded icon with URL=UniGetUI.Core.IconEngine.CacheableIcon for package Id=Rufus.Rufus
[2024/09/02 20:27:41] Icon for package Rufus.Rufus stored on C:\Users\gabri\AppData\Local\UniGetUI\CachedMedia\Winget\Rufus.Rufus.png

Package Managers Logs

Manager WinGet with version:
System WinGet CLI Version: v1.8.1911
Microsoft.WinGet.Client PSModule version: ""
Using Native WinGet helper (COM Api)

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

Logged native task on manager Winget. Task type is ListSources
Process start time: 2024/09/02 20:23:12
Process end time:   2024/09/02 20:23:12

-- Task information
 ...

The task reported success

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

Logged subprocess-based task on manager Winget. Task type is RefreshIndexes
Subprocess executable: "C:\Users\gabri\AppData\Local\Microsoft\WindowsApps\winget.exe"
Command-line arguments: " source update --disable-interactivity"
Process start time: 2024/09/02 20:23:12
Process end time:   2024/09/02 20:23:13

-- Process STDOUT
 ...

Return code: SUCCESS (0)

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

Logged native task on manager Winget. Task type is ListInstalledPackages
Process start time: 2024/09/02 20:23:12
Process end time:   2024/09/02 20:23:16

-- Task information
 ...

The task reported success

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

Logged native task on manager Winget. Task type is ListSources
Process start time: 2024/09/02 20:23:13
Process end time:   2024/09/02 20:23:13

-- Task information
 ...

The task reported success

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

Logged native task on manager Winget. Task type is ListUpdates
Process start time: 2024/09/02 20:23:13
Process end time:   2024/09/02 20:23:15

-- Task information
 ...

The task reported success

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

Logged native task on manager Winget. Task type is ListInstalledPackages
Process start time: 2024/09/02 20:24:50
Process end time:   2024/09/02 20:24:52

-- Task information
 ...

The task reported success

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

Logged native task on manager Winget. Task type is LoadPackageVersions
Process start time: 2024/09/02 20:27:49
Process end time:   2024/09/02 20:27:49

-- Task information
 ...

The task reported success

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

Logged native task on manager Winget. Task type is LoadPackageVersions
Process start time: 2024/09/02 20:28:21
Process end time:   2024/09/02 20:28:21

-- Task information
 ...

The task reported success

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

Logged native task on manager Winget. Task type is LoadPackageVersions
Process start time: 2024/09/02 20:28:28
Process end time:   2024/09/02 20:28:28

-- Task information
 ...

The task reported success

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

Logged native task on manager Winget. Task type is LoadPackageVersions
Process start time: 2024/09/02 20:29:01
Process end time:   2024/09/02 20:29:01

-- Task information
 ...

The task reported success

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

Logged native task on manager Winget. Task type is LoadPackageVersions
Process start time: 2024/09/02 20:29:10
Process end time:   2024/09/02 20:29:10

-- Task information
 ...

The task reported success

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

Logged native task on manager Winget. Task type is LoadPackageVersions
Process start time: 2024/09/02 20:29:31
Process end time:   2024/09/02 20:29:31

-- Task information
 ...

The task reported success

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

Logged native task on manager Winget. Task type is LoadPackageVersions
Process start time: 2024/09/02 20:29:38
Process end time:   2024/09/02 20:29:38

-- Task information
 ...

The task reported success

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

Logged native task on manager Winget. Task type is LoadPackageVersions
Process start time: 2024/09/02 20:30:33
Process end time:   2024/09/02 20:30:33

-- Task information
 ...

The task reported success

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

Logged native task on manager Winget. Task type is LoadPackageVersions
Process start time: 2024/09/02 20:30:43
Process end time:   2024/09/02 20:30:43

-- Task information
 ...

The task reported success

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

Logged native task on manager Winget. Task type is LoadPackageVersions
Process start time: 2024/09/02 20:31:03
Process end time:   2024/09/02 20:31:03

-- Task information
 ...

The task reported success

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

Logged native task on manager Winget. Task type is LoadPackageVersions
Process start time: 2024/09/02 20:31:07
Process end time:   2024/09/02 20:31:07

-- Task information
 ...

The task reported success

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

Logged native task on manager Winget. Task type is LoadPackageVersions
Process start time: 2024/09/02 20:31:35
Process end time:   2024/09/02 20:31:35

-- Task information
 ...

The task reported success

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

Relevant information

Screenshots and videos

https://github.com/user-attachments/assets/e977b033-a7eb-4455-ad66-92502f70bde6

ninbura commented 1 week ago

Retested thoroughly on v3.1.2-beta0 and it appears that "Run as admin" / RunAsAdministrator will sometimes save to the Package Bundle .json file, but not always. I can't get "Custom arguments" / CustomParameters to stick no matter what I do though.

marticliment commented 1 week ago

What is your failing procedure?. 3.1.2-beta0 had indeed improvements in this field

ninbura commented 1 week ago

What I'm actually trying to do is set --Location Documents as "Custom arguments" on the Rufus.Rufus winget package.

Neither "Custom arguments" or "Install location" propagate to the .json file when set via the GUI. However, it would appear that if I manually set the properties that represent these values in the .json file they now propagate from the .json to the GUI in v3.1.2-beta0.

I doubt that these options are tied internally within the logic/code, but just in-case they are; it's worth mentioning that "Install location" isn't viable for my use case. I need the Documents directory to be user agnostic, which can't be accomplished with an absolute path.

marticliment commented 1 week ago

The scenario you are presenting works perfectly for me, I can't reproduce the issue

ninbura commented 1 week ago

Are you applying the installation options after adding the package to the bundle? I think that may be when the issue occurs.

Video demonstration on v3.1.2-beta0 below:

https://github.com/user-attachments/assets/83b48bdc-a6cb-4b8b-a57b-2d39d5fde753

marticliment commented 1 week ago

Yes, when a package is added to a bundle, its installation options become independent from the options of the installed package.

ninbura commented 1 week ago

As per my last video example, Installation Options set in the Package Bundle tab do not propagate to the .json file on my system.

steps to reproduce

  1. Navigate to the "Package Bundles" tab.
  2. Click "New bundle".
  3. Navigate to the "Discover Packages" tab.
  4. Search for a new application.
  5. Verify that said application does not already have custom Installation Options set while on the "Discover Packages" tab.
  6. Add the application to the new bundle.
  7. Navigate to the "Package Bundles" tab.
  8. Add --Location Documents to the "Custom arguments" field within the package's Installation Options while on the Package Bundles tab.
  9. Save the bundle to your desktop.
  10. Open said bundle in your text editor of choice.

video example

https://github.com/user-attachments/assets/e6acd003-f16b-4a34-a719-5ae6fc52e9b2

marticliment commented 1 week ago

When you are on the package bundled page and open the Installation Options again, are the options still there or they have vanished?

ninbura commented 1 week ago

They're present until I re-load the bundle. You can see me double check the options in the GUI before I save the bundle in the video below.

https://github.com/user-attachments/assets/e2c6d44b-40c5-4661-9976-17811846084c

marticliment commented 1 week ago

After doing this, do your logs show anything weird?

Please share your UniGetUI logs with Verbose 5 level