


























This was my attempt at the patch, for discord-canary-electron-bin. The only thing to change rn should just be the resourcesPath assignment, at least, for canary. If it's different on stable, I do apologise for butting in :3
Will no longer launch until updated 1.0.136 is current version.
Discord 0.0.135 fails on fresh installs with Cannot find module 'discord_desktop_core'. After some digging, I traced it to the fact that Discord's versions.json API now returns {}, so the bootstrap can't determine which module versions to download, and skips the download entirely.
The fix is a one-line patch to moduleUpdater.js in build(), injecting fallback versions when the API response is empty. With this in place, Discord downloads all six modules to ~/.config/discord/0.0.135/modules/ on the first launch of a new version, just as it always did.
All six modules are currently at version 1. The fallback only fires when versions.json returns {}. If it ever returns real data again, that will take precedence.
I saw the paths.js regex fix that @stick posted below, which handles path_1.default alongside _path. That's a valid fix for a variable rename in 0.0.135, but patching moduleUpdater.js to restore the self-download behavior is more durable. It keeps modules in the user's config directory where Discord expects them, avoids bundling anything extra in the package, and doesn't require PKGBUILD changes when/if module versions bump in the future.
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -61,6 +61,10 @@
-e "s|^Name=\${appName}$|Name=${_pkgname^}|" \
-e "s|^Icon=\${iconPath}$|Icon=${_pkgname}|" \
resources/app/app_bootstrap/autoStart/linux.js
+ # versions.json returns {} on 0.0.135, so Discord can no longer determine which modules to download. A simple sed operation on moduleUpdater.js fixes that for us.
+ sed -i '/remoteModuleVersions = JSON\.parse(response\.body\.toString/a\ if (!Object.keys(remoteModuleVersions).length) remoteModuleVersions = {"discord_desktop_core":1,"discord_erlpack":1,"discord_spellcheck":1,"discord_utils":1,"discord_voice":1,"discord_zstd":1};' \
+ resources/app/app_bootstrap/moduleUpdater.js
asar p resources/app resources/app.asar
rm -rf resources/app
}
Patch for 0.135 below. Full PKGBUILD, etc. on Sourcehut.
Discord 0.0.135 changed the transpiled module variable in common/paths.js from _path to path_1.default, so the existing sed silently no-op'd and Discord couldn't locate its resources (failing with Cannot find module 'discord_desktop_core'). Patch updates pkgver, the source sha512, and broadens the sed (extended regex with # delimiter) to match both old and new forms.
diff --git a/PKGBUILD b/PKGBUILD
index 5d826c5..ff24a5d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -9,7 +9,7 @@
_pkgname=discord
_electron=electron
pkgname=${_pkgname}_arch_electron
-pkgver=0.0.134
+pkgver=0.0.135
pkgrel=1
epoch=1
pkgdesc="Discord using system provided ${_electron} for increased security and performance"
@@ -29,7 +29,7 @@ optdepends=('libpulse: Pulseaudio support'
source=("https://dl.discordapp.net/apps/linux/${pkgver}/${_pkgname}-${pkgver}.tar.gz"
'discord-launcher.sh'
'krisp-patcher.py') # original: https://github.com/sersorrel/sys/blob/main/hm/discord/krisp-patcher.py
-sha512sums=('ae902a313acd8b98bd4689b39fb2105d07b04f9922afa166e28935528298ba2aa801eec61114319c4fd8d56059533ec6d2fcc00fd10406af29b6e961703eb7b0'
+sha512sums=('7be159b69fe322939fccfbe82c2c15b0dffb2ee2106a19824d7cc1ccb6b5f87b90446ba1915dfb81bbc59dab56561c104645d969acca5e9a95ac5b4c7afbd2ba'
'5e2b4bc955606c23d3f788d73e81fbd6e6278b618ad85c5a3edc722428bbb6460c5dc874ad9b6ab893f658e669e1a0aa1a0d0830ddbfc019d01596425903dd57'
'42cef68c1f7d574b4fbe859a4dc616e8994c7d16f62bcae3ff1f88e1edc58ac37b39c238d7defa9c97ceda417fcd6224cf0a0fd2608b8d18d0877e3c1befa59c')
@@ -54,7 +54,7 @@ build() {
# use system electron
asar e resources/app.asar resources/app
rm resources/app.asar
- sed -i -e "s|resourcesPath = _path.*;|resourcesPath = '/usr/share/${_pkgname}/resources';|" resources/app/common/paths.js
+ sed -i -E "s#resourcesPath = (_path|path_1\.default)\.join\(.*\);#resourcesPath = '/usr/share/${_pkgname}/resources';#" resources/app/common/paths.js
sed -i -e "s|process.resourcesPath|'/usr/share/${_pkgname}/resources'|" resources/app/app_bootstrap/buildInfo.js
sed -i -e "/^const appName/d" -e "/^const exePath/d" -e "/^const exeDir/d" -e "/^const iconPath/d" \
-e "s|^Exec=\${exePath}$|Exec=/usr/bin/${_pkgname}|" \
Krisp completely stopped working; it's failing to load in both the Extra/discord and this one, and krisp-patcher.py is failing to fix it in both...
20:06:51.612 › [MediaEngineStore] Failed to load Krisp module: /home/$USER/.config/discord/0.0.134/modules/discord_krisp/discord_krisp.node: undefined symbol: _ZN7OrtApis12CreateStatusE12OrtErrorCodePKc
The patcher for krisp doesnt work for me. Regardless of what i do in the config, the log shows, that krisp is enabled, but it is not shown on the gui.
[2025-Feb-04 21:20:34.266 +01:00][ 3945: 3945][info ] Initializing krisp SDK...
[2025-Feb-04 21:20:34.266 +01:00][ 3945: 3945][info ] DoKrispInitialize
[2025-Feb-04 21:20:34.505 +01:00][ 3945: 3945][info ] LoadDynamicKrisp
[2025-Feb-04 21:20:34.505 +01:00][ 3945: 3945][info ] Did not find KRISP_DYLIB_PATH, skipping dynamic loading
[2025-Feb-04 21:20:34.505 +01:00][ 3945: 3945][info ] Initializing Krisp SDK in PID 3945, addr 0x7c64aed906f0
[2025-Feb-04 21:20:34.682 +01:00][ 3945: 3945][info ] Initialized Krisp SDK successfully
[2025-Feb-04 21:20:34.682 +01:00][ 3945: 3945][info ] Krisp SDK initialized
[2025-Feb-04 21:20:44.789 +01:00][ 3945: 3978][info ] KrispNCSetup: sampleRate = 48000, duration = 10
[2025-Feb-04 21:20:44.789 +01:00][ 3945: 3978][info ] Setting Krisp model: full_NC
[2025-Feb-04 21:20:44.824 +01:00][ 3945: 3978][info ] KrispVADSetup: sampleRate = 48000, duration = 10
And its not working at all
it seems the download url has changed to https://stable.dl2.discordapp.net/apps/linux/${pkgver}/${_pkgname}-${pkgver}.tar.gz
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。
Starting with 0.0.55-2 (2024-06-09):
Starting with 0.0.26-1 (2023-03-31):
Starting with 0.0.20-1 (2022-09-15):
$XDG_CONFIG_HOME/discord-flags.conf: this works likeelectron-flags.conf, you can set in this file the command line flags you want to pass to electron when running Discord (there are some useful flags in the wiki, especially if you are experiencing lag in the Discord UI).FAQ
Discord requires an update, but this package isn't yet updated
Check the wiki.
The Discord UI is lagging
Try to add the flags recommended in the wiki in
$XDG_CONFIG_HOME/discord-flags.conf.Discord is crashing when starting/joining a stream
This issue arises because Discord recently started to patch their bundled Electron version to introduce their own custom stream API, which doesn't exist in the official Electron package.
Because Discord fallbacks to standard APIs when accessed from browsers, a fix is likely possible but hasn't been worked on yet.
Krisp is not available
An optional patcher is provided in the package to make Krisp work. To enable it, make sure
python-capstoneandpython-pyelftoolsare installed, then setPATCH_KRISP=truein$XDG_CONFIG_HOME/discord.conf.After an update, you'll need to restart Discord once for the patch to apply (Discord downloads Krisp dynamically during startup, so it cannot be patched on the first start).
Please note that to know whether the Krisp binary was patched the script is run on every start of the client that results in slightly longer start times but has the advantage that the package does not have to be updated if Discord ever silently updates the binary between client updates over their modules api.