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
13.35k stars 460 forks source link

[BUG] UniGet doesn't pass paths to installers wrapped in quotes. Causes failure. #2956

Closed YouveGotMeowxy closed 2 weeks ago

YouveGotMeowxy commented 2 weeks ago

Please confirm these before moving forward

UniGetUI Version

3.13

Windows version, edition, and architecture

Both win10 and win11

Describe your issue

My Windows user name has a space in it. "Olympus Machine". The log UG log shows it's full path properly:

Process Executable : C:\Users\Olympus Machine\AppData\Local\Microsoft\WindowsApps\winget.exe

Working Directory: C:\Users\Olympus Machine

However, when passing that path to an installer, in this case Logi Options+ it's not passing that path wrapped in double quotes, so the installer thinks the path is actually:

C:\Users\Olympus

and thus fails installation.

image

image

Steps to reproduce the issue

Install the above mentioned app and try it yourself. :)~

UniGetUI Log

[Sat 11 9 2024 6:15:25 PM]    __  __      _ ______     __  __  ______
                             / / / /___  (_) ____/__  / /_/ / / /  _/
                            / / / / __ \/ / / __/ _ \/ __/ / / // /
                           / /_/ / / / / / /_/ /  __/ /_/ /_/ // /
                           \____/_/ /_/_/\____/\___/\__/\____/___/
                               Welcome to UniGetUI Version 3.1.3
[Sat 11 9 2024 6:15:25 PM]
[Sat 11 9 2024 6:15:25 PM] Version Code:  3.13001
[Sat 11 9 2024 6:15:25 PM] Encoding Code Page set to 437
[Sat 11 9 2024 6:15:26 PM] Deleting old Chocolatey directory C:\Users\Olympus Machine\.wingetui
[Sat 11 9 2024 6:15:26 PM] Using bundled GSudo at C:\Program Files\UniGetUI\Assets\Utilities\gsudo.exe
[Sat 11 9 2024 6:15:26 PM] User has updated translations disabled
[Sat 11 9 2024 6:15:26 PM] Loaded language locale: en
[Sat 11 9 2024 6:15:26 PM] Deleting old Chocolatey directory C:\Users\Olympus Machine\AppData\Local\WingetUI\CachedData
[Sat 11 9 2024 6:15:27 PM] Randomly-generated background API auth token for the current session: lep394rukux4t0ugpkqy59v1tt57ix9l5434yeoegofza8djr62ivvjr80o54mch
[Sat 11 9 2024 6:15:27 PM] Api running on http://localhost:7058
[Sat 11 9 2024 6:15:27 PM] UniGetUI is up to date
[Sat 11 9 2024 6:15:27 PM] Downloaded new icons and screenshots successfully!
[Sat 11 9 2024 6:15:27 PM] Command cargo was not found on the system
[Sat 11 9 2024 6:15:27 PM] _____________________________________________
                           ¦¯¯¯¯¯¯¯¯¯¯¯¯¯ MANAGER LOADED ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
                           ¦ Name: Cargo
                           ¦ Enabled: True
                           ¦ Found: False
                           ¦ THE MANAGER WAS NOT FOUND. PERHAPS IT IS NOT 
                           ¦ INSTALLED OR IT HAS BEEN MISCONFIGURED 
                           ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
[Sat 11 9 2024 6:15:27 PM] Command npm was not found on the system
[Sat 11 9 2024 6:15:27 PM] _____________________________________________
                           ¦¯¯¯¯¯¯¯¯¯¯¯¯¯ MANAGER LOADED ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
                           ¦ Name: Npm
                           ¦ Enabled: True
                           ¦ Found: False
                           ¦ THE MANAGER WAS NOT FOUND. PERHAPS IT IS NOT 
                           ¦ INSTALLED OR IT HAS BEEN MISCONFIGURED 
                           ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
[Sat 11 9 2024 6:15:27 PM] _____________________________________________
                           ¦¯¯¯¯¯¯¯¯¯¯¯¯¯ MANAGER LOADED ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
                           ¦ Name: PowerShell
                           ¦ Enabled: False
                           ¦ THE MANAGER IS DISABLED
                           ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
[Sat 11 9 2024 6:15:28 PM] _____________________________________________
                           ¦¯¯¯¯¯¯¯¯¯¯¯¯¯ MANAGER LOADED ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
                           ¦ Name: .NET Tool
                           ¦ Enabled: True
                           ¦ Found: True
                           ¦ Fancy exe name: dotnet tool
                           ¦ Executable path: C:\Program Files\dotnet\dotnet.exe
                           ¦ Call arguments: tool
                           ¦ Version: 
                           ¦   8.0.403
                           ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
