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

[Package Issue]: Discord.Discord requires explicit targeting and upgrade fails with "Installer hash does not match" #136960

Open
2 tasks done
lackovic opened this issue Jan 29, 2024 · 19 comments
Labels
Error-Hash-Mismatch The InstallerSHA256 Hash specified in the manifest doesn't match with the InstallerURL hash Help-Wanted This is a good candidate work item from the community. Package-Update This package needs to be updated

Comments

@lackovic
Copy link

Please confirm these before moving forward

  • I have searched for my issue and not found a work-in-progress/duplicate/resolved issue.
  • I have not been informed if the issue is resolved in a preview version of the winget client.

Category of the issue

Installation issue.

Brief description of your issue

Discord upgrade with winget upgrade -h --all fails because it requires a explicit targeting.
Upgrading with explicit targeting fails with "Installer hash does not match"

Steps to reproduce

Run winget upgrade -h --all, then run winget upgrade -h Discord.Discord.

Actual behavior

After the first command the upgrade is not executed and I get the following message:

The following packages have an upgrade available, but require explicit targeting for upgrade:
Name    Id              Version  Available Source
-------------------------------------------------
Discord Discord.Discord 1.0.9012 1.0.9030  winget

After the second command the upgrade is not executed and I get the following error:

Found Discord [Discord.Discord] Version 1.0.9030
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://discord.com/api/downloads/distributions/app/installers/latest?channel=stable&platform=win&arch=x86
  ██████████████████████████████  91.7 MB / 91.7 MB
Installer hash does not match; this cannot be overridden when running as admin

Expected behavior

The upgrade succeeds after the first command, or at least after the second.

Environment

Windows Package Manager v1.6.3482
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.22631.3085
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.21.3482.0

Screenshots and Logs

WinGet-2024-01-29-11-47-13.285.log
WinGet-2024-01-29-11-47-20.241.log

@lackovic lackovic added the Issue-Bug It either shouldn't be doing this or needs an investigation. label Jan 29, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added Needs-Triage This work item needs to be triaged by a member of the core team. Package-Update This package needs to be updated Error-Hash-Mismatch The InstallerSHA256 Hash specified in the manifest doesn't match with the InstallerURL hash and removed Issue-Bug It either shouldn't be doing this or needs an investigation. labels Jan 29, 2024
Copy link
Contributor

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@lackovic
Copy link
Author

Discord is not running while doing the upgrade.

@lackovic
Copy link
Author

Can somebody explain or point to a page that explains why some apps require explicit targeting?

@kumarchandresh
Copy link

kumarchandresh commented Jan 29, 2024

Direct install also failed

❯ winget install --source winget --scope user --exact --id Discord.Discord
Found Discord [Discord.Discord] Version 1.0.9030
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://discord.com/api/downloads/distributions/app/installers/latest?channel=stable&platform=win&arch=x86
  ██████████████████████████████  91.7 MB / 91.7 MB
Installer hash does not match.

@stephengillie
Copy link
Collaborator

stephengillie commented Jan 29, 2024

Can somebody explain or point to a page that explains why some apps require explicit targeting?

This might be through pinning.

Use the --include-pinned argument with winget upgrade --all to include any pinned packages.

@stephengillie stephengillie removed the Needs-Triage This work item needs to be triaged by a member of the core team. label Jan 29, 2024
@Exorcism0666
Copy link
Contributor

@PckgrBot, there was already a pull request. #136871 (remove old version + adding x64)

@PckgrBot
Copy link
Contributor

@PckgrBot, there was already a pull request. #136871 (remove old version + adding x64)

Apologies, I didn't see yours. I did try to add x64 in and the link wasn't working. Mayeb I had the wrong one?

@lackovic
Copy link
Author

This might be through pinning.

I don't have any pins:

> winget pin list
There are no pins configured.

Upgrading with explicit targeting works now:

> winget upgrade -h Discord.Discord
Found Discord [Discord.Discord] Version 1.0.9031
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://dl.discordapp.net/distro/app/stable/win/x86/1.0.9031/DiscordSetup.exe
  ██████████████████████████████  91.7 MB / 91.7 MB
Successfully verified installer hash
Starting package install...
Successfully installed

@Showfom
Copy link

Showfom commented Feb 29, 2024

Can not upgrade Discord.Discord now:

