snapcrafters / discord

A community-maintained package to easily install Discord on Linux
MIT License
73 stars 18 forks source link

[Bug]: sharing an application window does not work on Kubuntu 22.04 #233

Open niko-lay opened 5 days ago

niko-lay commented 5 days ago

What happened?

I'm using Kubuntu 22.04 with Discord from snap and month ago (I guess since end of Jul or beginning of Aug) Discord is unable to show list of application windows to share. But sharing entire screen is working. Screenshot_20240916_133809

Also checked on Kubuntu 24.04 - the same behavior, Discord doesn't show list of applications. But Discord from .deb is working as expected

What should have happened?

allow share single application window from Discord

Output of snap info discord

~# snap info discord
name:      discord
summary:   Chat for Communities and Friends
publisher: Snapcrafters✪
store-url: https://snapcraft.io/discord
contact:   https://github.com//snapcrafters/discord/issues
license:   Proprietary
description: |
  Discord is the easiest way to communicate over voice, video, and text. Chat, hang out, and stay
  close with your friends and communities.

  Snaps are confined, as such Discord may be unable to perform some of the tasks it typically does
  when unconfined. This may result in the system log getting spammed with apparmor errors. Granting
  access to the system-observe interface when in the snap will enable the features, and thus reduce
  the logging.

    snap connect discord:system-observe

  **Authors**

  This snap is maintained by the Snapcrafters community, and is not necessarily endorsed or
  officially maintained by the upstream developers.
commands:
  - discord
snap-id:      qHVefGEBezeuCeSfTND40uoUD6GRw8BO
tracking:     latest/stable
refresh-date: 4 days ago, at 12:46 CEST
channels:
  latest/stable:    0.0.68 2024-09-10 (207) 117MB -
  latest/candidate: 0.0.68 2024-09-10 (207) 117MB -
  latest/beta:      ↑                             
  latest/edge:      ↑                             
installed:          0.0.68            (207) 117MB -

Output of snap connections discord

~# snap connections discord
Interface               Plug                            Slot                            Notes
audio-playback          discord:audio-playback          :audio-playback                 -
audio-record            discord:audio-record            :audio-record                   -
camera                  discord:camera                  -                               -
content[gnome-46-2404]  discord:gnome-46-2404           gnome-46-2404:gnome-46-2404     -
content[gpu-2404]       discord:gpu-2404                mesa-2404:gpu-2404              -
content[gtk-3-themes]   discord:gtk-3-themes            gtk-common-themes:gtk-3-themes  -
content[icon-themes]    discord:icon-themes             gtk-common-themes:icon-themes   -
content[sound-themes]   discord:sound-themes            gtk-common-themes:sound-themes  -
desktop                 discord:desktop                 :desktop                        -
desktop-legacy          discord:desktop-legacy          :desktop-legacy                 -
gsettings               discord:gsettings               :gsettings                      -
home                    discord:home                    :home                           -
mount-observe           discord:mount-observe           -                               -
network                 discord:network                 :network                        -
network-observe         discord:network-observe         -                               -
opengl                  discord:opengl                  :opengl                         -
process-control         discord:process-control         -                               -
removable-media         discord:removable-media         -                               -
screen-inhibit-control  discord:screen-inhibit-control  :screen-inhibit-control         -
shared-memory           discord:shmem                   :shared-memory                  -
system-observe          discord:system-observe          -                               -
unity7                  discord:unity7                  :unity7                         -
wayland                 discord:wayland                 :wayland                        -
x11                     discord:x11                     :x11                            -

Output of snap version

~# snap version
snap    2.63+22.04ubuntu0.1
snapd   2.63+22.04ubuntu0.1
series  16
ubuntu  22.04
kernel  6.8.0-40-generic

Relevant log output

No response

Teminal output of app

No response

lengau commented 4 days ago

Hi! Thanks for the report. Unfortunately, this is a limitation with plasma 5 and the screen sharing portals, as it doesn't fully implement them. Not that it's much consolation until you can get plasma 6, but it works really well for me on plasma 6.

niko-lay commented 4 days ago

@lengau thanks for the explanation, if possible could you please clarify what changed in snap/discord at the end of July? This functionality was working before July 25, after that I didn't use my laptop for 2-3 weeks and after some update (not sure snap\discord or OS) this stopped working

johngaltwork commented 3 days ago

Hi! I have faced with the same issue, and I use Ubuntu 20.04.6 with Gnome Screenshot from 2024-09-18 13-44-33

lengau commented 3 days ago

@niko-lay Interesting! I've reopened then to examine it, as maybe snapd is doing something fancy with the portals. Are you using X11 or Wayland?

The only things I can see that might make a difference are in this commit, specifically the removal of the GTK_USE_PORTAL environment variable and the opengl plug. @jnsgruk is window sharing through the portal working for you on X11?

lengau commented 3 days ago

@johngaltwork thanks for the further info! I'm starting to think this is related to it not using portals correctly on X11.

niko-lay commented 3 days ago

@lengau I'm using X11

johngaltwork commented 2 days ago

@lengau I am using X11 too.

lengau commented 2 days ago

Thanks both! I did some more digging and found that this appears to be an issue with core24 snaps and window sharing on X11. I've created #234 to temporarily revert to core22 and will be filing an upstream bug.

lengau commented 2 days ago

Huh... and now after playing with that and popping back into the current mode it's not working for me on Wayland anymore either.

lengau commented 2 days ago

I've filed this upstream bug: https://github.com/canonical/core-base/issues/251