Can't drop files into WebCord
Acknowledgements
-
[X] I have checked that there is no other issue describing the same or similar problem that I currently have, regardless if it has been closed or open.
-
[ ] This bug affects Discord website.
-
[X] This issue is confirmed to be reproducible when WebCord is packaged on at least all three latest supported Electron major releases.
-
[ ] This issue is reproducible in Chrome, Chromium or any Chromium-based browser, e.g Brave or Edge (please write in Additional Context which browser you have used if it is neither Chrome nor unmodified Chromium).
-
[X] There are no fixes done to
masterwhich resolves this issue. -
[ ] My issue describes one of the unstable and/or not fully implemented features.
-
[ ] I have found a workaround to mitigate or temporarily fix this issue in affected releases (please write it in Additional context section below).
Operating System / Platform
🐧️ Linux
Operating system architecture
x64 (64-bit Intel/AMD)
Electron version
25.6.0
Application version
4.4.0
Bug description
I can't drop files into any chat
Additional context
No response
Most likely a duplicate of #371, #435, and #459, unless you have original CSP settings (i.e. everything toggled on).
I have all in default and i can upload media but i can't drag and drop anything
Can confirm that I also have this issue, some UI elements become unresponsive when I try to drag and drop files into a chat (cant switch channels, cant type in the chatbar). If switch server it resets and becomes responsive again.
Cannot reproduce it on my end though, at least on Electron 26… What packaging method are you using @neondeex? Also @crabreader are you on the same major version of Electron (i.e. 25) or different?
I use the AUR version
@neondeex Also, are you on Wayland, XWayland or X11?
I use the AUR version
I've tested the build (webcord) from chaotic-aur, things are OK with that…
Also, did you double-checked that Google Storage isn't being disabled for sure in WebCord's settings?
I use electron from the arch extra repository, it seems to be version 25. When I tried to install electron 26 I was unable to make webcord run using that version, I don't know how to build webcord with a specific version of electron.
Also it might be of note that I am using wayland with a nvidia graphics card.
My issue appears to be related to xwayland, I managed to build webcord with electron26 but I didnt realize that it runs under xwayland. I get an error like this when I attempt to drag a file:
[82368:0912/175748.813949:ERROR:x11_drag_context.cc(150)] XConvertSelection failed for source-advertised target 540
My issue appears to be related to xwayland, (...)
@crabreader What about running app in Wayland (--ozone-platform-hint=auto or --ozone-platform=wayland)?
@SpacingBat3 Can confirm that it works when i run webcord with that flag, but I also need to use --disable-gpu for it to launch. I don't know if that can lead into other problems.
I can reproduce this on X11 using the Flatpak. Using the + button and manually picking the file instead of drag&drop works fine.
I can reproduce this on X11 using the Flatpak. Using the + button and manually picking the file instead of drag&drop works fine.
@dreamsyntax That one is actually a problem specific to Flatpaks (or Electron, if there's any app actually functional with drag&drop packaged as Flatpak?) since there's sandboxing going on and it is very likely that drag and drop doesn't work via portals like when adding a file via native dialogs.
I have been having this problem as well. However, I have this issue using Discord (Arch-packaged) Chromium as well. So it might be a Chromium bug. I'm not sure it is a problem with WebCord, as it happens in default Discord as well.
For reference, I am using a wlroots compositor, specifically Hyprland. It would be interesting to see if the issue is related to that.
edit: for extra confirmation, Discord website in Firefox does not have this issue.
(…) I'm not sure it is a problem with WebCord, as it happens in default Discord as well.
It definitely isn't. But I'll track it here. I doubt I can do anything to fix it, it sounds to be highly specific to Wayland and given I don't use a Wayland-based DE nor Chromium is supporting it as a stable, it is unlikely I'll came with some workaround. Possibly reporting this to upstream (i.e. to Chromium or Electron devs) is what should be done.
Oh, just confirmed that --ozone-platform=wayland works for me on both Discord and WebCord, along with Discord in Chromium. I thought I had already done it before, but actually hadn't done it properly: kill all Discord/Webcord/Electron instances before relaunching, otherwise it will run on Xwayland which seems to be the cause of the broken drag-and-drop. Make sure the window does not open as Xwayland and it should work fine.