Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WingetCreate Crashes #466

Open
BrandonWanHuanSheng opened this issue Oct 28, 2023 · 12 comments
Open

WingetCreate Crashes #466

BrandonWanHuanSheng opened this issue Oct 28, 2023 · 12 comments

Comments

@BrandonWanHuanSheng
Copy link

Hmmm, wingetcreate crashes.
WingetCreateLog-2023-10-28-19-13.160.txt

@mdanish-kh
Copy link
Contributor

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

@BrandonWanHuanSheng
Copy link
Author

BrandonWanHuanSheng commented Oct 28, 2023

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+

d__0.MoveNext|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, Dictionary2& 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)

@BrandonWanHuanSheng
Copy link
Author

Screenshot (15)

@BrandonWanHuanSheng
Copy link
Author

Screenshot (16)
Screenshot (18)
Screenshot (19)
Screenshot (20)
Screenshot (21)
Screenshot (22)
Screenshot (23)

@BrandonWanHuanSheng
Copy link
Author

The bug is able to reproduced.

@mdanish-kh
Copy link
Contributor

@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

@BrandonWanHuanSheng
Copy link
Author

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.

@BrandonWanHuanSheng
Copy link
Author

BrandonWanHuanSheng commented Nov 10, 2023

Seem like modify the installers object cause wingetcreate to crashes. @mdanish-kh

@Trenly
Copy link
Contributor

Trenly commented Nov 14, 2023

@BrandonWanHuanSheng - is this still an issue? There were some changes over on winget-cli that may have fixed this

@BrandonWanHuanSheng
Copy link
Author

BrandonWanHuanSheng commented Nov 15, 2023

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, Dictionary2& 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)

@BrandonWanHuanSheng
Copy link
Author

This start from v 1.5.6.0

@koppor
Copy link

koppor commented Jul 3, 2024

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants