-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Comments
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:
|
Discord is not running while doing the upgrade. |
Can somebody explain or point to a page that explains why some apps require explicit targeting? |
Direct install also failed
|
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 |
Can not upgrade Discord.Discord now:
|
Discord has auto-updated itself from
|
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. |
Could it be that all of the Discord packages were marked in the manifest with the flag: 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 |
The package cannot be upgraded using winget. Please use the method provided by the publisher for upgrading this package. |
This issue is due to poorly-configured installer manifests using the dynamic i.e. : This appears to have been fixed with the current-version manifests. |
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. |
Still getting the error @stephengillie
|
Yes same here. I have to use |
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. |
No, Discord has no proper version tracking as it's a React app running on Electron. It self-updates the moment you start it. It doesn't track installs, because it just updates the actual files. This makes version tracking impossible. The installer however is updated every time a new build is out, and that version is only tracked on install. If you constantly update using the installer, you have to redownload a bunch of files over and over again, even if not updated. Therefore it's not recommended to update Discord outside of its own updater. |
Discord uses Squirrel Installer for installation (probably with the help of electron-builder). Although Squirrel Installer provides the methods to check version and perform self-update, Discord implements its own logic for updating that is independent of Squirrel. Discord would use delta update only if it is one version behind, otherwise it will download the full archive, depending on how the update source define the strategy: https://updates.discord.com/distributions/app/manifests/latest?channel=stable&platform=win&arch=x64 |
I would add that the way Discord installs itself is causing an issue with Windows system tray icon hide / show mechanism. Namely, they install every update in a new path which contains a version number. Since the executable path changes, Windows thinks Worse yet, for each update, there's a new registry key that Windows Explorer creates to track this icon state so it's basically trashing your registry and slowing down Windows Explorer (takes longer and longer to check which icons need to be shown or hidden as there are more and more keys after each update). I reported that issue to them but they said they would need some time to understand the problem and see if they can fix it despite the solution (no version number in path) being obvious. It's been more than a year since then. Bunch of amateurs if you ask me. As for problems updating Discord using winget, I am getting the following:
When I run Discord it doesn't show the update that winget is showing and it's not updating itself. Before this, I have uninstalled Discord, installed it using winget, and after it updated itself once using its built-in updater now I can't upgrade it anymore using winget. Just leaving this here in case anyone else finds the info useful. |
I'm having the same issue, has there been a solution? |
The only solution is discord fixing their update logic and not place their .exe in a new folder every time. |
The solution would be to kick Discord off of Winget until they make their app compatible with the install system. But this seems unfavorable by many here, unfortunately. |
The installer works fine. Just updating doesn't. It would remove the ability for scripted/unattended installation of software using WinGet. I'm against removing it for this reason. It would be better if someone with some sort of influence can ask the Discord team what's up with their update system, especially since it actually does create insane amounts of registry keys over time. Its update system does not play well with how Windows tracks installations and Windows its ecosystem: Windows pretty much expects the main .exe to always be in the same location. It is not. Every update the main .exe moves to a new folder, and that's how versions are tracked. Windows does not play well with this sort of update mechanism for several reasons:
And there's going to be a lot more downsides to moving the .exe after every update. Whoever came up with this needs a boot up their arse. |
Booting Discord off WinGet is the "boot up their arse." 😂 |
What @rsforbes is saying! I don't know anyone with influence and I am pretty sure they won't listen to such feedback at this point in time, as currently there's no incentive for them to change it. Kicking it off Winget could change that. I don't know how they came up with their updating system but I guess they were just doing what was easy and now they're used to it, so why change it? Imagine some devs would go to Debian and ask for their package to be included, but not adhering to the standards. Yes, you can have your custom installers and updates on Debian etc. but then you simply won't be listed in the package management. But they want their cake and eat it too! And I think Winget should stop catering to everyone just because. |
I used to avoid this problem by running a script that reads the version from Discord.exe and writes it to registry installer data. But for some reason, for some months now, the version listed by winget is always 1 or 2 numbers ahead of a freshly auto-updated discord. As of now Discord auto-updated to 1.0.9177 but winget claims 1.0.9179 to be latest. I don't really care about a fully automated update, but I do care about a quick and easy response from |
Hello folks, I just found a basic command to reinstall the "Discord.Discord" application for getting the latest version:
And here is the output:
Hope this can help through it's not the proper step for |
@jason19970210 Problem with that approach is that it will override your settings, meaning that you'd have to configure your Windows preferences all over again. After looking at this app in full, and with some of the comments here, here is a summary on what's causing this issue:
This actually causes issues for Windows, and how it handles updates overall:
This is terrible deployment practice because it's not keeping track of versioning, when it is more capable of, and since it keeps moving its own path, some of your settings will be gone after an update. This is all on Discord to fix, because the mechanisms to be compliant are already on Windows. I tried notifying Discord about this, but their feedback process forced me to report a bug and then I got ghosted. Would be nice to see if there is someone over there that could take a note of this and make Discord behave like a standard application. |
Separate folder for each update is actually the way Squirrel updates work. But Squirrel also updates the registry keys. It seems that Discord is using an unorthodox way with Squirrel, circumventing the nor.al update routine. |
Please confirm these before moving forward
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 runwinget upgrade -h Discord.Discord
.Actual behavior
After the first command the upgrade is not executed and I get the following message:
After the second command the upgrade is not executed and I get the following error:
Expected behavior
The upgrade succeeds after the first command, or at least after the second.
Environment
Screenshots and Logs
WinGet-2024-01-29-11-47-13.285.log
WinGet-2024-01-29-11-47-20.241.log
The text was updated successfully, but these errors were encountered: