Skip to content

Discord broke again courtesy of a forced update, quick and dirty workaround included

On the latest discord update, from version 0.0.20 to 0.0.21, it forces you to choose deb, tar.gz, or "I'll figure it out." The quick and dirty workaround is as follows -

cd /opt/discord/resources

sudo nano build_info.json

In there, just change the version from 0.0.20 to 0.0.21, save and quit. Open Discord normally, and it will download updates and log back in as normal.

If the above does not work, the best suggestion I got is to wait for the updated package to appear in the repo.

Edited 22 Oct 2022. We only hold this version.

140 points53 comments
Open on Reddit
About this post
Posted
Archived
Edited
Score
140 · 89% up
Kind
Text
ID
yacgnu

Author

1
posts
5
comments
0
media
View profile

59 comments

it is very well explained in the ArchWiki.

no need to edit a file in /opt/ and trick Discord into thinking it's a newer version, as this can sometimes cause an issue.

https://wiki.archlinux.org/title/Discord#Discord_asks_for_an_update_not_yet_available_in_the_repository

108 points

Something like this is posted every time discord updates and every time there's a comment with the archwiki solution 🥲

41 points
unknown author

Deleted before we saved it.

1 points

Might be missing something, but can’t you just add “SKIP_HOST_UPDATE”: true to your .config/discord/settings.json?

34 points

I did. You need to include the comma at the end of the line that the Wiki doesn't mention. E.g. here's my amended config file:

{
"IS_MAXIMIZED": false,  
"IS_MINIMIZED": false,  
"SKIP_HOST_UPDATE": true,  
"WINDOW_BOUNDS": {  
    "x": 0,  
    "y": 0,  
    "width": 1920,  
    "height": 997  
}  
}
9 points

Depends on where you put it. If it's the last property it can't have a comma.

{
"IS_MAXIMIZED": false,  
"IS_MINIMIZED": false,  
"WINDOW_BOUNDS": {  
    "x": 0,  
    "y": 0,  
    "width": 1920,  
    "height": 997  
},
"SKIP_HOST_UPDATE": true
}
6 points

This has never worked for me, not sure why :/

4 points

Its hardly any trouble to just update it yourself though.

It's as easy as

$ asp export discord && cd discord
$ sed '/^pkgver/ s/20/21/' -i PKGBUILD
$ makepkg --skipchecksums --install

if you're lazy, maybe bother to update the checksums if you're determined.

18 points

This will not update to a newer version of discord, it'll only change version

Trick with changing json will work and will be repaired by pacman in next update (it's on Arch wiki)

-10 points

This will not update to a newer version of discord, it'll only change version

You have it exactly backwards, this does update to the newest version of Discord, while OP's suggestion will only change the module versions.

The above is basically all the package maintainer is going to do when they build the updated package for the repos. It's silly to wait for them to do it for you if you want the update now.

Trick with changing json will work and will be repaired by pacman in next update (it's on Arch wiki)

Yes, I know it's on the wiki. I wrote that section and used to revert this hack when people kept adding it, but don't bother anymore.

13 points

At least one of us doesn't understand what those commands do. Maybe both of us! But it looks to me like that downloads the PKGBUILD from the Arch repo, changes the file that it downloads from Discord's official site, then rebuilds and installs the package. So that should actually update Discord to the latest version. Assuming there are no changes to the required dependencies, that is the same change to the PKGBUILD that the maintainer will make once they get around to updating the package on the repo.

4 points

Yes it will upgrade Discord to the new version, since you are building a package for it.

Now a valid answer is going in downvote hell.

3 points

You can download the tar.gz, extract it and run it from the extracted directory until the repos are updated.

14 points

Expanding on this:

You can also just extract the tarball inside the /opt/, delete the soft link /bin/discord and create a new one, from /opt/Discord/Discord. That way, pacman can make changes to it regardless

1 points

That's been a process that resulted in bad things happening for me, since all the tutorials I could find for a first timer attempting it had some assumptions of knowledge of the process that I really don't have.

-1 points

You don't install it, you extract it to your home directory. Go into the extracted directory and ./discord

When pacman upgrades discord, delete the dir in your home..

Works 100% of the time.

24 points

You have no idea, this morning I bricked my install trying to do that and spent almost all day getting back to where I was...

1 points

I hate the fact that the entire goddamn world uses this app. it's gobshite and slow as molasses. The 6-digit income devs that make Discord just assume that everyone in the world has an i9-13900k paired with 128GB of DDR5.

And isn't the entire point of an Electron App is that you can seamlessly update your JS code since it's just Chromium stuck to one web page?

14 points

Oh boy if I you think Discord is slow wait until you try Microsoft Teams

9 points

I just tried it.

Something tells me money isn't a guarantee for good software.....

4 points

Friends don't let friends use Discord. Also one malicious user reports you and your "server" is gone. (one user uploads banned stuff, the other reports, moderation deletes).

If I really have to use it for something it's in a private browser window.

EDIT: worst thing is when people use it as a bug tracker: no search, not on any search engine. Downloads gated behind an account.

2 points

A number of groups I'm in shut down their forums and moved to Discord. All that wealth of easily searchable, recorded and organized information, either gone or abandoned. I hated it.

6 points

I make the file ~/.local/bin/discord and then change the .desktop files and such to run from it, with the following contents:

#!/bin/sh

/bin/discord --enable-gpu-rasterization --enable-zero-copy --enable-gpu-compositing --enable-native-gpu-memory-buffers --enable-oop-rasterization --enable-features=UseSkiaRenderer $@

It speeds up the program quite a bit for me. It's the same launch flags the flatpak for discord uses.

1 points

This package could be automatically built and uploaded by the maintainer. It would save the hassle of meddling with the updates in a very short window.

12 points

How would signing the package work automatically?

1 points

You can't put your signing key on the same machine as the automated package builder? Or it needs cross-signing? I am not aware of the signing process though.

3 points

Thanks, this worked for me. But the directory for that file, for me at least, is /opt/discord/resources as opposed to being located in the home folder as indicated above

12 points

I don't know this issue always comes up. Brodie Robertson had made a video about this already. You need nit change the version in info files to show you have a new versuon. You can just ask discord to just not do version check anymore, by jut setting an option in configuration. https://youtu.be/3OEfr7L-gUk

4 points

Just upgrade the package yourself:

cd /tmp
asp checkout discord
cd discord/trunk
sed -i 's/0.0.20/0.0.21/g' PKGBUILD
updpkgsums
makepkg -sri
4 points

I've been using the flatpak for years and I haven't had this issue. You can also use webcord if you want better control over permissions and way better Wayland support (you can screenshare for example)

3 points

If you can try Flatpak/Snap after that change I never got any problem with Discord.

2 points

As others have said, the easy option is just use the flatpak version of Discord. This is not an issue there.

2 points

I've only used discord a little bit. does the app offer much that the web version can't do?

1 points

Keybindings for one because no one wants to hear what’s going on in your background

1 points

I just install the standard package and the canary package and when one does this, the other is usually working. I like your fix better though, much more “hold my beer, I got this”.

1 points

I temporarily build from aur till the main repo is updated.

1 points

I just have a small script for this. Before running the script for the first time, I removed the Discord package (sudo pacman -R discord):

#!/bin/bash

wget "https://discordapp.com/api/download/stable?platform=linux&format=tar.gz" -O ~/Downloads/discord.tar.gz
file=~/Downloads/discord.tar.gz
sudo tar -zxvf $file -C /opt/
rm $file

The first time you do this, copy /opt/Discord/discord.desktop to .local/share/applications/discord.desktop and change the Exec location in that file to /opt/Discord/Discord. The next time this happens, you can just run the script and it will work without messing with the discord.desktop file.

1 points

just use this PKGBUILD, build with makepkg -si

to be clear this is the PKGBUILD of the repo package, just with the new version instead

there is some weirdness with the checksums, so run makepkg script once, then keep the downloaded .html files and insert their checksums generated by sha512sum *.html into the PKGBUILD and run makepkg again

UPDATE: aaaand the official package has been updated :)

# Maintainer: Filipe Laíns (FFY00) <lains@archlinux.org>
# Maintainer: Morgan <morganamilo@archlinux.org>

pkgname=discord
_pkgname=Discord
pkgver=0.0.21
pkgrel=0
pkgdesc="All-in-one voice and text chat for gamers that's free and secure."
arch=('x86_64')
url='https://discordapp.com'
license=('custom')
depends=('libnotify' 'libxss' 'nspr' 'nss' 'gtk3')
optdepends=('libpulse: Pulseaudio support'
            'xdg-utils: Open files')
source=("https://dl.discordapp.net/apps/linux/$pkgver/$pkgname-$pkgver.tar.gz"
        'LICENSE.html::https://discordapp.com/terms'
        'OSS-LICENSES.html::https://discordapp.com/licenses')
sha512sums=('149ae5b8b7d92549e12eca52e45d3f5761ef022ae321cf33fadc3b56c4cee0616a5166380faea038256213713a7aa90e1befc4caa3e6a4de8e15c1cb1d8f925d'
            'fix'
            'secondfix')


prepare() {
  cd $_pkgname

  sed -i "s|Exec=.*|Exec=/usr/bin/$pkgname|" $pkgname.desktop
  echo 'Path=/usr/bin' >> $pkgname.desktop
}

package() {
  # Install the app
  install -d "$pkgdir"/opt/$pkgname
  cp -a $_pkgname/. "$pkgdir"/opt/$pkgname

  chmod 755 "$pkgdir"/opt/$pkgname/$_pkgname

  rm "$pkgdir"/opt/$pkgname/postinst.sh

  install -d "$pkgdir"/usr/{bin,share/{pixmaps,applications}}
  ln -s /opt/$pkgname/$_pkgname "$pkgdir"/usr/bin/$pkgname
  ln -s /opt/$pkgname/discord.png "$pkgdir"/usr/share/pixmaps/$pkgname.png
  ln -s /opt/$pkgname/$pkgname.desktop "$pkgdir"/usr/share/applications/$pkgname.desktop

  # setuid on chrome-sandbox
  chmod u+s "$pkgdir"/opt/$pkgname/chrome-sandbox

  # Licenses
  install -Dm 644 LICENSE.html "$pkgdir"/usr/share/licenses/$pkgname/LICENSE.html
  install -Dm 644 OSS-LICENSES.html "$pkgdir"/usr/share/licenses/$pkgname/OSS-LICENSES.html
}
1 points
unknown author

Deleted before we saved it.

1 points

I created this update script https://gitlab.com/dustwolf/discord-update It changes the settings to disable auto-updates and then updates the package using a systemd timer.

The code is made to work on Ubuntu but can probably be adapted for other platforms without much trouble.

The solution is comparable to using a snap, but less centralized (I don't trust snaps).

1 points
unknown author2 hidden

Deleted before we saved it.

-1 points

This defeats the purpose of using a package manager.

7 points
unknown author

Deleted before we saved it.

0 points
unknown author

Deleted before we saved it.

-2 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.