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
10.32k stars 338 forks source link

[BUG] Scoop Sources: System.FormatException: The input string 'AM' was not in a correct format. #1905

Closed RonnyTNL closed 3 months ago

RonnyTNL commented 3 months ago

Please confirm these before moving forward

Describe your issue

System.FormatException: The input string 'AM' was not in a correct format.

Steps to reproduce the issue

Started after upgrade from 3.0.0 Beta1 -> stable.

WingetUI Log

▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
█▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
█ Name: Chocolatey
█ Enabled: True
█ Found: True
█ Fancye exe name: choco.exe
█ Executable path: C:\Program Files\WingetUI\choco-cli\bin\choco.exe
█ Call arguments: 
█ Version: 
█   2.2.2
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
System.FormatException: The input string 'AM' was not in a correct format.
   at System.Number.ThrowFormatException[TChar](ReadOnlySpan`1 value)
   at System.Int32.Parse(String s)
   at ModernWindow.PackageEngine.Managers.Scoop.GetSources_UnSafe() in Y:\WingetUI-Store\src\wingetui\PackageEngine\Managers\Scoop.cs:line 408

And at the bottom;

LoadComponentsAsync finished executing. All managers loaded. Proceeding to interface.
System.FormatException: The input string 'AM' was not in a correct format.
   at System.Number.ThrowFormatException[TChar](ReadOnlySpan`1 value)
   at System.Int32.Parse(String s)
   at ModernWindow.PackageEngine.Managers.Scoop.GetSources_UnSafe() in Y:\WingetUI-Store\src\wingetui\PackageEngine\Managers\Scoop.cs:line 408
Unknown source!
Unknown source!
Unknown PowerShell source!

Package Managers Logs

N/A

Relevant information

No response

Screenshots and videos

No response

marticliment commented 3 months ago

Please share your Package Manager Logs

RonnyTNL commented 3 months ago
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
█▀▀▀▀▀▀▀▀▀ [13/03/2024 15:17:55] Winget ▀▀▀▀▀▀▀▀▀▀▀
█  Executable: C:\Program Files\WingetUI\PackageEngine\Managers\winget-cli_x64\winget.exe
█  Arguments:  source list
Name    Argument
-----------------------------------------------------
msstore https://storeedgefd.dsx.mp.microsoft.com/v9.0
winget  https://cdn.winget.microsoft.com/cache
[13/03/2024 15:17:55] Exit Code: 0
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
█▀▀▀▀▀▀▀▀▀ [13/03/2024 15:17:58] Chocolatey ▀▀▀▀▀▀▀▀▀▀▀
█  Executable: C:\Program Files\WingetUI\choco-cli\bin\choco.exe
█  Arguments:  source list
Chocolatey v2.2.2
chocolatey - https://community.chocolatey.org/api/v2/ | Priority 0|Bypass Proxy - False|Self-Service - False|Admin Only - False.
[13/03/2024 15:17:58] Exit Code: 0
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
█▀▀▀▀▀▀▀▀▀ [13/03/2024 15:18:00] Scoop ▀▀▀▀▀▀▀▀▀▀▀
█  Executable: C:\WINDOWS\system32\windowspowershell\v1.0\powershell.exe
█  Arguments: -NoProfile -ExecutionPolicy Bypass -Command scoop bucket list
Name Source                                 Updated              Manifests
---- ------                                 -------              ---------
main https://github.com/ScoopInstaller/Main 3/13/2024 1:30:34 PM      1310
[13/03/2024 15:18:00] Exit Code: 0
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
█▀▀▀▀▀▀▀▀▀ [13/03/2024 15:18:01] PowerShell ▀▀▀▀▀▀▀▀▀▀▀
█  Executable: C:\WINDOWS\system32\windowspowershell\v1.0\powershell.exe
█  Arguments: -NoProfile -Command Get-PSRepository
Name                      InstallationPolicy   SourceLocation                                                          
----                      ------------------   --------------                                                          
PSGallery                 Untrusted            https://www.powershellgallery.com/api/v2                                
[13/03/2024 15:18:01] Exit Code: 0
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
█▀▀▀▀▀▀▀▀▀ [13/03/2024 15:18:03] Winget ▀▀▀▀▀▀▀▀▀▀▀
█  Executable: C:\Program Files\WingetUI\PackageEngine\Managers\winget-cli_x64\winget.exe
█  Arguments:  source list
Name    Argument
-----------------------------------------------------
msstore https://storeedgefd.dsx.mp.microsoft.com/v9.0
winget  https://cdn.winget.microsoft.com/cache
[13/03/2024 15:18:03] Exit Code: 0
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
█▀▀▀▀▀▀▀▀▀ [13/03/2024 15:18:06] Chocolatey ▀▀▀▀▀▀▀▀▀▀▀
█  Executable: C:\Program Files\WingetUI\choco-cli\bin\choco.exe
█  Arguments:  source list
Chocolatey v2.2.2
chocolatey - https://community.chocolatey.org/api/v2/ | Priority 0|Bypass Proxy - False|Self-Service - False|Admin Only - False.
[13/03/2024 15:18:06] Exit Code: 0
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
█▀▀▀▀▀▀▀▀▀ [13/03/2024 15:18:10] Chocolatey ▀▀▀▀▀▀▀▀▀▀▀
█  Executable: C:\Program Files\WingetUI\choco-cli\bin\choco.exe
█  Arguments:  outdated
Chocolatey v2.2.2
Outdated Packages
 Output is package name | current version | available version | pinned?