> winget upgrade -h Discord.Discord
The package cannot be upgraded using winget. Please use the method provided by the publisher for upgrading this package.

@sba923
Copy link

sba923 commented Mar 10, 2024

Discord has auto-updated itself from 1.0.9034 to 1.0.9035, yet winget list discord reports this:

PS> winget list discord
Name    Id              Version  Available Source
-------------------------------------------------
Discord Discord.Discord 1.0.9034 1.0.9035  winget

@ratheader
Copy link

Obviously they don't want to keep their installation package compatible with winget. So why don't they take themselves out of it? It's annoying to have the updates displayed in Winget but not be able to run them. Those at Discord might find that funny. I think it sucks.

@tessharp
Copy link

tessharp commented Apr 22, 2024

Could it be that all of the Discord packages were marked in the manifest with the flag: UpgradeBehavior: deny? I tried to look into why these changes were made by @Trenly but unfortunately can't get any details on why this behavior was configured.

Edit: My gut feel is that apps that requires "approval" of Terms of Service after install, are not included in winget. This happened to VMware Workstation a while back IIRC (it has been added ever since... but it's a bit confusing ngl)

@Trenly
Copy link
Contributor

Trenly commented Apr 22, 2024

Could it be that all of the Discord packages were marked in the manifest with the flag: UpgradeBehavior: deny? I tried to look into why these changes were made by @Trenly but unfortunately can't get any details on why this behavior was configured.

Edit: My gut feel is that apps that requires "approval" of Terms of Service after install, are not included in winget. This happened to VMware Workstation a while back IIRC (it has been added ever since... but it's a bit confusing ngl)

No, that isn’t the issue. The deny behavior was set because Discord has its own auto updater and the updater doesn’t write the new version to registry; attenpting to update Discord using winget would re-install and erase user settings

@anonymouswhac
Copy link

The package cannot be upgraded using winget. Please use the method provided by the publisher for upgrading this package.
Process Exit Code : -1978334956
Process End Time : 2024/5/14 0:09:27

@seangibbz
Copy link
Contributor

This issue is due to poorly-configured installer manifests using the dynamic latest URL, as opposed to a static version-specific URL.

i.e. : https://dl.discordapp.net/distro/app/stable/win/x86/1.0.9030/DiscordSetup.exe for version 1.0.9030

This appears to have been fixed with the current-version manifests.

@stephengillie
Copy link
Collaborator

Since the above PRs have been merged, I'll assume that this Issue is complete. If this is in error, please @ me and I'll reopen.

@crazyuploader
Copy link

Still getting the error @stephengillie

⮞  winget upgrade
No installed package found matching input criteria.

The following packages have an upgrade available, but require explicit targeting for upgrade:
Name    Id              Version  Available Source
-------------------------------------------------
Discord Discord.Discord 1.0.9160 1.0.9161  winget

⮞  winget upgrade Discord.Discord
The package cannot be upgraded using winget. Please use the method provided by the publisher for upgrading this package.

@Showfom
Copy link

Showfom commented Sep 1, 2024

Still getting the error @stephengillie

⮞  winget upgrade
No installed package found matching input criteria.

The following packages have an upgrade available, but require explicit targeting for upgrade:
Name    Id              Version  Available Source
-------------------------------------------------
Discord Discord.Discord 1.0.9160 1.0.9161  winget

⮞  winget upgrade Discord.Discord
The package cannot be upgraded using winget. Please use the method provided by the publisher for upgrading this package.

Yes same here. I have to use winget uninstall Discord.Discord and then winget install Discord.Discord for upgrading Discord.

@stephengillie stephengillie reopened this Sep 3, 2024
@stephengillie stephengillie added Help-Wanted This is a good candidate work item from the community. and removed In-PR labels Sep 10, 2024
@woctezuma
Copy link

woctezuma commented Sep 12, 2024

I have found out about this issue after installing UniGetUI to update my softwares with winget, and the only software which had an issue updating was Discord.

I wonder if this could be due to the installation of plugins, such as Vencord, I have not checked with a vanilla Discord installation.

Meanwhile, uninstalling then installing Discord worked to update the software. I had to install Vencord again afterwards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Error-Hash-Mismatch The InstallerSHA256 Hash specified in the manifest doesn't match with the InstallerURL hash Help-Wanted This is a good candidate work item from the community. Package-Update This package needs to be updated
Projects
None yet
Development

Successfully merging a pull request may close this issue.