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

Discord is staying on version 0.0.74 until the file chooser portal issue is fixed #483

Closed
guihkx opened this issue Nov 21, 2024 · 46 comments · Fixed by #492
Closed

Discord is staying on version 0.0.74 until the file chooser portal issue is fixed #483

guihkx opened this issue Nov 21, 2024 · 46 comments · Fixed by #492
Assignees
Labels
upstream Issues that we can't fix because they are Discord's

Comments

@guihkx
Copy link
Collaborator

guihkx commented Nov 21, 2024

This issue should serve as a reminder to people wondering why we might not update Discord to upcoming releases immediately:

Discord 0.0.75 started shipping Electron 32.2.2, a version that ended up breaking the file chooser portal, and therefore making it impossible for users to upload files to Discord in a regular manner (unless these files are stored in one of the whitelisted directories).

I personally think that file uploading is an important feature to stay broken like that for who-knows-how-long. For that reason, I decided to downgrade Discord to 0.0.74 and stay on that version until the problem is fixed.

I'm personally monitoring new stable Discord releases and will be testing them locally to make sure the portal issue is fixed before we release it for everyone.

@guihkx guihkx added upstream Issues that we can't fix because they are Discord's waiting Issues waiting for something else to happen labels Nov 21, 2024
@guihkx guihkx pinned this issue Nov 21, 2024
@guihkx guihkx self-assigned this Nov 22, 2024
@guihkx
Copy link
Collaborator Author

guihkx commented Nov 25, 2024

Version 0.0.76 (released today) remains broken.

@fishxz
Copy link

fishxz commented Nov 27, 2024

hey, is there a way to upgrade despite this issue?

@guihkx
Copy link
Collaborator Author

guihkx commented Nov 27, 2024

Right now the only way to achieve that is by building/packaging a newer version of Discord on your own machine.

@winkelnp
Copy link

winkelnp commented Dec 3, 2024

Despite having added the "SKIP_HOST_UPDATE" option to ~/.var/app/com.discordapp.Discord/config/discord/settings.json the app is refusing to open and asking to update, is there a reason this option doesn't work anymore? Maybe due to 0.76 being out now therefore being two versions old?

@guihkx
Copy link
Collaborator Author

guihkx commented Dec 3, 2024

@winkelnp I'm not experiencing the issue you're describing here...

Can you share the output of flatpak run com.discordapp.Discord?

@winkelnp
Copy link

winkelnp commented Dec 3, 2024

Output of `flatpak run com.discordapp.Discord`
Disabling updates already done
Discord 0.0.74
Gtk-Message: 00:32:18.295: Failed to load module "window-decorations-gtk-module"
Gtk-Message: 00:32:18.295: Failed to load module "colorreload-gtk-module"
Starting app.
Starting updater.
2024-12-03T23:32:18.344Z [Modules] Modules initializing
2024-12-03T23:32:18.344Z [Modules] Distribution: remote
2024-12-03T23:32:18.344Z [Modules] Host updates: enabled
2024-12-03T23:32:18.344Z [Modules] Module updates: enabled
2024-12-03T23:32:18.345Z [Modules] Module install path: /home/winkel/.local/share/discord/0.0.74/modules
2024-12-03T23:32:18.345Z [Modules] Module installed file path: /home/winkel/.local/share/discord/0.0.74/modules/installed.json
2024-12-03T23:32:18.345Z [Modules] Module download path: /home/winkel/.local/share/discord/0.0.74/modules/pending
splashScreen.initSplash(false)
CDM component API found
blackbox: 2024-12-03T23:32:18.434Z 0 

