Extras
Extras copied to clipboard
Discord updated to portable edition, now opens multiple instances when invoked multiple times
Bug Report
Package Name: discord
Current Behaviour
If I invoke discord-portable.exe more than once, I get a new instance of discord per invocation, deviating from the prior behavior and breaking the simple AHK script I was using:
!+d::
if WinExist("ahk_exe DiscordPTB.exe")
WinActivate ahk_exe DiscordPTB.exe
else
EnvGet, UserProfile, UserProfile
Run "%UserProfile%\scoop\apps\discord\current\discord-portable.exe"
return
- if I ever close the discord window, AHK can't find it (of course), so it it re-invokes the entry binary, and that doesn't seem to guard against multiple instances any more (it used to work, and that was when the binary in there was just called
discord.exe
Expected Behaviour
re-invoking the entry binary should re-surface the single instance of discord, like it used to and like it does on other platforms where I use it I have tried re-invoking the Discord.exe in the app folder, but that does the same thing, so it appears as if the portable version doesn't do single-instance.
For the mean-time, I've switched to DiscordPTB, which behaves as expected.
Possible Solution
go back to whatever method was used before to distribute discord, instead of the portable version or raise an issue with the maintainer of the portable version
the prior method worked fine and is within control of this repo, so it seems like the easier solution
System details
Windows version: 11
OS architecture: 64bit
PowerShell version: 7.2.2
Scoop Configuration
{
"lastUpdate": "2022-04-25T11:04:06.1953022+02:00",
"SCOOP_REPO": "https://github.com/ScoopInstaller/Scoop",
"SCOOP_BRANCH": "master"
}
Does this also happen when the Portapps version is installed manually?
I haven't tested, but I would assume so - it looks like scoop unpacks the portable app locally - there's a discord-portable.exe (which wasn't present before) and a subfolder with the app in it. I don't see any reason why the behavior would be any different from a direct download, but can verify if absolutely necessary? Unless I'm missing something, the portable-apps version doesn't offer any great benefit, but does seem to provide this breaking change )':
The Portapps version is the only one which is compatible with Scoop. Otherwise you'll have to use their own installer.
so is the implication here that the portable apps package has changed? as noted above, I used to point my shortcut to ~/scoop/apps/discord/current/discord.exe - which is now discord-portable.exe; if this is the case, I need to open a ticket upstream.
In addition, discord-ptb works - so why is that one different? that appears to be coming from a nuspec package -- looks like you're the author, so you'd know more about what differentiates PTB from the vanilla source?
update: this is not the case:

so please can we go back to the old way of installing discord?
I've also just downloaded the prior nupkg and run Discord.exe - it works as expected, connects properly, there are no issues.

Updating the the portable version has introduced issues and I don't see any positive result?
The previous Discord package was very out of date, you're free to use that if you want. It wasn't receiving updates properly, so we switched to Portapps version.
you haven't switched the PTB version though? that still uses a nupkg from discord - what's the difference?
I've only transferred the PTB to a different bucket, nothing else. It's also very old.
I've raised https://github.com/portapps/discord-portable/issues/91 - perhaps portable apps can do something about it
another alternative is to have the scoop install process:
- download the installer from https://discord.com/api/downloads/distributions/app/installers/latest?channel=stable&platform=win&arch=x86
- unpack with 7z
- the unpacked file contains a
Discord-1.0.9004-full.nupkgwhich can be used to install with - unfortunately, the original nupkg download url from bc42f6b, modified to have this file as the prefix, gives permission errors, so I'm not sure how scoop would know to update - perhaps you have an idea? It makes sense to use the official source, when possible?
The official source you mentioned was prone to errors regarding updates, that's why it was removed. You can check the git history and related PRs for more details.