[Sat 11 9 2024 6:15:28 PM] _____________________________________________
                           ¦¯¯¯¯¯¯¯¯¯¯¯¯¯ MANAGER LOADED ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
                           ¦ Name: Pip
                           ¦ Enabled: True
                           ¦ Found: True
                           ¦ Fancy exe name: pip
                           ¦ Executable path: G:\Python\311\python.exe
                           ¦ Call arguments:  -m pip
                           ¦ Version: 
                           ¦   pip 24.3.1 from G:\Python\311\Lib\site-packages\pip (python 3.11)
                           ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
[Sat 11 9 2024 6:15:28 PM] _____________________________________________
                           ¦¯¯¯¯¯¯¯¯¯¯¯¯¯ MANAGER LOADED ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
                           ¦ Name: Winget
                           ¦ Enabled: True
                           ¦ Found: True
                           ¦ Fancy exe name: winget.exe
                           ¦ Executable path: C:\Users\Olympus Machine\AppData\Local\Microsoft\WindowsApps\winget.exe
                           ¦ Call arguments: 
                           ¦ Version: 
                           ¦   System WinGet CLI Version: v1.9.25180
                           ¦   Using Native WinGet helper (COM Api)
                           ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
[Sat 11 9 2024 6:15:30 PM] _____________________________________________
                           ¦¯¯¯¯¯¯¯¯¯¯¯¯¯ MANAGER LOADED ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
                           ¦ Name: Chocolatey
                           ¦ Enabled: True
                           ¦ Found: True
                           ¦ Fancy exe name: choco.exe
                           ¦ Executable path: C:\Users\Olympus Machine\AppData\Local\UniGetUI\Chocolatey\choco.exe
                           ¦ Call arguments: 
                           ¦ Version: 
                           ¦   2.2.2
                           ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