----------------------------------------------
blackbox: 2024-12-03T23:32:18.436Z 1 Discord starting: {"releaseChannel":"stable","version":"0.0.74"}, modulepath: /home/winkel/.local/share/discord/0.0.74/modules
blackbox: 2024-12-03T23:32:18.436Z 2 ✅ webContents.created web1 ""
blackbox: 2024-12-03T23:32:18.437Z 3 ✅ window.created win1 "discord"
splashScreen: SPLASH_SCREEN_READY
2024-12-03T23:32:18.501Z [Modules] Bootstrapping...
2024-12-03T23:32:18.501Z [Modules] Installing discord_desktop_core@0 from /app/discord/resources/bootstrap/discord_desktop_core.zip
splashScreen: installing-module discord_desktop_core 1 6
splashScreen.updateSplashState installing-updates installing-updates { current: 1, total: 6 }
splashScreen.webContentsSend: SPLASH_UPDATE_STATE SPLASH_UPDATE_STATE [ { status: 'installing-updates', current: 1, total: 6 } ]
2024-12-03T23:32:18.503Z [Modules] Failed installing discord_desktop_core@0: Error: ENOENT: no such file or directory, open '/app/discord/resources/bootstrap/discord_desktop_core.zip'
splashScreen: installed-module discord_desktop_core 1 6 false
2024-12-03T23:32:18.504Z [Modules] Installing discord_erlpack@0 from /app/discord/resources/bootstrap/discord_erlpack.zip
splashScreen: installing-module discord_erlpack 2 6
splashScreen.updateSplashState installing-updates installing-updates { current: 2, total: 6 }
splashScreen.webContentsSend: SPLASH_UPDATE_STATE SPLASH_UPDATE_STATE [ { status: 'installing-updates', current: 2, total: 6 } ]
2024-12-03T23:32:18.505Z [Modules] Failed installing discord_erlpack@0: Error: ENOENT: no such file or directory, open '/app/discord/resources/bootstrap/discord_erlpack.zip'
splashScreen: installed-module discord_erlpack 2 6 false
2024-12-03T23:32:18.505Z [Modules] Installing discord_spellcheck@0 from /app/discord/resources/bootstrap/discord_spellcheck.zip
splashScreen: installing-module discord_spellcheck 3 6
splashScreen.updateSplashState installing-updates installing-updates { current: 3, total: 6 }
splashScreen.webContentsSend: SPLASH_UPDATE_STATE SPLASH_UPDATE_STATE [ { status: 'installing-updates', current: 3, total: 6 } ]
2024-12-03T23:32:18.506Z [Modules] Failed installing discord_spellcheck@0: Error: ENOENT: no such file or directory, open '/app/discord/resources/bootstrap/discord_spellcheck.zip'
splashScreen: installed-module discord_spellcheck 3 6 false
2024-12-03T23:32:18.506Z [Modules] Installing discord_utils@0 from /app/discord/resources/bootstrap/discord_utils.zip
splashScreen: installing-module discord_utils 4 6
splashScreen.updateSplashState installing-updates installing-updates { current: 4, total: 6 }
splashScreen.webContentsSend: SPLASH_UPDATE_STATE SPLASH_UPDATE_STATE [ { status: 'installing-updates', current: 4, total: 6 } ]
2024-12-03T23:32:18.506Z [Modules] Failed installing discord_utils@0: Error: ENOENT: no such file or directory, open '/app/discord/resources/bootstrap/discord_utils.zip'
splashScreen: installed-module discord_utils 4 6 false
2024-12-03T23:32:18.507Z [Modules] Installing discord_voice@0 from /app/discord/resources/bootstrap/discord_voice.zip
splashScreen: installing-module discord_voice 5 6
splashScreen.updateSplashState installing-updates installing-updates { current: 5, total: 6 }
splashScreen.webContentsSend: SPLASH_UPDATE_STATE SPLASH_UPDATE_STATE [ { status: 'installing-updates', current: 5, total: 6 } ]
2024-12-03T23:32:18.507Z [Modules] Failed installing discord_voice@0: Error: ENOENT: no such file or directory, open '/app/discord/resources/bootstrap/discord_voice.zip'
splashScreen: installed-module discord_voice 5 6 false
2024-12-03T23:32:18.507Z [Modules] Installing discord_zstd@0 from /app/discord/resources/bootstrap/discord_zstd.zip
splashScreen: installing-module discord_zstd 6 6
splashScreen.updateSplashState installing-updates installing-updates { current: 6, total: 6 }
splashScreen.webContentsSend: SPLASH_UPDATE_STATE SPLASH_UPDATE_STATE [ { status: 'installing-updates', current: 6, total: 6 } ]
2024-12-03T23:32:18.507Z [Modules] Failed installing discord_zstd@0: Error: ENOENT: no such file or directory, open '/app/discord/resources/bootstrap/discord_zstd.zip'
2024-12-03T23:32:18.508Z [Modules] Finished module installations. [success: 0] [failure: 6]
splashScreen: installed-module discord_zstd 6 6 false
splashScreen: installing-modules-finished 0 0
2024-12-03T23:32:18.508Z [Modules] Checking for host updates.
splashScreen: checking-for-updates
splashScreen.updateSplashState checking-for-updates checking-for-updates { current: 6, total: 6 }
splashScreen.webContentsSend: SPLASH_UPDATE_STATE SPLASH_UPDATE_STATE [ { status: 'checking-for-updates', current: 6, total: 6 } ]
blackbox: 2024-12-03T23:32:18.546Z 4 ✅ webContents.did-finish-load web1
CDM completed with err: cdm-ready-timeout-200
[Updates] You are out of date!
2024-12-03T23:32:19.111Z [Modules] Host update is available. Manual update required!
splashScreen: update-manually 0.0.76
splashScreen.updateSplashState update-manually update-manually { current: 6, total: 6, newVersion: '0.0.76' }
splashScreen.webContentsSend: SPLASH_UPDATE_STATE SPLASH_UPDATE_STATE [
  {
    status: 'update-manually',
    current: 6,
    total: 6,
    newVersion: '0.0.76'
  }
]
splashScreen: update-check-finished true 1 true
[54:1204/003222.444064:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 1 times!
blackbox: 2024-12-03T23:32:27.431Z 5 window.close win1
blackbox: 2024-12-03T23:32:27.439Z 6 webContents.destroyed web1
2024/12/04 00:32:27 socat[4] W exiting on signal 15

@guihkx
Copy link
Collaborator Author

guihkx commented Dec 4, 2024

Uhh, there seems to be something really wrong with your Flatpak/Discord installation here.

Your logs are saying that Discord is installed to /home/winkel/.local/share/discord/..., when it actually should be installed to /home/winkel/.var/app/com.discordapp.Discord/config/discord/....

I'm not sure if you did that intentionally (e.g. through symlinks or Flatpak overrides), but I'm afraid that's an unsupported setup.

If you're willing to delete all your local Discord user data and start from scratch, you can try deleting the entire ~/.var/app/com.discordapp.Discord directory. Then launch Discord again and see if it solves your issue.

@winkelnp
Copy link

winkelnp commented Dec 4, 2024

I have no idea what is happening there, I've now deleted the directory, reinstalled Discord etc, but somehow it still says that. I've removed any and all overrides, it should all be running as stock, but is still giving me that message.
That directory doesn't even exist...

@guihkx
Copy link
Collaborator Author

guihkx commented Dec 5, 2024

Yeah, I'm not sure what's going on there either, especially because I think the only way to change ~/.var to something else is by manually creating symlinks or bind mounts, or maybe by modifying Flatpak's source code... 🤷

@guihkx
Copy link
Collaborator Author

guihkx commented Dec 10, 2024

Discord 0.0.77 (released today) still ships Electron 32.2.2, and so the file chooser portal remains broken.

@guihkx
Copy link
Collaborator Author

guihkx commented Dec 17, 2024

Discord 0.0.78 (released today) now ships Electron 32.2.7, but the file chooser portal is still broken on that version.

@guihkx
Copy link
Collaborator Author

guihkx commented Jan 7, 2025

Discord 0.0.79 (released today) still ships Electron 32.2.7, and so the file chooser portal remains broken.

@Sn0wCrack
Copy link

Electron has a "workaround" that could allow fixing this, however it has only landed into Electron 34 as of the time of writing: electron/electron#44426

There does appear to be a chance it will be backported, but it's not guaranteed at this stage.

On the xdg-desktop-portal side the required version by Electron 32 is expected "in the coming months".

@guihkx
Copy link
Collaborator Author

guihkx commented Jan 8, 2025

Yeah, right now the hope is that they backport that fix to the 33.x and 32.x branches, but so far no one has sent a pull request.

But I think Discord maintains its own Electron fork (here), so it might be worthwhile to ask them to patch that into their fork.

@Subwaytime
Copy link

It seems like Discord now blocks these older Versions, thus it has stopped working as the flatpak Version :/

@guihkx
Copy link
Collaborator Author

guihkx commented Jan 8, 2025

0.0.74 is still working just fine for me. What specific problems are you having?

@Subwaytime
Copy link

Subwaytime commented Jan 8, 2025

Discord got updated today and then it flashed for a second "Outdated Version". Now whenever i try to open it, there is a Discord Window and a grey background. No error messages, no Logs nothing! Tried to clear all cache and reinstall it, same Situation..

@guihkx
Copy link
Collaborator Author

guihkx commented Jan 8, 2025

Discord shouldn't even be trying to update itself because we disable that functionality with a script.

Can you try to reset Discord and try to set it up again? Before proceeding, please be aware that this will remove all your local Discord data:

# kill any Discord instance (if any)
$ flatpak kill com.discordapp.Discord
# update all your flatpaks first, just in case
$ flatpak update
# remove all Discord data
$ rm -rf ~/.var/app/com.discordapp.Discord
# run Discord again
$ flatpak run com.discordapp.Discord

If you still don't get a working Discord client after that, please share the output of the flatpak run com.discordapp.Discord command here.

@elmagio
Copy link

elmagio commented Jan 8, 2025

Discord shouldn't even be trying to update itself because we disable that functionality with a script.

Can you try to reset Discord and try to set it up again? Before proceeding, please be aware that this will remove all your local Discord data:

# kill any Discord instance (if any)
$ flatpak kill com.discordapp.Discord
# update all your flatpaks first, just in case
$ flatpak update
# remove all Discord data
$ rm -rf ~/.var/app/com.discordapp.Discord
# run Discord again
$ flatpak run com.discordapp.Discord

If you still don't get a working Discord client after that, please share the output of the flatpak run com.discordapp.Discord command here.

I'd had the same issue as @Subwaytime so I tried to do this. Discord tried to update itself again and failed to properly launch, same as before.

splashScreen: installing-module-progress discord_zstd 100
splashScreen.updateSplashState installing-updates installing-updates { current: 6, total: 6, progress: 100 }
splashScreen.webContentsSend: SPLASH_UPDATE_STATE SPLASH_UPDATE_STATE [
{ status: 'installing-updates', current: 6, total: 6, progress: 100 }
]
2025-01-08T13:37:35.697Z [Modules] Finished module installations. [success: 6] [failure: 0]
splashScreen: installed-module discord_zstd 6 6 true
splashScreen: installing-modules-finished 6 0
2025-01-08T13:37:35.697Z [Modules] Host is up to date.
2025-01-08T13:37:35.697Z [Modules] Checking for module updates at https://discord.com/api/modules/stable/versions.json
splashScreen: checking-for-updates
splashScreen.updateSplashState checking-for-updates checking-for-updates { current: 6, total: 6 }
splashScreen.webContentsSend: SPLASH_UPDATE_STATE SPLASH_UPDATE_STATE [ { status: 'checking-for-updates', current: 6, total: 6 } ]
2025-01-08T13:37:35.703Z [Modules] No module updates available.
splashScreen: update-check-finished true 0 false
splashScreen.launchMainWindow: false
Optional module ./ElectronTestRpc was not included.
splashScreen.updateSplashState launching launching { current: 6, total: 6 }
splashScreen.webContentsSend: SPLASH_UPDATE_STATE SPLASH_UPDATE_STATE [ { status: 'launching', current: 6, total: 6 } ]
blackbox: 2025-01-08T13:37:35.795Z 5 ✅ webContents.created web2 ""
blackbox: 2025-01-08T13:37:35.799Z 6 ✅ window.created win2 "Discord"
mainScreen.on(did-finish-load) false false
blackbox: 2025-01-08T13:38:36.542Z 7 ✅ webContents.did-finish-load web2
splashScreen.pageReady
[56:0108/143836.544608:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 1 times!
[56:0108/143836.547894:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 2 times!
blackbox: 2025-01-08T13:38:36.645Z 8 window.close win1
blackbox: 2025-01-08T13:38:36.672Z 9 webContents.destroyed web1
blackbox: 2025-01-08T13:38:36.679Z 10 window.closed win1
[56:0108/143837.801205:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 3 times!

I didn't post the entire output because most of it was variations of splashScreen.updateSplashState installing-updates installing-updates { current: 6, total: 6, progress: 100 } about the whole updating progress and there was a lot of it, but this is the end of the process at least.

@guihkx
Copy link
Collaborator Author

guihkx commented Jan 8, 2025

Having the entire log is better to avoid ambiguity, but I'm guessing these messages are the result of Electron crashing and not being able to install the updates:

[56:0108/143836.544608:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 1 times!
[56:0108/143836.547894:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 2 times!
[56:0108/143837.801205:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 3 times!

It seems that there's an upstream issue about it, but with no actual solution yet.

Can you try launching Discord with --disable-gpu-sandbox? i.e.:

flatpak run com.discordapp.Discord --disable-gpu-sandbox

@Subwaytime
Copy link

Oddly enough, running it through terminal makes Discord work.
So this works flatpak run com.discordapp.Discord - This here causes the same issues as above:
/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=com.discordapp.Discord --file-forwarding

@elmagio
Copy link

elmagio commented Jan 8, 2025

Can you try launching Discord with --disable-gpu-sandbox? i.e.:

flatpak run com.discordapp.Discord --disable-gpu-sandbox

So this didn't work, the same issue kept happening (even after going through the whole process including rm -rf ~/.var/app/com.discordapp.Discord)

But I tried again a couple minutes ago and now it works without any launch argument. Not quite sure what changed.

@guihkx
Copy link
Collaborator Author

guihkx commented Jan 8, 2025

I have no idea either. Maybe that crash is completely random (which would explain why it hasn't been fixed yet). Hopefully it doesn't happen again...

@guihkx
Copy link
Collaborator Author

guihkx commented Jan 13, 2025

Discord 0.0.80 (released today) still ships Electron 32.2.7, and so the file chooser portal remains broken.

@Sn0wCrack
Copy link

Looks like someone has started a manual backport to Electron 32: electron/electron#45193

Hopefully this lands before the next Discord update and they push to this version of Electron 32

@Sn0wCrack
Copy link

Sn0wCrack commented Jan 15, 2025

Looks like it's been merged in now, guess keep our eyes out for v32.2.9 (or v32.3.0 depending)

As of now the only released Electron version with the fix is v34.0.0.

@otjamin
Copy link

otjamin commented Jan 15, 2025

Yeah, right now the hope is that they backport that fix to the 33.x and 32.x branches, but so far no one has sent a pull request.

But I think Discord maintains its own Electron fork (here), so it might be worthwhile to ask them to patch that into their fork.

I wanted to open a pull request with the fix, but it looks like Discord is no longer using this fork. The last commit there is several months old.

We will probably just have to wait and see.

@guihkx
Copy link
Collaborator Author

guihkx commented Jan 22, 2025

Discord 0.0.81 (released today) still ships Electron 32.2.7, so the file chooser portal remains broken.

@Sn0wCrack
Copy link

Sn0wCrack commented Jan 23, 2025

Looks like Electron 32.3.0 has released a little bit ago with the fix included.

Hopefully Discord bumps their Electron version for the next release and we can get some updates again.
This version does include some back ports of security fixes so hopefully that increases the likelihood of this getting updated sooner rather than later too.

@Sn0wCrack
Copy link

Looking into another issue I was having with Visual Studio code, I've found that there is another issue in Electron 32.3.0 (and any other current Electron version) where pasting no longer works if controlled by the application: microsoft/vscode#238609

I'm unsure if this will effect Discord outside of the "context menu" paste option or not.

@guihkx
Copy link
Collaborator Author

guihkx commented Jan 27, 2025

Discord 0.0.82 (released today) still ships Electron 32.2.7, so the file chooser portal remains broken.

I've found that there is another issue in Electron 32.3.0 (and any other current Electron version) where pasting no longer works if controlled by the application: microsoft/vscode#238609

I just tested copying and pasting in 0.0.82, using both the keyboard and Discord's own context menu, and thankfully it seems to be working just fine still.

@guihkx
Copy link
Collaborator Author

guihkx commented Feb 3, 2025

Discord 0.0.83 (released today) still ships Electron 32.2.7, so the file chooser portal remains broken.

@guihkx
Copy link
Collaborator Author

guihkx commented Feb 4, 2025

Discord 0.0.84 (released today) still ships Electron 32.2.7, so the file chooser portal remains broken.

This version was released just one day after 0.0.83, and I suspect it was only done to fix an unrelated issue with glibc 2.41.

@gabriele2000

This comment has been minimized.

@guihkx
Copy link
Collaborator Author

guihkx commented Feb 10, 2025

Discord 0.0.85 (released today) still ships Electron 32.2.7, so the file chooser portal remains broken.

@Khnome

This comment has been minimized.

@guihkx
Copy link
Collaborator Author

guihkx commented Feb 18, 2025

Bad news, everyone.

Discord 0.0.86 just got released, and they've finally updated their Electron version to 33.4.0 from 32.2.7.

The problem is, the file chooser portal bug has only been fixed in versions 32.3.0 and 34.0.0, while the fix for 33.x is still being worked on... 😢

And now I'm really conflicted: On the one hand, if I decide to just update our Flatpak package to 0.0.86, it will break a feature that was previously working perfectly for everyone.

On the other hand, if we stay on 0.0.74, either until Discord devs update to Electron 34, or until Electron devs land the fix for Electron 33, this will likely keep us from updating Discord for months, again.

And I know Wayland users have been eagerly waiting for streaming/recording support added in Discord 0.0.80.

I think I will first try to send an email to Discord devs, explaining this whole situation, and ultimately asking them to consider updating to Electron 34 (which has the portal fix), or maybe help moving forward the portal fix for Electron 33.x...

As usual, I'll keep you guys posted on any updates.

@elmagio
Copy link

elmagio commented Feb 18, 2025

I'm not trying to sound abrasive but it's kind of maddening that despite this Flatpak being marked as verified, the only way to maybe have Discord devs made aware of this is to have a maintainer resort to sending them emails. Some level of involvement from the organization (in this case, Discord) with the Flatpak repository should be mandatory for verified status.

Regardless, hope your efforts bear fruits @guihkx .

@stacyharper
Copy link

The "verified" flatpak marker should not be trusted for anything. It doesn't means the software dev is behind the flatpak builds.

@guihkx
Copy link
Collaborator Author

guihkx commented Feb 18, 2025

While I do believe that Discord’s verified badge on Flathub is subject to criticism — feel free to post your thoughts on issue #343, but please be respectful —, complaining about it here won't solve the issue at hand, so I kindly ask everyone to keep the discussion on topic.

@Sn0wCrack
Copy link

It appears there's some movement again on the backport of the fix to 33.x which is good at least.

Honestly at this rate we might see xdg-desktop-portal 1.20 release before we see this merged and released on Electron's end and to get Discord updated to it 😂

So here's hoping you reaching out to Discord might get us bumped to 34.x so we won't have to wait.

@bbhtt
Copy link

bbhtt commented Feb 18, 2025

Hi, @klow-discord can you please share any timeline if available on when Discord might start to use Electron 34?

@Mondrethos
Copy link

Bad news, everyone.

Discord 0.0.86 just got released, and they've finally updated their Electron version to 33.4.0 from 32.2.7.

The problem is, the file chooser portal bug has only been fixed in versions 32.3.0 and 34.0.0, while the fix for 33.x is still being worked on... 😢

And now I'm really conflicted: On the one hand, if I decide to just update our Flatpak package to 0.0.86, it will break a feature that was previously working perfectly for everyone.

On the other hand, if we stay on 0.0.74, either until Discord devs update to Electron 34, or until Electron devs land the fix for Electron 33, this will likely keep us from updating Discord for months, again.

And I know Wayland users have been eagerly waiting for streaming/recording support added in Discord 0.0.80.

I think I will first try to send an email to Discord devs, explaining this whole situation, and ultimately asking them to consider updating to Electron 34 (which has the portal fix), or maybe help moving forward the portal fix for Electron 33.x...

As usual, I'll keep you guys posted on any updates.

Since I've been on Linux, I've always had to use Flatseal to allow this flatpak access to other folders for uploading. I just recently did it on canary. I think it will be fine if you allow the flatpak to update with a proper note on the page/this repo about using flatpeak until that's fixed.

@guihkx
Copy link
Collaborator Author

guihkx commented Feb 20, 2025

I've always had to use Flatseal to allow this flatpak access to other folders for uploading

I see your point, but that's only necessary if you must use drag and drop (Electron bug: electron/electron#30650).

If you use the file upload button from Discord's UI (or Ctrl+Shift+U), the file chooser portal gets used, which allows you to choose files from any location on your computer. But that's what's been broken since Discord 0.0.75...

Anyway, I'm seeing all your feedback and I just opened a pull request that updates Discord to 0.0.86 0.0.87 and enables Wayland by default here:

I think that enabling Wayland by default can be a breaking change, so testing and feedback are very welcome — especially if you're on Wayland with NVIDIA or Intel hardware.

Those interested in this, are invited to install the test build, and then run Discord with:

flatpak run com.discordapp.Discord//test

Please leave any feedback (positive or negative) on the pull request. Thanks.

@Sn0wCrack
Copy link

Sn0wCrack commented Feb 21, 2025

Just as a heads up but xdg-desktop-portal 1.20 has released as of a couple days ago.
I imagine this issue will be resolved for rolling release distros shortly once the package is updated as this version of xdg-desktop-portal has the required version number for this to function.

UPDATE: xdg-desktop-portal 1.20 is now out on Arch. I've been running the test branch of the flatpak since yesterday and can confirm the file chooser dialog works perfectly fine again.

@guihkx guihkx removed the waiting Issues waiting for something else to happen label Feb 24, 2025
@guihkx
Copy link
Collaborator Author

guihkx commented Feb 24, 2025

It's done, Discord has been updated to 0.0.87. It will take a few hours before is finally available for everyone, though.

Please note that Wayland support has not been enabled by default as originally planned, so users interested in that are still required to do that manually.

Another important reminder is that the problem with the file chooser portal has not been fixed with that Discord update, so if you have trouble uploading files from specific locations, you can either:

1. Simply move that file to one of the allowed directories: ~/Downloads, ~/Music or ~/Pictures
2. Manually add a filesystem override (see the "Unrestricted File Access" section)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
upstream Issues that we can't fix because they are Discord's
Projects
None yet
Development

Successfully merging a pull request may close this issue.