WingetCreate Crashes
BrandonWanHuanSheng opened this issue ยท 12 comments
Hmmm, wingetcreate crashes.
WingetCreateLog-2023-10-28-19-13.160.txt
What version of winget-create are you using? (it's shown in the output of running command wingetcreate
)
I tried to run the command you are using in the logs and I can run them with no issues (both in autonomous and in interactive update) on the latest 1.5.5.0 client
~ wingetcreate update --urls "https://download.microsoft.com/download/b/8/5/b85bd06f-491c-4c1c-923e-75ce2fe2378e/windowssdk/winsdksetup.exe|x86" -v 10.0.22621.1778 Microsoft.WindowsSDK.10.0.22621
Retrieving latest manifest for Microsoft.WindowsSDK.10.0.22621
Overriding https://download.microsoft.com/download/b/8/5/b85bd06f-491c-4c1c-923e-75ce2fe2378e/windowssdk/winsdksetup.exe with architecture X86
Downloading and parsing: https://download.microsoft.com/download/b/8/5/b85bd06f-491c-4c1c-923e-75ce2fe2378e/windowssdk/winsdksetup.exe...
Generating a preview of your manifests...
Version manifest preview:
# Created using wingetcreate 1.5.5.0
# yaml-language-server: $schema=https://aka.ms/winget-manifest.version.1.5.0.schema.json
PackageIdentifier: Microsoft.WindowsSDK.10.0.22621
PackageVersion: 10.0.22621.1778
DefaultLocale: en-US
ManifestType: version
ManifestVersion: 1.5.0
Installer manifest preview:
# Created using wingetcreate 1.5.5.0
# yaml-language-server: $schema=https://aka.ms/winget-manifest.installer.1.5.0.schema.json
PackageIdentifier: Microsoft.WindowsSDK.10.0.22621
PackageVersion: 10.0.22621.1778
MinimumOSVersion: 10.0.0.0
InstallerType: burn
InstallerSwitches:
Silent: /q
SilentWithProgress: /q
Log: " "
UpgradeBehavior: uninstallPrevious
Installers:
- Architecture: x86
InstallerUrl: https://download.microsoft.com/download/b/8/5/b85bd06f-491c-4c1c-923e-75ce2fe2378e/windowssdk/winsdksetup.exe
InstallerSha256: 1BF94F7D2CF44CDF50124C3B5745A27B517367435F1BD5D0F127A33B2BD8344C
ManifestType: installer
ManifestVersion: 1.5.0
Default locale manifest preview:
# Created using wingetcreate 1.5.5.0
# yaml-language-server: $schema=https://aka.ms/winget-manifest.defaultLocale.1.5.0.schema.json
PackageIdentifier: Microsoft.WindowsSDK.10.0.22621
PackageVersion: 10.0.22621.1778
PackageLocale: en-US
Publisher: Microsoft Corporation
PublisherUrl: https://www.microsoft.com/en-us/
PublisherSupportUrl: https://support.microsoft.com/en-us
PrivacyUrl: https://privacy.microsoft.com/en-us/privacystatement
Author: Microsoft Corporation
PackageName: Windows Software Development Kit - Windows 10.0.22621.2428
License: Proprietary
Copyright: Copyright (c) Microsoft Corporation. All rights reserved.
ShortDescription: The Windows Software Development Kit (10.1.22621.2428) for Windows 11 provides the latest headers, libraries, metadata, and tools for building Windows apps.
ManifestType: defaultLocale
ManifestVersion: 1.5.0
Manifest saved to ***\manifests\m\Microsoft\WindowsSDK\10\0\22621\10.0.22621.1778
Manifest validation succeeded: True
I use interactive which trying to Modifying the AppandFeatureEntries. Later on, I press the Installers. which throw an error during that time. See above the log while I was running the command https://github.com/microsoft/winget-create/files/13195677/WingetCreateLog-2023-10-28-19-13.160.txt
The output file is shown in below
2023-10-28 19:13:40.3743|TRACE|Microsoft.WingetCreateCLI.Program.Main|Command line args: C:\Program Files\WindowsApps\Microsoft.WindowsPackageManagerManifestCreator_1.5.5.0_x64__8wekyb3d8bbwe\WingetCreateCLI\WingetCreateCLI.dll update --urls https://download.microsoft.com/download/b/8/5/b85bd06f-491c-4c1c-923e-75ce2fe2378e/windowssdk/winsdksetup.exe|x86 -v 10.0.22621.1778 Microsoft.WindowsSDK.10.0.22621 --interactive
2023-10-28 19:13:40.5281|TRACE|Microsoft.WingetCreateCLI.Commands.BaseCommand.LoadGitHubClient|No token parameter, reading cached token
2023-10-28 19:13:40.5718|TRACE|Microsoft.WingetCreateCLI.Commands.BaseCommand.CheckGitHubTokenAndSetClient|Checking repo access using provided token
2023-10-28 19:13:41.5061|TRACE|Microsoft.WingetCreateCLI.Commands.BaseCommand.CheckGitHubTokenAndSetClient|Access check was successful, proceeding
2023-10-28 19:13:41.9696|DEBUG|Microsoft.WingetCreateCLI.Commands.UpdateCommand.Execute|Retrieving latest manifest for Microsoft.WindowsSDK.10.0.22621
2023-10-28 19:13:47.5642|INFO|Microsoft.WingetCreateCLI.Commands.UpdateCommand.UpdateInstallersInteractively|Updating 1 of 1 installers:
2023-10-28 19:13:54.4497|INFO|Microsoft.WingetCreateCLI.Commands.BaseCommand.DownloadPackageFile|Downloading and parsing: https://download.microsoft.com/download/b/8/5/b85bd06f-491c-4c1c-923e-75ce2fe2378e/windowssdk/winsdksetup.exe...
2023-10-28 19:13:55.7835|INFO|Microsoft.WingetCreateCLI.Commands.UpdateCommand+d__60.MoveNext|Installer updated successfully!
2023-10-28 19:13:56.8775|DEBUG|Microsoft.WingetCreateCLI.Commands.BaseCommand.DisplayManifestPreview|Generating a preview of your manifests...
2023-10-28 19:13:56.8775|INFO|Microsoft.WingetCreateCLI.Commands.BaseCommand.DisplayManifestPreview|Version manifest preview:
2023-10-28 19:13:56.8940|INFO|Microsoft.WingetCreateCLI.Commands.BaseCommand.DisplayManifestPreview|Installer manifest preview:
2023-10-28 19:13:56.9148|INFO|Microsoft.WingetCreateCLI.Commands.BaseCommand.DisplayManifestPreview|Default locale manifest preview:
2023-10-28 19:13:59.2944|INFO|Microsoft.WingetCreateCLI.Commands.BaseCommand.ValidateManifest|Manifest validation succeeded: True
2023-10-28 19:14:10.5718|INFO|Microsoft.WingetCreateCLI.Commands.BaseCommand.ValidateManifest|Manifest validation succeeded: True
2023-10-28 19:29:15.3101|ERROR|Microsoft.WingetCreateCLI.Program+
at Microsoft.WingetCreateCore.Common.Extensions.ToEnumAttributeValue(Enum enumVal)
at Microsoft.WingetCreateCLI.PromptHelper.GenerateInstallerSelectionList(List
1 installers, Dictionary
2& installerSelectionMap)at Microsoft.WingetCreateCLI.PromptHelper.DisplayInstallersAsMenuSelection(InstallerManifest installerManifest)
at Microsoft.WingetCreateCLI.PromptHelper.PromptPropertiesWithMenu[T](T model, String exitMenuWord, String modelName)
at Microsoft.WingetCreateCLI.Commands.UpdateCommand.DisplayManifestsAsMenuSelection(Manifests manifests)
at Microsoft.WingetCreateCLI.Commands.UpdateCommand.UpdateManifestsInteractively(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)
The bug is able to reproduced.
@BrandonWanHuanSheng I see from your above comment that you're trying to modify AppsAndFeaturesEntries after the interactive update completes, is that correct?
I can't seem to reproduce the same
wingetcreate.mp4
The bug pop up on Installer where the object is using update method.
Update URL > Schema File > Package.Identifer.installer.yaml > Installers. This is where the object bug happened. It still reproducible on my computer.
Seem like modify the installers object cause wingetcreate to crashes. @mdanish-kh
@BrandonWanHuanSheng - is this still an issue? There were some changes over on winget-cli that may have fixed this
Is this still an issue? There were some changes over on winget-cli that may have fixed this
Yes. It still happen when modifying the installer object threw this error.
System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.WingetCreateCore.Common.Extensions.ToEnumAttributeValue(Enum enumVal)
at Microsoft.WingetCreateCLI.PromptHelper.GenerateInstallerSelectionList(List1 installers, Dictionary
2& installerSelectionMap)
at Microsoft.WingetCreateCLI.PromptHelper.DisplayInstallersAsMenuSelection(InstallerManifest installerManifest)
at Microsoft.WingetCreateCLI.PromptHelper.PromptPropertiesWithMenu[T](T model, String exitMenuWord, String modelName)
at Microsoft.WingetCreateCLI.Commands.UpdateCommand.DisplayManifestsAsMenuSelection(Manifests manifests)
at Microsoft.WingetCreateCLI.Commands.UpdateCommand.UpdateManifestsInteractively(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)
This start from v 1.5.6.0
Windows Package Manager Manifest Creator v1.6.1.0
Execute wingetcreate.exe update -i --version 0.5.3 version-fox.vfox
Use the URLs from https://github.com/version-fox/vfox/releases/tag/v0.5.3
After all three URLs have been asked for, the crash happens
Updating 3 of 3 installers:
Architecture: arm64
InstallerType: inno
InstallerUrl: https://github.com/version-fox/vfox/releases/download/v0.5.2/vfox_0.5.2_windows_setup_aarch64.exe
InstallerSha256: 177FE322A4EBC2EEABD65E420923B282143A69397EC60FFF94831FF9A6B2A79B
ReleaseDate: 2024-05-15
What is the new installer url?: https://github.com/version-fox/vfox/releases/download/v0.5.3/vfox_0.5.3_windows_aarch64.zip
Downloading and parsing: https://github.com/version-fox/vfox/releases/download/v0.5.3/vfox_0.5.3_windows_aarch64.zip...
System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.WingetCreateCLI.Commands.UpdateCommand.UpdateSingleInstallerInteractively(Installer installer)
at Microsoft.WingetCreateCLI.Commands.UpdateCommand.UpdateInstallersInteractively(List`1 existingInstallers)
at Microsoft.WingetCreateCLI.Commands.UpdateCommand.UpdateManifestsInteractively(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)