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

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

Closed
dmvianna opened this issue Apr 26, 2023 · 45 comments
Closed

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

dmvianna opened this issue Apr 26, 2023 · 45 comments

Comments

@dmvianna
Copy link

dmvianna commented Apr 26, 2023

The latest commit aa799fc 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
Copy link

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

@jcontonio
Copy link

jcontonio commented May 9, 2023

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

@devurandom
Copy link

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
Copy link

Can also confirm returning to the mentioned commit fixes screen sharing

@lucaxs09
Copy link

It works perfectly! Thanks for sharing.

@mpuls
Copy link

mpuls commented May 23, 2023

As far as I understand, the commit aa799fc 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
Copy link

francoisrob commented May 23, 2023 via email

@bhack
Copy link

bhack commented May 23, 2023

Has anyone tested #201 ?

@grandchild
Copy link

grandchild commented May 24, 2023

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
Copy link

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
Copy link

igaldino commented Jun 7, 2023

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
Copy link

bhack commented Jun 13, 2023

Have you tested #203 ?

@afiestas
Copy link

Have you tested #203 ?

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

@devurandom
Copy link

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
Copy link

These Electron bugs seem relevant:
electron/electron#37524
electron/electron#37463

@proton5000
Copy link

proton5000 commented Jul 13, 2023

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
Copy link

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
Copy link

Hello,
It looks like it just got fixed upstream in electron
electron/electron#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
Copy link

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

@PichlerD
Copy link

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
Copy link

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
Copy link

arturi commented Aug 21, 2023

@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
Copy link

yashoswalyo commented Sep 8, 2023

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
Copy link

dchw commented Sep 8, 2023

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
Copy link

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
Copy link

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

@1player
Copy link

1player commented Sep 29, 2023 via email

@toadjaune
Copy link

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

@colinrgodsey
Copy link

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
Copy link

lufia commented Oct 2, 2023

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
Copy link

bhack commented Oct 2, 2023

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
Copy link

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

@turculaurentiu91
Copy link

turculaurentiu91 commented Oct 31, 2023

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
Copy link

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
Copy link

kohane27 commented Nov 8, 2023

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
Copy link

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
Copy link

kohane27 commented Nov 8, 2023

@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
Copy link

anton-x-t commented Nov 13, 2023

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)

@evan-a-a
Copy link
Collaborator

Closing, upstream issue. Also duplicates #150

@evan-a-a evan-a-a closed this as not planned Won't fix, can't repro, duplicate, stale Dec 12, 2023
@anton-x-t
Copy link

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

@evan-a-a
Copy link
Collaborator

@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

@markonisic
Copy link

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
Copy link

@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
Copy link

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
Copy link
Collaborator

ZVNexus commented Jan 24, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests