flathub / com.slack.Slack

https://flathub.org/apps/details/com.slack.Slack
35 stars 36 forks source link

Slack crashes in share screen attempt in Wayland (regression) #196

Closed dmvianna closed 8 months ago

dmvianna commented 1 year ago

The latest commit aa799fc26d61a699bb3a283d0f2453aaffbe0bce causes Slack to crash when attempting to share screen. This is fixed by pinning Slack to the previous commit:

sudo flatpak update \                            
--commit=b95d24a8a354db07b95b065b3e57e9442c9fbaf851a49cbe6e7b1aa0afcab591 \
com.slack.Slack

You also need to prevent updates until this issue is fixed.

flatpak mask com.slack.Slack
francoisrob commented 1 year ago

Appreciate this. Been having the same issues until I switched to xorg after I was unable to share screen in a meeting.

jcontonio commented 1 year ago

Yeah I'm seeing the same crash, even after restart with running the commit b95d24a8a354db07b95b065b3e57e9442c9fbaf851a49cbe6e7b1aa0afcab591

devurandom commented 1 year ago

For me Slack crashed on commit 72345beafe0cb9d2b32b4f602a6b5392c23a987747f43340a387827f85b552a1. I can confirm that screen sharing works fine after sudo flatpak update --commit=b95d24a8a354db07b95b065b3e57e9442c9fbaf851a49cbe6e7b1aa0afcab591 com.slack.Slack.

amine-err commented 1 year ago

Can also confirm returning to the mentioned commit fixes screen sharing

lucaxs09 commented 1 year ago

It works perfectly! Thanks for sharing.

mpuls commented 1 year ago

As far as I understand, the commit https://github.com/flathub/com.slack.Slack/commit/aa799fc26d61a699bb3a283d0f2453aaffbe0bce just has changed the download URL from slack deb-package to the newer version 4.31.155. Installing and using that version or even the newer version 4.32.122directly from a download via the slack homepage also results in the here described crashes for me. Therefore, I think it is not related to the flatpak version at all but directly to problem within slack.

francoisrob commented 1 year ago

Yeah, screensharing with slack even with the recommended commit has always been a bit buggy. For me screen sharing on wayland on the previous versions does not show the screens in wayland screenshare option, so I have to hover over to choose which option depending on the active block which is highlighted luckily. Tried to revert to the last commit, but I guess I'll just log out and use xorg for meetings

On Tue, 23 May 2023, 11:28 mpuls, @.***> wrote:

As far as I understand, the commit aa799fc https://github.com/flathub/com.slack.Slack/commit/aa799fc26d61a699bb3a283d0f2453aaffbe0bce just has changed the download URL from slack deb-package to the newer version 4.31.155. Installing and using that version or even the newer version 4.32.122directly from a download via the slack homepage also results in the here described crashes for me. Therefore, I think it is not related to the flatpak version at all but directly to problem within slack.

— Reply to this email directly, view it on GitHub https://github.com/flathub/com.slack.Slack/issues/196#issuecomment-1558899785, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQCO6KW3B65CKKWZOD6VZ63XHR7KRANCNFSM6AAAAAAXMKSGJY . You are receiving this because you commented.Message ID: <flathub/com. @.***>

bhack commented 1 year ago

Has anyone tested https://github.com/flathub/com.slack.Slack/pull/201 ?

grandchild commented 1 year ago

Has anyone tested #201 ?

I have a native install of slack 4.32.122, and it still crashes.

Downgrading to 4.29.149-1 worked for me 🙂

devurandom commented 1 year ago

Now I have an odd problem where downgrading appears to work:

❯ sudo flatpak update --commit=b95d24a8a354db07b95b065b3e57e9442c9fbaf851a49cbe6e7b1aa0afcab591 com.slack.Slack
Looking for updates…

        ID                      Branch         Op         Remote          Download
 1. [✓] com.slack.Slack         stable         u          flathub         72.9 MB / 1.8 MB

Updating… ████████████████████ 100%  7.3 MB/s  00:00

Updates complete.

But then it is still using the previous version:

❯ sudo flatpak info com.slack.Slack

Slack - Chat with your team

           ID: com.slack.Slack
          Ref: app/com.slack.Slack/x86_64/stable
         Arch: x86_64
       Branch: stable
      Version: 4.31.155
      License: LicenseRef-proprietary
       Origin: flathub
   Collection: org.flathub.Stable
 Installation: system
    Installed: 5.4 MB
      Runtime: org.freedesktop.Platform/x86_64/22.08
          Sdk: org.freedesktop.Sdk/x86_64/22.08

Active commit: 72345beafe0cb9d2b32b4f602a6b5392c23a987747f43340a387827f85b552a1
Latest commit: b95d24a8a354db07b95b065b3e57e9442c9fbaf851a49cbe6e7b1aa0afcab591
       Parent: b95d24a8a354db07b95b065b3e57e9442c9fbaf851a49cbe6e7b1aa0afcab591
      Subject: Update slack.deb to 4.31.155 (aa799fc2)
         Date: 2023-04-18 07:12:59 +0000

See how "active commit" is the broken version, while "latest commit" is the version I want and upgraded to. Did anyone ever run into a situation like this? How can I convince Flatpak to make the "latest commit" the "active commit"?

igaldino commented 1 year ago

See how "active commit" is the broken version, while "latest commit" is the version I want and upgraded to. Did anyone ever run into a situation like this? How can I convince Flatpak to make the "latest commit" the "active commit"?

It's probably masked, so you need to unmask it, downgrade and then remask it:

flatpak --remove mask com.slack.Slack
sudo flatpak update --commit=b95d24a8a354db07b95b065b3e57e9442c9fbaf851a49cbe6e7b1aa0afcab591 com.slack.Slack
flatpak info com.slack.Slack 
flatpak mask com.slack.Slack
bhack commented 1 year ago

Have you tested https://github.com/flathub/com.slack.Slack/pull/203 ?

afiestas commented 1 year ago

Have you tested #203 ?

Tried #203, for me still crashes with both, XWayland and KWin-Wayland.

devurandom commented 1 year ago

Have you tested #203 ?

I can confirm that the crash persists on NixOS 23.05.20230610.d3bb401 with KWin:

Operating System: NixOS 23.05
KDE Plasma Version: 5.27.5
KDE Frameworks Version: 5.106.0
Qt Version: 5.15.9
Kernel Version: 6.3.5 (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 9 6900HS with Radeon Graphics
Memory: 30,6 GiB of RAM
Graphics Processor: AMD Radeon Graphics
GiacomoOrlandi-awin commented 1 year ago

These Electron bugs seem relevant: https://github.com/electron/electron/issues/37524 https://github.com/electron/electron/issues/37463

proton5000 commented 1 year ago

the b95d24a8a354db07b95b065b3e57e9442c9fbaf851a49cbe6e7b1aa0afcab591 works on

Fedora
kernel: x86_64 Linux 6.3.11-200.fc38.x86_64
Wayland
GNOME 44.3
cpu: 11th Gen Intel Core i5-1135G7 @ 8x 4.2GHz
gpu: Mesa Intel(R) Xe Graphics (TGL GT2)

thanks

friimaind commented 1 year ago

Unfortunately it also crashes on my system:

EndeavourOS (Arch) 2021.11.30
Slack 4.32.127
kernel x86_64 Linux 6.4.3-arch1-1
GNOME Wayland 44.3
Electron version v25.2.1
infra-monkey commented 1 year ago

Hello, It looks like it just got fixed upstream in electron https://github.com/electron/electron/pull/38833 Need to wait for slack to include this change. If someone has already an open case with slack for that, it would be nice to notify them.

grandchild commented 1 year ago

Would also probably need to wait for an Electron release first...

PichlerD commented 1 year ago

Using this version it doesn't crash for me anymore, but also fails to share the screen or tabs. Ubuntu 22.04 I can now click on the button and window pops up asking me what to share without previews if i click one i can select a window or the full screen. But then it still fails

benthejack-vuw commented 1 year ago

I can't get it not to crash at the moment so have resorted to opening slack in the browser in app mode: brave --class=Brave --app=https://my-org.slack.com you could do this with chrome also - everything seems to be a lot more stable this way anyway.

arturi commented 1 year ago

@benthejack-vuw did the same, but getting a ”no access to hardware acceleration‘ when someone screenshares, can't view their share. Anyone solved this?

yashoswalyo commented 11 months ago

Confirming that with b95d24a8a354db07b95b065b3e57e9442c9fbaf851a49cbe6e7b1aa0afcab591 screen recording is working in slack.

Os: Fedora Linux 38 (Workstation Edition) x86_64
kernel: 6.4.13-200.fc38.x86_64 
Wayland
GNOME 44.4
cpu: 11th Gen Intel i7-1185G7 (8) @ 4.800GHz
gpu: Intel TigerLake-LP GT2 [Iris Xe Graphics]
dchw commented 11 months ago

Slack seems to have released an update that fixes this? (4.34.115): https://slack.com/release-notes/linux. Switching to this version (native install) seems to have fixed it, while the older 4.33.90 native install had the same behavior as the Flatpak did.

Linux users on Wayland noticed that screensharing in huddles would crash the app as soon as sharing ended. No good deed goes unpunished, they say. We're working to change that to "No bad bug goes unfixed." Please resume sharing with impunity.

I'm on Fedora 38 with Wayland/Gnome 44.4, Linux 6.4.14-200.fc38.x86_64

borgille commented 11 months ago

Slack seems to have released an update that fixes this? (4.34.115): https://slack.com/release-notes/linux. Switching to this version (native install) seems to have fixed it, while the older 4.33.90 native install had the same behavior as the Flatpak did.

I tried 4.34.115 via snap on Nobara 38 and although it didn't segfault this time it just hung when executing "Run an audio, video and screensharing test" from Preferences -> Audio & Video -> Troubleshooting. Falling back to b95d24a8a354db07b95b065b3e57e9442c9fbaf851a49cbe6e7b1aa0afcab591 via Flatpak passes all tests for me.

Os: Nobara-38-KDE-Nvidia-2023-08-29
kernel: 6.4.10-202.fsync.fc38.x86_64
GPU: NVIDIA RTX A3000 Laptop GPU
NVIDIA Driver Version: 535.104.05
toadjaune commented 11 months ago

I just upgraded my flatpak install to version 4.34.120, and this solves the issue for me.

Well, kind of. Screensharing doesn't work yet, it sends a black screen, but it doesn't crash anymore.

Details on my setup :

1player commented 11 months ago

Then it isn't solved, since the old version mentioned in the previous comments has working screen sharing.

On Thu, 28 Sep 2023, at 21:27, Arnaud Venturi wrote:

I just upgraded my flatpak install to version 4.34.120, and this solves the issue for me.

Well, kind of. Screensharing doesn't work yet, it sends a black screen, but it doesn't crash anymore.

Details on my setup :

• Fedora 38 • Linux 6.4.15-200.fc38.x86_64 • sway window manager

— Reply to this email directly, view it on GitHub https://github.com/flathub/com.slack.Slack/issues/196#issuecomment-1739959556, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFIPSD77LVMFPSEQBKTIODX4XMT7ANCNFSM6AAAAAAXMKSGJY. You are receiving this because you are subscribed to this thread.Message ID: @.***>

toadjaune commented 11 months ago

I'm not sure it ever worked on my setup, so, I'll let others confirm if anything changed for them

colinrgodsey commented 11 months ago

I can also confirm that 4.34.120 works while the currently published version does not (I have not tried the new version in a few weeks, may have been fixed by now... not sure)

lufia commented 11 months ago

In my linux box, 4.34.120 don't crash on start sharing screen. But share screen menu listed only x11 apps, and sharing entire desktop shares always black screen.

bhack commented 11 months ago

In my linux box, 4.34.120 don't crash on start sharing screen. But share screen menu listed only x11 apps, and sharing entire desktop shares always black screen.

Yes it is well known: https://forums.slackcommunity.com/s/question/0D53a00009BSEGACA5/when-will-slack-support-wayland-screen-sharing-does-anyone-have-workarounds-or-hacks-to-make-it-work

anton-x-t commented 10 months ago

Same result here @lufia Slack 4.35.121 (via dnf) Fedora 38 Wayland.

turculaurentiu91 commented 10 months ago

As a workaround, I am using this: https://github.com/KDE/xwaylandvideobridge A quick setup script for flatpak https://github.com/JerrySM64/Xwayland-Video-Bridge-Quick-Setup/

anton-x-t commented 10 months ago

Tried xwaylandvideobridge but it just works between every 1 out of 10 to 1 out of 20 times so not my cup of tea.

kohane27 commented 9 months ago

As a workaround, I am using this: https://github.com/KDE/xwaylandvideobridge A quick setup script for flatpak https://github.com/JerrySM64/Xwayland-Video-Bridge-Quick-Setup/

@turculaurentiu91 Could you elaborate how you make it work? I've installed xwaylandvideobridge but when I launched slack, there's no option to select any screen. Thanks in advance!

turculaurentiu91 commented 9 months ago

As a workaround, I am using this: https://github.com/KDE/xwaylandvideobridge A quick setup script for flatpak https://github.com/JerrySM64/Xwayland-Video-Bridge-Quick-Setup/

@turculaurentiu91 Could you elaborate how you make it work? I've installed xwaylandvideobridge but when I launched slack, there's no option to select any screen. Thanks in advance!

After you install it, make sure it's running, it should have a system tray icon. It's an app on your computer, I have set it up to start when I boot! image

Then, when you share your screen on slack, you should choose "Wayland to X11 Video Bridge" image

Then you will have wayland asking you a couple of times what screen you want to share!

However, I am experiencing crashes when I share the PhpStorm window.

kohane27 commented 9 months ago

@turculaurentiu91

Thank you so much for getting back to me.

I'm on Swaywm.

I run xwaylandvideobridge with flatpak run org.kde.xwaylandvideobridge and it becomes a floating blank screen:

xbridge

Regardless, I tried screen sharing and choose the white blank screen Wayland to X11 Video Bridge.

blank-

Note: first two blank screen is my dual monitors; third one is the slack app itself

Then:

✖ flatpak run org.kde.xwaylandvideobridge
org.kde.xwaylandvideobridge: Couldn't initialize the remote control session

In Slack:

Can’t share your screen Check your system preferences to make sure Slack has screen recording permission, and try again.

Does it mean xwaylandvideobridge only works under KDE? Thanks again!

anton-x-t commented 9 months ago

Thank you a big bunch @xHeaven

Tested on 2023-11-13 and and it's working on Fedora 39 Linux fedora 6.5.11-300.fc39.x86_64 with Wayland XDG_SESSION_TYPE=wayland and slack -v: 4.35.126.

Updated guide:

  1. Remove any Slack version you have installed currently that is not from https://slack.com/downloads/linux.
  2. Install the .deb or .rpm version of Slack from their website - not from Flatpak, nor Snap.
  3. Run sudo sed -i -e 's/,"WebRTCPipeWireCapturer"/,"LebRTCPipeWireCapturer"/' /usr/lib/slack/resources/app.asar
  4. Run sudo sed -i -e 's#Exec=/usr/bin/slack %U#Exec=/usr/bin/slack\ %U\ --enable-features=WebRTCPipeWireCapturer#' /usr/share/applications/slack.desktop

Credits: Guide for WebRTCPipeWireCapturer for latest Slack Version, thank you xHeaven, https://github.com/flathub/com.slack.Slack/issues/101#issuecomment-1807073763

evan-a-a commented 8 months ago

Closing, upstream issue. Also duplicates #150

anton-x-t commented 8 months ago

@evan-a-a Where is the upstream issue?

evan-a-a commented 8 months ago

@evan-a-a Where is the upstream issue?

There's a community moderator response over on the Slack forums. This is also linked in https://github.com/flathub/com.slack.Slack/issues/101#issuecomment-1838579367 https://forums.slackcommunity.com/s/question/0D53a00009BSEGACA5/when-will-slack-support-wayland-screen-sharing-does-anyone-have-workarounds-or-hacks-to-make-it-work?language=en_US

markonisic commented 7 months ago

Thank you a big bunch @xHeaven

Tested on 2023-11-13 and and it's working on Fedora 39 Linux fedora 6.5.11-300.fc39.x86_64 with Wayland XDG_SESSION_TYPE=wayland and slack -v: 4.35.126.

Updated guide:

1. Remove any Slack version you have installed currently that is not from https://slack.com/downloads/linux.

2. Install the `.deb` or `.rpm` version of Slack from their website - not from Flatpak, nor Snap.

3. Run `sudo sed -i -e 's/,"WebRTCPipeWireCapturer"/,"LebRTCPipeWireCapturer"/' /usr/lib/slack/resources/app.asar`

4. Run `sudo sed -i -e 's#Exec=/usr/bin/slack %U#Exec=/usr/bin/slack\ %U\ --enable-features=WebRTCPipeWireCapturer#' /usr/share/applications/slack.desktop`

Credits: Guide for WebRTCPipeWireCapturer for latest Slack Version, thank you xHeaven, #101 (comment)

Just to confirm that this workaround also works for me. Fedora 39 workstation, Wayland, Kernel 6.6.12-200.fc39.x86_64, Gnome 45.3, Slack 4.36.138 64-bit.

anton-x-t commented 7 months ago

@evan-a-a Where is the upstream issue?

There's a community moderator response over on the Slack forums. This is also linked in #101 (comment) https://forums.slackcommunity.com/s/question/0D53a00009BSEGACA5/when-will-slack-support-wayland-screen-sharing-does-anyone-have-workarounds-or-hacks-to-make-it-work?language=en_US

Thank you @evan-a-a ! Sorry for the late reply!

anton-x-t commented 7 months ago

Thank you a big bunch @xHeaven Tested on 2023-11-13 and and it's working on Fedora 39 Linux fedora 6.5.11-300.fc39.x86_64 with Wayland XDG_SESSION_TYPE=wayland and slack -v: 4.35.126. Updated guide:

1. Remove any Slack version you have installed currently that is not from https://slack.com/downloads/linux.

2. Install the `.deb` or `.rpm` version of Slack from their website - not from Flatpak, nor Snap.

3. Run `sudo sed -i -e 's/,"WebRTCPipeWireCapturer"/,"LebRTCPipeWireCapturer"/' /usr/lib/slack/resources/app.asar`

4. Run `sudo sed -i -e 's#Exec=/usr/bin/slack %U#Exec=/usr/bin/slack\ %U\ --enable-features=WebRTCPipeWireCapturer#' /usr/share/applications/slack.desktop`

Credits: Guide for WebRTCPipeWireCapturer for latest Slack Version, thank you xHeaven, #101 (comment)

Just to confirm that this workaround also works for me. Fedora 39 workstation, Wayland, Kernel 6.6.12-200.fc39.x86_64, Gnome 45.3, Slack 4.36.138 64-bit.

Nice @markonisic ! Confirmed screen sharing working for me too, Fedora 39 workstation, Wayland, Kernel 6.6.12-200.fc39.x86_64, Gnome 45.3, Slack 4.36.138 64-bit (2df428e55a64e45d5c994086577ad7d46b1eef83@1706078246).

ZVNexus commented 7 months ago

Thank you a big bunch @xHeaven Tested on 2023-11-13 and and it's working on Fedora 39 Linux fedora 6.5.11-300.fc39.x86_64 with Wayland XDG_SESSION_TYPE=wayland and slack -v: 4.35.126. Updated guide:

1. Remove any Slack version you have installed currently that is not from https://slack.com/downloads/linux.

2. Install the `.deb` or `.rpm` version of Slack from their website - not from Flatpak, nor Snap.

3. Run `sudo sed -i -e 's/,"WebRTCPipeWireCapturer"/,"LebRTCPipeWireCapturer"/' /usr/lib/slack/resources/app.asar`

4. Run `sudo sed -i -e 's#Exec=/usr/bin/slack %U#Exec=/usr/bin/slack\ %U\ --enable-features=WebRTCPipeWireCapturer#' /usr/share/applications/slack.desktop`

Credits: Guide for WebRTCPipeWireCapturer for latest Slack Version, thank you xHeaven, #101 (comment)

Just to confirm that this workaround also works for me. Fedora 39 workstation, Wayland, Kernel 6.6.12-200.fc39.x86_64, Gnome 45.3, Slack 4.36.138 64-bit.

FYI this workaround is currently in the Flathub package, and works out of the box now.