microsoft / winget-create

The Windows Package Manager Manifest Creator command-line tool (aka wingetcreate)
MIT License
489 stars 84 forks source link

Issue while updating Telegram #421

Closed sharunkumar closed 1 year ago

sharunkumar commented 1 year ago

Brief description of your issue

When I try to update Telegram.TelegramDesktop, I am getting an error

Steps to reproduce

Command:

wingetcreate update --urls https://github.com/telegramdesktop/tdesktop/releases/download/v4.8.10/tsetup-x64.4.8.10.exe https://github.com/telegramdesktop/tdesktop/releases/download/v4.8.10/tsetup.4.8.10.exe https://github.com/telegramdesktop/tdesktop/releases/download/v4.8.10/tportable-x64.4.8.10.zip https://github.com/telegramdesktop/tdesktop/releases/download/v4.8.10/tportable.4.8.10.zip --submit --version 4.8.10 Telegram.TelegramDesktop

Expected behavior

Telegram manifest should be updated

Actual behavior

Output:

➜ wingetcreate update --urls https://github.com/telegramdesktop/tdesktop/releases/download/v4.8.10/tsetup-x64.4.8.10.exe https://github.com/telegramdesktop/tdesktop/releases/download/v4.8.10/tsetup.4.8.10.exe https://github.com/telegramdesktop/tdesktop/releases/download/v4.8.10/tportable-x64.4.8.10.zip https://github.com/telegramdesktop/tdesktop/releases/download/v4.8.10/tportable.4.8.10.zip --submit --version 4.8.10 Telegram.TelegramDesktop
Retrieving latest manifest for Telegram.TelegramDesktop
Downloading and parsing: https://github.com/telegramdesktop/tdesktop/releases/download/v4.8.10/tsetup-x64.4.8.10.exe...
Downloading and parsing: https://github.com/telegramdesktop/tdesktop/releases/download/v4.8.10/tsetup.4.8.10.exe...
Downloading and parsing: https://github.com/telegramdesktop/tdesktop/releases/download/v4.8.10/tportable-x64.4.8.10.zip...
System.ArgumentNullException: Value cannot be null. (Parameter 'source')
   at System.Linq.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
   at System.Linq.Enumerable.Select[TSource,TResult](IEnumerable`1 source, Func`2 selector)
   at Microsoft.WingetCreateCLI.Commands.UpdateCommand.<>c.<UpdateManifestsAutonomously>b__38_4(Installer i)
   at System.Linq.Enumerable.SelectManySingleSelectorIterator`2.MoveNext()
   at System.Collections.Generic.HashSet`1.UnionWith(IEnumerable`1 other)
   at System.Collections.Generic.HashSet`1..ctor(IEnumerable`1 collection, IEqualityComparer`1 comparer)
   at System.Linq.Enumerable.DistinctIterator`1.ToList()
   at Microsoft.WingetCreateCLI.Commands.UpdateCommand.UpdateManifestsAutonomously(Manifests manifests)
   at Microsoft.WingetCreateCLI.Commands.UpdateCommand.ExecuteManifestUpdate(List`1 latestManifestContent, CommandExecutedEvent commandEvent)
   at Microsoft.WingetCreateCLI.Commands.UpdateCommand.Execute()
   at Microsoft.WingetCreateCLI.Program.Main(String[] args)

Environment

➜ wingetcreate --help
Windows Package Manager Manifest Creator v1.2.8.0

Copyright (c) Microsoft Corporation. All rights reserved.

The manifest creation command line utility generates manifest for submitting
apps to the Windows Package Manager repo.

  new         Launches a series of questions to help generate a new manifest
  update      Updates fields of an existing manifest
  submit      Submits a valid manifest directly to the Windows Package Manager repo
  settings    Open settings
  token       Modifies the GitHub auth token cache
  cache       Manage downloaded installers stored in cache

More help can be found at: https://aka.ms/winget-create
Privacy statement: https://aka.ms/privacy

➜ winget --info
Windows Package Manager v1.5.1881
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.22621.2070
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.20.1881.0

Winget Directories
-------------------------------------------------------------------------------------------------------------------------------
Logs                               %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir
User Settings                      %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json
Portable Links Directory (User)    %LOCALAPPDATA%\Microsoft\WinGet\Links
Portable Links Directory (Machine) C:\Program Files\WinGet\Links
Portable Package Root (User)       %LOCALAPPDATA%\Microsoft\WinGet\Packages
Portable Package Root              C:\Program Files\WinGet\Packages
Portable Package Root (x86)        C:\Program Files (x86)\WinGet\Packages

Links
---------------------------------------------------------------------------
Privacy Statement   https://aka.ms/winget-privacy
License Agreement   https://aka.ms/winget-license
Third Party Notices https://aka.ms/winget-3rdPartyNotice
Homepage            https://aka.ms/winget
Windows Store Terms https://www.microsoft.com/en-us/storedocs/terms-of-sale

Admin Setting                             State
--------------------------------------------------
LocalManifestFiles                        Enabled
BypassCertificatePinningForMicrosoftStore Disabled
InstallerHashOverride                     Disabled
LocalArchiveMalwareScanOverride           Disabled
mdanish-kh commented 1 year ago

Resolved in PR

This should be fixed when the next release of winget-create ships.

Edit: Resolved in WinGet-Create 1.5.1.0