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

Can't drop files into WebCord #464

Open
3 of 7 tasks
neondeex opened this issue Sep 10, 2023 · 16 comments
Open
3 of 7 tasks

Can't drop files into WebCord #464

neondeex opened this issue Sep 10, 2023 · 16 comments
Assignees
Labels
info:Wayland Issues specific to Wayland, likely caused by lack of support by Electron / Chromium. status:wontfix This will not be worked on type:bug Something isn't working

Comments

@neondeex
Copy link

Acknowledgements

  • 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.

  • 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).

  • There are no fixes done to master which 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

@neondeex neondeex added the type:bug Something isn't working label Sep 10, 2023
@SpacingBat3
Copy link
Owner

Most likely a duplicate of #371, #435, and #459, unless you have original CSP settings (i.e. everything toggled on).

@SpacingBat3 SpacingBat3 closed this as not planned Won't fix, can't repro, duplicate, stale Sep 10, 2023
@neondeex
Copy link
Author

I have all in default and i can upload media but i can't drag and drop anything

@SpacingBat3 SpacingBat3 reopened this Sep 10, 2023
@crabreader
Copy link

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.

@SpacingBat3
Copy link
Owner

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?

@SpacingBat3 SpacingBat3 added the status:need-info Further information is requested label Sep 10, 2023
@neondeex
Copy link
Author

I use the AUR version

@SpacingBat3
Copy link
Owner

@neondeex Also, are you on Wayland, XWayland or X11?

@SpacingBat3
Copy link
Owner

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?

@crabreader
Copy link

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.

@SpacingBat3 SpacingBat3 added info:Wayland Issues specific to Wayland, likely caused by lack of support by Electron / Chromium. and removed status:need-info Further information is requested labels Sep 12, 2023
@crabreader
Copy link

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

@SpacingBat3
Copy link
Owner

My issue appears to be related to xwayland, (...)

@crabreader What about running app in Wayland (--ozone-platform-hint=auto or --ozone-platform=wayland)?

@crabreader
Copy link

@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.

@dreamsyntax
Copy link

I can reproduce this on X11 using the Flatpak.
Using the + button and manually picking the file instead of drag&drop works fine.

@SpacingBat3
Copy link
Owner

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.

@lambdcalculus
Copy link

lambdcalculus commented Nov 15, 2023

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.

@SpacingBat3
Copy link
Owner

(…) 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.

@lambdcalculus
Copy link

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.

@SpacingBat3 SpacingBat3 added the status:wontfix This will not be worked on label Nov 16, 2023
@SpacingBat3 SpacingBat3 changed the title Can't drop files into webccord Can't drop files into WebCord Feb 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
info:Wayland Issues specific to Wayland, likely caused by lack of support by Electron / Chromium. status:wontfix This will not be worked on type:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants