Slack crashes when lock screen or screen saver is activated

 $ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 20.04.3 LTS
Release:	20.04
Codename:	focal

$ uname -a
Linux holdsworth 5.11.0-27-generic #29~20.04.1-Ubuntu SMP Wed Aug 11 15:58:17 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

$ snap info slack
name:      slack
summary:   Team communication for the 21st century.
publisher: Slack✓
store-url: https://snapcraft.io/slack
contact:   https://get.slack.help/hc/en-us
license:   unset
description: |
  Caution: Slack for Linux is in beta. We’re still busy adding features and
  ironing out potential issues.
  
  Slack brings team communication and collaboration into one place so you can
  get more work done, whether you belong to a large enterprise or a small
  business. Check off your to-do list and move your projects forward by
  bringing the right people, conversations, tools, and information you need
  together. Slack is available on any device, so you can find and access your
  team and your work, whether you’re at your desk or on the go.
  
  Scientifically proven (or at least rumored) to make your working life
  simpler, more pleasant, and more productive. We hope you’ll give Slack a
  try.
  
  Stop by and learn more at: https://slack.com/
commands:
  - slack
snap-id:      JUJH91Ved74jd4ZgJCpzMBtYbPOzTlsD
tracking:     latest/stable
refresh-date: yesterday at 12:14 CDT
channels:
  latest/stable:    4.19.2 2021-08-23 (44) 132MB classic
  latest/candidate: ↑                            
  latest/beta:      ↑                            
  latest/edge:      ↑                            
installed:          4.19.2            (44) 132MB classic

$ nvidia-settings --version

nvidia-settings:  version 470.57.01
  The NVIDIA X Server Settings tool.

  This program is used to configure the NVIDIA Linux graphics driver.
  For more detail, please see the nvidia-settings(1) man page.
3 Likes

Got response from Slack support that their engineers are aware of the issue and is currently investigating it

3 Likes

note that if it happened after an upgrade of slack (i.e. if it is a bug in the latest slack) you can always do snap revert slack to go back to the former version you had installed … this is usually helpful if such a bug gets introduced with an upgrade …

1 Like

Thanks. Good to know :grinning:

I tried reverting to 4.18 but I still have the same crashing problem.

Same here. Any updates, anyone?

Remove and re install it again fixed the issue.

sudo snap remove slack
sudo snap install slack - - classic (remove space between dash)

1 Like

can confirm here as well, reinstalling it works:

slack 4.19.2 from Slack✓ installed

Removing the snap version and installing .deb worked for me: https://slack.com/intl/en-pl/downloads/linux

I also had this issue. Due to another immediate issue (Slack crashes on upload), I deleted the cache directory (~/snap/slack/common/.cache) and this actually resolved this particular crash issue as well.

4 Likes

Thanks for this tip! removing ~/snap/slack/common/.cache resolves the following crashes

  • lock screen
  • upload from computer
  • uploading a profile pic
  • adding an emoji
  • attaching a file to the report issue
2 Likes

unfortunately a revert has the bug where it didn’t previously. Clearing the cache as Nikarmotte suggested does stop my app from crashing

2 Likes

Removing ~/snap/slack/common/.cache Works for me :partying_face:

2 Likes

This worked for me too. Interestingly, using ‘Help/Troubleshooting/Clear Cache and Restart’ did not work for me (I tried that before). Also, instead of removing the cache dir, I put it to the side and then did a diff between the old one and the newly generated one and I found some things in the old one where it was pointing to things in the previous snap revision (which I had installed). I suspect there is a bug in the cache generation code and they need to point to the current symlink rather than SNAP_DATA. Example:

diff -Naur ./.cache.old/gdk-pixbuf-loaders.cache ./.cache/gdk-pixbuf-loaders.cache
--- ./.cache.old/gdk-pixbuf-loaders.cache       2021-06-21 07:42:01.648159737 -0500
+++ ./.cache/gdk-pixbuf-loaders.cache   2021-09-01 09:50:24.886997946 -0500
@@ -2,52 +2,52 @@
 # Automatically generated file, do not edit
 # Created by gdk-pixbuf-query-loaders from gdk-pixbuf-2.36.11
 #
-# LoaderDir = /snap/slack/42/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders
+# LoaderDir = /snap/slack/44/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders
 #

(42 is the previous revision I had installed, but I didn’t revert and am on 44 so the 44 snap revision was looking at things in /snap/slack/42 which perhaps are incompatible with the 44 revision).

Perhaps @hanskr (or someone else) would want to forward this along to Slack?

4 Likes

Your report (as well as some others) went a long way to tracking this down. Thanks for the assist!

I forwarded this to the help ticket I had.

Thank you guys. This fix worked for me as well :slight_smile:

Hello guys,

I’m on ubuntu 21.04, I don’t know if slack updated recently on my pc, the fact is that I often reduce it in the tray bar, and after some time (around 1h) the app is not running anymore. It just stops without giving any alert, so I’m guessing that there may be an issue similar to the one reported here. In fact I read about file upload problems, solved by clearing the cache (it happened to me as well a couple of times).

I’ll try this solution to see if works, otherwise I’ll try to do a fresh install. In case that someone is interested, I’ll post the result once I know :slight_smile:

1 Like

I can confirm what @jdstrand said:

  • using the GUI menus to clean the cache does not work, however
  • removing the cache directory directly does:
rm -rf ~/snap/slack/common/.cache

Thanks

1 Like

Thanks for the tip. This did not work for me either, but this is good to know.

If removing the cache (after quitting the app (ctrl+q)), try uninstalling the snap and re-installing. If that also doesn’t work, send feedback to slack and let them know what you’ve tried