microsoft / winget-pkgs

The Microsoft community Windows Package Manager manifest repository
MIT License
8.76k stars 4.57k forks source link

[Package Issue]: dotPDNLLC.paintdotnet #117418

Open gerhard4 opened 1 year ago

gerhard4 commented 1 year ago

Please confirm these before moving forward

Category of the issue

Installation issue.

Brief description of your issue

When running winget upgrade, it tries to update dotPDNLLC.paintdotnet and fails with this output:

(2/2) Found paint.net [dotPDNLLC.paintdotnet] Version 5.0.9
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Successfully verified installer hash
Extracting archive...
Successfully extracted archive
Nested installer file does not exist. Ensure the specified relative path of the nested installer matches: C:\Users\gerhard\AppData\Local\Temp\WinGet\dotPDNLLC.paintdotnet.5.0.9\extracted\paint.net.5.0.9.winmsi.x64.msi

Steps to reproduce

winget upgrade dotPDNLLC.paintdotnet with a current version of 5.0.7.

Actual behavior

The upgrade fails.

Expected behavior

The upgrade succeeds.

Environment

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

Windows: Windows.Desktop v10.0.22621.2134
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.20.2201.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                        Disabled
BypassCertificatePinningForMicrosoftStore Disabled
InstallerHashOverride                     Disabled
LocalArchiveMalwareScanOverride           Disabled

Screenshots and Logs

The verbose log shows this:

2023-08-19 13:03:51.289 [CLI ] Extracting archive to: C:\Users\gerhard\AppData\Local\Temp\WinGet\dotPDNLLC.paintdotnet.5.0.9\extracted
2023-08-19 13:03:52.051 [CLI ] Successfully extracted archive
2023-08-19 13:03:52.052 [CLI ] Unable to locate nested installer at: C:\Users\gerhard\AppData\Local\Temp\WinGet\dotPDNLLC.paintdotnet.5.0.9\extracted\paint.net.5.0.9.winmsi.x64.msi

The content of C:\Users\gerhard\AppData\Local\Temp\WinGet\dotPDNLLC.paintdotnet.5.0.9\extracted is:

❯ dir C:\Users\gerhard\AppData\Local\Temp\WinGet\dotPDNLLC.paintdotnet.5.0.9\extracted
 Volume in drive C is OS-2
 Volume Serial Number is AC2A-EB07

 Directory of C:\Users\gerhard\AppData\Local\Temp\WinGet\dotPDNLLC.paintdotnet.5.0.9\extracted

2023-08-19  13:03    <DIR>          .
2023-08-19  12:50    <DIR>          ..
2023-08-08  17:57        65'403'688 paint.net.5.0.9.install.x64.exe
               1 File(s)     65'403'688 bytes
               2 Dir(s)  149'969'809'408 bytes free

Note that it looks for a file paint.net.5.0.9.winmsi.x64.msi, but the extracted file name is paint.net.5.0.9.install.x64.exe.

mdanish-kh commented 1 year ago

This is because the link used for the MSI installer in the manifest is incorrect and the zip from that InstallerUrl doesn't include paint.net.5.0.9.winmsi.x64.msi

https://github.com/microsoft/winget-pkgs/blob/be851349a154acb14af6275812d79b70fadb9ddf/manifests/d/dotPDNLLC/paintdotnet/5.0.9/dotPDNLLC.paintdotnet.installer.yaml#L41-L48

Though the bigger concern here is that the PR should not have passed the validation pipelines with incorrect RelativeFilePath. The pipelines should be checking whether the executable mentioned in RelativeFilePath actually exists in the zip archive (or maybe I'm wrong to assume that this functionality existed before). Related to #115461

cc @denelon @stephengillie

stephengillie commented 1 year ago

Feature/bug request:

The pipelines should be checking whether the executable mentioned in RelativeFilePath actually exists in the zip archive.

To my knowledge, this check is not currently performed - these actions are run, and the output codes are checked, like other validation types. So adding this check would fix another gap in validation.

hwfanatic commented 1 year ago

This bug still exists in 5.0.10 You have to manually find and run the installer in %TEMP%\WinGet\dotPDNLLC.paintdotnet.5.0.10\extracted

hulbs9nw commented 1 year ago

Still present in 5.0.11

leonborin commented 11 months ago

Still present in 5.0.12

log:

PS C:\Users\Leon> winget upgrade dotPDNLLC.paintdotnet
Found paint.net [dotPDNLLC.paintdotnet] Version 5.0.12
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Downloading https://github.com/paintdotnet/release/releases/download/v5.0.12/paint.net.5.0.12.install.x64.zip
  ██████████████████████████████  62.4 MB / 62.4 MB
Successfully verified installer hash
Extracting archive...
Successfully extracted archive
Nested installer file does not exist. Ensure the specified relative path of the nested installer matches: C:\Users\Leon\AppData\Local\Temp\WinGet\dotPDNLLC.paintdotnet.5.0.12\extracted\paint.net.5.0.12.winmsi.x64.msi

Attempt to run installer manually from temp folder also failed with error code 1603.