Chocolatey has determined 0 package(s) are outdated. 
[13/03/2024 15:18:10] Exit Code: 0
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
█▀▀▀▀▀▀▀▀▀ [13/03/2024 15:18:10] Chocolatey ▀▀▀▀▀▀▀▀▀▀▀
█  Executable: C:\Program Files\WingetUI\choco-cli\bin\choco.exe
█  Arguments:  list
Chocolatey v2.2.2
0 packages installed.
[13/03/2024 15:18:10] Exit Code: 0
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
█▀▀▀▀▀▀▀▀▀ [13/03/2024 15:18:12] Scoop ▀▀▀▀▀▀▀▀▀▀▀
█  Executable: C:\WINDOWS\system32\windowspowershell\v1.0\powershell.exe
█  Arguments: -NoProfile -ExecutionPolicy Bypass -Command scoop bucket list
Name Source                                 Updated              Manifests
---- ------                                 -------              ---------
main https://github.com/ScoopInstaller/Main 3/13/2024 1:30:34 PM      1310
[13/03/2024 15:18:12] Exit Code: 0
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
█▀▀▀▀▀▀▀▀▀ [13/03/2024 15:18:12] Scoop ▀▀▀▀▀▀▀▀▀▀▀
█  Executable: C:\WINDOWS\system32\windowspowershell\v1.0\powershell.exe
█  Arguments: -NoProfile -ExecutionPolicy Bypass -Command scoop list
Installed apps:
Name         Version Source Updated             Info
----         ------- ------ -------             ----
7zip         23.01   main   2023-09-27 12:33:45     
git          2.44.0  main   2024-03-05 10:13:58     
scoop-search 1.4.1   main   2024-02-13 11:08:41     
[13/03/2024 15:18:12] Exit Code: 0
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
█▀▀▀▀▀▀▀▀▀ [13/03/2024 15:18:13] PowerShell ▀▀▀▀▀▀▀▀▀▀▀
█  Executable: C:\WINDOWS\system32\windowspowershell\v1.0\powershell.exe
█  Arguments: -NoProfile -Command Get-PSRepository
Name                      InstallationPolicy   SourceLocation                                                          
----                      ------------------   --------------                                                          
PSGallery                 Untrusted            https://www.powershellgallery.com/api/v2                                
[13/03/2024 15:18:13] Exit Code: 0
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
█▀▀▀▀▀▀▀▀▀ [13/03/2024 15:18:13] Scoop ▀▀▀▀▀▀▀▀▀▀▀
█  Executable: C:\WINDOWS\system32\windowspowershell\v1.0\powershell.exe
█  Arguments: -NoProfile -ExecutionPolicy Bypass -Command scoop list
Installed apps:
Name         Version Source Updated             Info
----         ------- ------ -------             ----
7zip         23.01   main   2023-09-27 12:33:45     
git          2.44.0  main   2024-03-05 10:13:58     
scoop-search 1.4.1   main   2024-02-13 11:08:41     
[13/03/2024 15:18:13] Exit Code: 0
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
█▀▀▀▀▀▀▀▀▀ [13/03/2024 15:18:15] PowerShell ▀▀▀▀▀▀▀▀▀▀▀
█  Executable: C:\WINDOWS\system32\windowspowershell\v1.0\powershell.exe
█  Arguments: -NoProfile -Command Get-InstalledModule
Version    Name                                Repository           Description                                        
-------    ----                                ----------           -----------                                        
1.0.18     SpeculationControl                  https://www.power... This module provides the ability to query the sp...
[13/03/2024 15:18:15] Exit Code: 0
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
█▀▀▀▀▀▀▀▀▀ [13/03/2024 15:18:15] PowerShell ▀▀▀▀▀▀▀▀▀▀▀
█  Executable: C:\WINDOWS\system32\windowspowershell\v1.0\powershell.exe
█  Arguments: 
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
Try the new cross-platform PowerShell https://aka.ms/pscore6
PS C:\Program Files\WingetUI> 
PS C:\Program Files\WingetUI>                 function Test-GalleryModuleUpdate {
>>                     param (
>>                         [Parameter(Mandatory,ValueFromPipelineByPropertyName)] [string] $Name,
>>                         [Parameter(Mandatory,ValueFromPipelineByPropertyName)] [version] $Version,
>>                         [Parameter(Mandatory,ValueFromPipelineByPropertyName)] [string] $Repository,
>>                         [switch] $NeedUpdateOnly
>>                     )
>>                     process {
>>                         $URLs = @{}
>>                         @(Get-PSRepository).ForEach({$URLs[$_.Name] = $_.SourceLocation})
>>                         $page = Invoke-WebRequest -Uri ($URLs[$Repository] + "/package/$Name") -UseBasicParsing -Maximum 0 -ea Ignore
>>                         [version]$latest = Split-Path -Path ($page.Headers.Location -replace "$Name." -replace ".nupkg") -Leaf
>>                         $needsupdate = $Latest -gt $Version
>>                         if ($needsupdate) {
>>                                 Write-Output($Name + "|" + $Version.ToString() + "|" + $Latest.ToString() + "|" + $Repository)
>>                         }
>>                     }
>>                 }
>>                 Get-InstalledModule | Test-GalleryModuleUpdate
>>                 exit
>>                 
Invoke-WebRequest : Invalid URI: The hostname could not be parsed.
At line:11 char:33
+ ...     $page = Invoke-WebRequest -Uri ($URLs[$Repository] + "/package/$N ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Invoke-WebRequest], UriFormatException
    + FullyQualifiedErrorId : System.UriFormatException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand
Split-Path : Cannot bind argument to parameter 'Path' because it is an empty string.
At line:12 char:61
+ ... -Path -Path ($page.Headers.Location -replace "$Name." -replace ".nupk ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (:) [Split-Path], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationErrorEmptyStringNotAllowed,Microsoft.PowerShell.Commands.Spli 
   tPathCommand
[13/03/2024 15:18:15] Exit Code: 0
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
█▀▀▀▀▀▀▀▀▀ [13/03/2024 15:18:17] Winget ▀▀▀▀▀▀▀▀▀▀▀
█  Executable: C:\Program Files\WingetUI\PackageEngine\Managers\winget-cli_x64\winget.exe
█  Arguments:  update --include-unknown  --accept-source-agreements
   \ 
   / 
   \ 
   / 
   \ 
   / 
   \ 
   / 
   \ 
   / 
   \ 
   / 
   \ 
   / 
   \ 
   / 
  ███▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  1024 KB / 9.47 MB
  ██████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  2.00 MB / 9.47 MB
  █████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  3.00 MB / 9.47 MB
  ████████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  4.00 MB / 9.47 MB
  ███████████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  5.00 MB / 9.47 MB
  ██████████████████▒▒▒▒▒▒▒▒▒▒▒▒  6.00 MB / 9.47 MB
  ██████████████████████▒▒▒▒▒▒▒▒  7.00 MB / 9.47 MB
  █████████████████████████▒▒▒▒▒  8.00 MB / 9.47 MB
  ████████████████████████████▒▒  9.00 MB / 9.47 MB
  ██████████████████████████████  9.47 MB / 9.47 MB
   - 
   | 
   - 
   | 
Name                                                        Id                Version    Available     Source
-------------------------------------------------------------------------------------------------------------
<REMOVED>
4 upgrades available.
[13/03/2024 15:18:17] Exit Code: 0
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
█▀▀▀▀▀▀▀▀▀ [13/03/2024 15:18:17] Winget ▀▀▀▀▀▀▀▀▀▀▀
█  Executable: C:\Program Files\WingetUI\PackageEngine\Managers\winget-cli_x64\winget.exe
█  Arguments:  list  --accept-source-agreements
   \ 
   / 
   \ 
   / 
   \ 
   / 
   \ 
   / 
   \ 
   / 
   \ 
   / 
   \ 
   / 
   \ 
   / 
  ███▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  1024 KB / 9.47 MB
  ██████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  2.00 MB / 9.47 MB
  █████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  3.00 MB / 9.47 MB
  ████████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  4.00 MB / 9.47 MB
  ███████████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  5.00 MB / 9.47 MB
  ██████████████████▒▒▒▒▒▒▒▒▒▒▒▒  6.00 MB / 9.47 MB
  ██████████████████████▒▒▒▒▒▒▒▒  7.00 MB / 9.47 MB
  █████████████████████████▒▒▒▒▒  8.00 MB / 9.47 MB
  ████████████████████████████▒▒  9.00 MB / 9.47 MB
  ██████████████████████████████  9.47 MB / 9.47 MB
   - 
   | 
   - 
Name                                   Id                                      Version             Available     Source
-----------------------------------------------------------------------------------------------------------------------
<REMOVED>
[13/03/2024 15:18:17] Exit Code: 0
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
█▀▀▀▀▀▀▀▀▀ [13/03/2024 15:18:19] Scoop ▀▀▀▀▀▀▀▀▀▀▀
█  Executable: C:\WINDOWS\system32\windowspowershell\v1.0\powershell.exe
█  Arguments: -NoProfile -ExecutionPolicy Bypass -Command scoop status
Scoop is up to date.
Everything is ok!
[13/03/2024 15:18:19] Exit Code: 0
RonnyTNL commented 3 months ago

Now switched to PM so probably something related to my time-format settings.

image


▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
█▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
█ Name: Chocolatey
█ Enabled: True
█ Found: True
█ Fancye exe name: choco.exe
█ Executable path: C:\Program Files\WingetUI\choco-cli\bin\choco.exe
█ Call arguments: 
█ Version: 
█   2.2.2
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
System.FormatException: The input string 'PM' was not in a correct format.
   at System.Number.ThrowFormatException[TChar](ReadOnlySpan`1 value)
   at System.Int32.Parse(String s)
   at ModernWindow.PackageEngine.Managers.Scoop.GetSources_UnSafe() in Y:\WingetUI-Store\src\wingetui\PackageEngine\Managers\Scoop.cs:line 408