winget-create icon indicating copy to clipboard operation
winget-create copied to clipboard

Failed to parse the package

Open farag2 opened this issue 7 months ago • 1 comments

Brief description of your issue

wingetcreate.exe failed to parse the package from [https://github.com/farag2/Sophia-Script-for-Windows/releases/download/6.8.6/Sophia.Script.for.Windows.11.v6.8.6.zip]

Steps to reproduce

PS C:\Users\test\Desktop> & "C:\Users\test\Desktop\wingetcreate.exe" update TeamSophia.SophiaScript --urls "https://github.com/farag2/Sophia-Script-for-Windows/releases/download/6.8.6/Sophia.Script.for.Windows.11.v6.8.6.zip" --version 6.8.6 --submit Retrieving latest manifest for TeamSophia.SophiaScript Downloading and parsing: https://github.com/farag2/Sophia-Script-for-Windows/releases/download/6.8.6/Sophia.Script.for.Windows.11.v6.8.6.zip... Failed to parse the package from [https://github.com/farag2/Sophia-Script-for-Windows/releases/download/6.8.6/Sophia.Script.for.Windows.11.v6.8.6.zip]

Expected behavior

wingetcreate should ask for credentials to create a PR

Actual behavior

It fails to parse the package from the URL

Log from WingetCreateLog-2025-05-10-14-50.308.txt

2025-05-10 14:50:03.3917|TRACE|Microsoft.WingetCreateCLI.Program.Main|Command line args: C:\Users\test\Desktop\wingetcreate.exe update TeamSophia.SophiaScript --urls https://github.com/farag2/Sophia-Script-for-Windows/releases/download/6.8.6/Sophia.Script.for.Windows.11.v6.8.6.zip --version 6.8.6 --submit
2025-05-10 14:50:03.4321|TRACE|Microsoft.WingetCreateCLI.Commands.BaseCommand.LoadGitHubClient|No token parameter, reading cached token
2025-05-10 14:50:03.4321|TRACE|Microsoft.WingetCreateCLI.Commands.BaseCommand.CheckGitHubTokenAndSetClient|Checking repo access using provided token
2025-05-10 14:50:03.8400|TRACE|Microsoft.WingetCreateCLI.Commands.BaseCommand.CheckGitHubTokenAndSetClient|Access check was successful, proceeding
2025-05-10 14:50:04.2878|DEBUG|Microsoft.WingetCreateCLI.Commands.UpdateCommand.Execute|Retrieving latest manifest for TeamSophia.SophiaScript
2025-05-10 14:50:05.8906|INFO|Microsoft.WingetCreateCLI.Commands.BaseCommand.DownloadPackageFile|Downloading and parsing: https://github.com/farag2/Sophia-Script-for-Windows/releases/download/6.8.6/Sophia.Script.for.Windows.11.v6.8.6.zip...
2025-05-10 14:50:06.6046|ERROR|Microsoft.WingetCreateCLI.Commands.UpdateCommand.UpdateManifestsAutonomously|Failed to parse the package from [https://github.com/farag2/Sophia-Script-for-Windows/releases/download/6.8.6/Sophia.Script.for.Windows.11.v6.8.6.zip]

The archive is downloaded

Image

but it expands archive with double folder %TEMP%\wingetcreate\Sophia.Script.for.Windows.11.v6.8.6\Sophia_Script_for_Windows_11_v6.8.6

Image

Probably, this is the reason it cannot parse the archive content

Environment

Windows Package Manager Manifest Creator v1.9.4.0
Copyright (c) Microsoft Corporation. All rights reserved.

Operating System: Microsoft Windows NT 10.0.26100.0
System Architecture: X64

farag2 avatar May 10 '25 13:05 farag2

@farag2 This is because wingetcreate is not designed to validate or submit .ps1 files. Actually, script based installers are blocked by WinGet policy. Please see the first section of winget-pkgs' README.md. There are many packages that are blocked from submission because they are a .ps1 / .bat / .cmd file. See https://github.com/microsoft/winget-pkgs/pulls?q=is%3Apr+is%3Aclosed+label%3AScripted-Application

mdanish-kh avatar Jul 18 '25 18:07 mdanish-kh