[Sat 11 9 2024 6:15:31 PM] _____________________________________________
                           ¦¯¯¯¯¯¯¯¯¯¯¯¯¯ MANAGER LOADED ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
                           ¦ Name: Scoop
                           ¦ Enabled: True
                           ¦ Found: True
                           ¦ Fancy exe name: scoop
                           ¦ Executable path: C:\WINDOWS\system32\windowspowershell\v1.0\powershell.exe
                           ¦ Call arguments:  -NoProfile -ExecutionPolicy Bypass -Command scoop
                           ¦ Version: 
                           ¦   Current Scoop version:
                           ¦   859d1db5 chore(release): Bump to version 0.5.2 (#6080)
                           ¦   
                           ¦   'main' bucket:
                           ¦   a365349df tflint: Update to version 0.54.0
                           ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
[Sat 11 9 2024 6:15:31 PM] _____________________________________________
                           ¦¯¯¯¯¯¯¯¯¯¯¯¯¯ MANAGER LOADED ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
                           ¦ Name: PowerShell7
                           ¦ Enabled: True
                           ¦ Found: True
                           ¦ Fancy exe name: pwsh.exe
                           ¦ Executable path: C:\Program Files\PowerShell\7\pwsh.exe
                           ¦ Call arguments:  -NoProfile -Command
                           ¦ Version: 
                           ¦   PowerShell 7.4.6
                           ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
[Sat 11 9 2024 6:15:31 PM] LoadComponentsAsync finished executing. All managers loaded. Proceeding to interface.
[Sat 11 9 2024 6:15:32 PM] Resetting administrator rights cache for process id 8184
[Sat 11 9 2024 6:15:32 PM] Found 7 installed packages from Pip
[Sat 11 9 2024 6:15:33 PM] Found 1 installed packages from .NET Tool
[Sat 11 9 2024 6:15:34 PM] Found 0 installed packages from Chocolatey
[Sat 11 9 2024 6:15:34 PM] Found 0 available updates from .NET Tool
[Sat 11 9 2024 6:15:34 PM] Found 0 available updates from Chocolatey
[Sat 11 9 2024 6:15:35 PM] Dependency Scoop-Search for manager Scoop is present
[Sat 11 9 2024 6:15:35 PM] Ignored updates database was never loaded, so it is going to be loaded now
[Sat 11 9 2024 6:15:35 PM] Found 1 installed packages from Scoop
[Sat 11 9 2024 6:15:35 PM] Found 0 available updates from Pip
[Sat 11 9 2024 6:15:35 PM] Dependency Git for manager Scoop is present
[Sat 11 9 2024 6:15:35 PM] Dependency .NET Tools Outdated for manager .NET Tool is present
[Sat 11 9 2024 6:15:38 PM] Found 5 installed packages from PowerShell7
[Sat 11 9 2024 6:15:39 PM] Found 11 available updates from Winget
[Sat 11 9 2024 6:15:39 PM] Found 177 installed packages from Winget
[Sat 11 9 2024 6:15:40 PM] Backup saved to E:\Backups\Misc\UnigetUI\UniGet-Installed-List-(OC) 2024-11-09 18-15-40.ubundle
[Sat 11 9 2024 6:15:40 PM] Found 1 installed packages from Scoop
[Sat 11 9 2024 6:15:44 PM] Found 0 available updates from Scoop
[Sat 11 9 2024 6:15:44 PM] Found 1 available updates from PowerShell7
[Sat 11 9 2024 6:15:53 PM] Loaded operation parameters for package id=Logitech.OptionsPlus on manager Winget and operation Update: update --id "Logitech.OptionsPlus" --exact --source winget --accept-source-agreements --disable-interactivity --interactive  --include-unknown --accept-package-agreements --force

Package Managers Logs

Manager WinGet with version:
System WinGet CLI Version: v1.9.25180
Using Native WinGet helper (COM Api)

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

Logged native task on manager Winget. Task type is ListSources
Process start time: Sat 11 9 2024 6:15:28 PM
Process end time:   Sat 11 9 2024 6:15:28 PM

-- Task information
 ...

The task reported success

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

Logged subprocess-based task on manager Winget. Task type is RefreshIndexes
Subprocess executable: "C:\Users\Olympus Machine\AppData\Local\Microsoft\WindowsApps\winget.exe"
Command-line arguments: " source update --disable-interactivity"
Process start time: Sat 11 9 2024 6:15:31 PM
Process end time:   Sat 11 9 2024 6:15:32 PM

-- Process STDOUT
 ...

Return code: SUCCESS (0)

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

Logged native task on manager Winget. Task type is ListInstalledPackages
Process start time: Sat 11 9 2024 6:15:31 PM
Process end time:   Sat 11 9 2024 6:15:39 PM

-- Task information
 ...

The task reported success

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

Logged native task on manager Winget. Task type is ListUpdates
Process start time: Sat 11 9 2024 6:15:32 PM
Process end time:   Sat 11 9 2024 6:15:39 PM

-- Task information
 ...

The task reported success

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

Logged native task on manager Winget. Task type is ListSources
Process start time: Sat 11 9 2024 6:15:33 PM
Process end time:   Sat 11 9 2024 6:15:33 PM

-- Task information
 ...

The task reported success

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

Relevant information

Seems like a pretty simple fix; just pass the path to the installers wrapped in double quotes.

Screenshots and videos

No response

marticliment commented 2 weeks ago

Can you please share the Command-line output of the failed operation?

YouveGotMeowxy commented 2 weeks ago

Can you please share the Command-line output of the failed operation?

Happy to. How do I find it? lol

The only feedback I received from the installation was in that popup dialog. And then I also pasted the 2 log files.

marticliment commented 2 weeks ago

image Clicking here will reveal the command-line output

YouveGotMeowxy commented 2 weeks ago

Oops! Sorry I missed that. lol

Starting package update operation for package id=Logitech.OptionsPlus with Manager name=Winget
Given installation options are <InstallationOptions: SkipHashCheck=False;InteractiveInstallation=True;RunAsAdministrator=False;Version=;Architecture=;InstallationScope=;InstallationScope=;CustomParameters=;RemoveDataOnUninstall=False>
Process Executable     : C:\Users\Olympus Machine\AppData\Local\Microsoft\WindowsApps\winget.exe
Process Call Arguments :  update --id "Logitech.OptionsPlus" --exact --source winget --accept-source-agreements --disable-interactivity --interactive  --include-unknown --accept-package-agreements --force
Working Directory      : C:\Users\Olympus Machine
Process Start Time     : Sat 11 9 2024 6:35:08 PM
-
-
\
|
Found Logi Options+ [Logitech.OptionsPlus] Version 1.84.641293
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
This package requires the following dependencies:
- Packages
Microsoft.VCRedist.2015+.x64
Successfully verified installer hash
Starting package install...
The installer will request to run as administrator, expect a prompt.
-
\
|
/
-
\
|
/
-
Installer failed with exit code: 87
Process Exit Code      : -1978335226
Process End Time       : Sat 11 9 2024 6:35:14 PM
marticliment commented 2 weeks ago

can you reproduce this issue via running winget.exe update --id "Logitech.OptionsPlus" --exact --source winget --accept-source-agreements --disable-interactivity --interactive --include-unknown --accept-package-agreements --force?

YouveGotMeowxy commented 2 weeks ago

Noticing the above log says it's expecting Admin, I just tried running the update as Admin, and it shows a different error, but still based on the same issue of the Windows user name having a space in it:

In the dialog window it now shows:

"Machine\AppData\Local\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir\WinGet-Logitech.OptionsPlus.1.84.641293-2024-11-09-18-39-01.923.log" is an invalid argument. Type /help to see the list of valid arguments.

and the Output:

Starting package update operation for package id=Logitech.OptionsPlus with Manager name=Winget
Given installation options are <InstallationOptions: SkipHashCheck=False;InteractiveInstallation=True;RunAsAdministrator=True;Version=;Architecture=;InstallationScope=;InstallationScope=;CustomParameters=;RemoveDataOnUninstall=False>
Process Executable     : C:\Program Files\UniGetUI\Assets\Utilities\gsudo.exe
Process Call Arguments : "C:\Users\Olympus Machine\AppData\Local\Microsoft\WindowsApps\winget.exe"  update --id "Logitech.OptionsPlus" --exact --source winget --accept-source-agreements --disable-interactivity --interactive  --include-unknown --accept-package-agreements --force
Working Directory      : C:\Users\Olympus Machine
Process Start Time     : Sat 11 9 2024 6:38:59 PM
-
-
\
|
Found Logi Options+ [Logitech.OptionsPlus] Version 1.84.641293
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
This package requires the following dependencies:
- Packages
Microsoft.VCRedist.2015+.x64
Successfully verified installer hash
Starting package install...
-
\
|
/
-
\
|
/
-
\
|
/
-
\
|
/
-
\
|
/
-
\
|
/
-
\
|
/
-
\
|
/
-
\
|
/
-
\
|
/
-
\
|
/
-
\
|
/
-
\
|
/
-
Installer failed with exit code: 87
Process Exit Code      : -1978335226
Process End Time       : Sat 11 9 2024 6:39:15 PM
YouveGotMeowxy commented 2 weeks ago

can you reproduce this issue via running winget.exe update --id "Logitech.OptionsPlus" --exact --source winget --accept-source-agreements --disable-interactivity --interactive --include-unknown --accept-package-agreements --force?

Yes, it did the exact same thing when manually run via the command-line:

C:\Users\Olympus Machine>winget.exe update --id "Logitech.OptionsPlus" --exact --source winget --accept-source-agreements --disable-interactivity --interactive  --include-unknown --accept-package-agreements --force
Found Logi Options+ [Logitech.OptionsPlus] Version 1.84.641293
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
This package requires the following dependencies:
  - Packages
      Microsoft.VCRedist.2015+.x64
Successfully verified installer hash
Starting package install...
Installer failed with exit code: 87
YouveGotMeowxy commented 2 weeks ago

Google-Fu is telling me exit code 87 is a parameter error.

marticliment commented 2 weeks ago

Then I am afraid the issue is caused by WinGet, and not by UniGetUI. What happens is that UniGetU calls WinGet with certain parameters, which at its point makes WinGet call the actual installer with the appropiate parameters so the program gets installer. However, it seems the package is misconfigured, and you should report this to microsoft/winget-pkgs

YouveGotMeowxy commented 2 weeks ago

Then I am afraid the issue is caused by WinGet, and not by UniGetUI. What happens is that UniGetU calls WinGet with certain parameters, which at its point makes WinGet call the actual installer with the appropiate parameters so the program gets installer. However, it seems the package is misconfigured, and you should report this to microsoft/winget-pkgs

ok, tyvm for investigating the issue. 2 quick questions:

marticliment commented 2 weeks ago
  • Just out of curiosity, do you already currently pass the path to the other apps wrapped in quotes?

The command I asked you to run on a terminal is the command UniGetUI passes to WinGet.

  • Is this a Winget issue, or an issue with Logitech's installer?

This is likely to be an issue with how the Logitech Installer has been published to WinGet