'Signing into slack-desktop not working on 4.23.0 64-bit (Ubuntu) [closed]
In the app, going File > Workspace > Sign in to new workspace launches a browser window. After selecting the workspace in browser, it launches back a deep link back to slack but it doesn't work. Nothing happens on the slack-desktop.
Attempting to find out what is going on, I run the /usr/bin/slack to take a look at the logs.
I see logs of HANDLE_DEEP_LINK but no follow up activity.
[01/27/22, 00:37:00:872] info: Store: HANDLE_DEEP_LINK {
"url": "slack://tlvs8sasf/magic-login/3034334935776-be4bc1d875407dce8b1d32f74698c927a95ed50f2c2b770e731cfbdbcba21a93"
}
Solution 1:[1]
The answer provided by Boon is correct. I wanted to leave comment under that answer but apparently I need 50 points to comment so I can only add new answer...
After digging into the matter it sounds like the kde-open5 from kde-cli-tools is doing some funky lower-casing on first element of URL (slack://A/B/C becomes slack://a/B/C). This sounds like an old bug: https://bugs.kde.org/show_bug.cgi?id=429408
I suspect that slack changed in how they handle the links/links has changed - it aligns with slack upgrade in my case: slack-desktop:amd64 from 4.22.0 to 4.23.0.
Looking at process list:
- the slack website asks browser to open link with upper case
- kde-open5 is run with correct link
- slack is run with lower-cased workspace
I've reported this to slack with all the details so I hope it will be fixed.
Workaround:
Just adding some details to what (Boon suggested)
- Run the quick script in bash:
while sleep .1; do ps aux | grep slack | grep -v grep | grep magic; done
Try logging in to slack - accept login attempt in browser
You should see login link in console:
kde-open5 slack://WORKSPACE_ID/magic-login/...
/usr/lib/slack/slack --enable-crashpad slack://workspace_id/magic-login/...
- Open the slack with correct link:
/usr/lib/slack/slack --enable-crashpad slack://WORKSPACE_ID/magic-login/...
Solution 2:[2]
I'm using Archlinux, and neither clicking on link didn't work, neither passing link to slack arguments. Also you can find a correct link if you open dev console in browser it should be in console output. If you copy this link to your clipboard (ctrl+c) and then you switch to your slack app. It seems like onFocus slack automatically reads the clipboard and process it if it's a link. That gets be logged in.

Solution 3:[3]
Thanks to the excellent analysis of the issue here, I managed to create a script that saves me from this issue.
#!/usr/bin/env bash
if [[ "${1:-}" = slack://* ]]; then
exec /usr/lib/slack/slack --enable-crashpad "$1"
fi
exec /usr/bin/xdg-open "$@"
Save the above script as /usr/local/bin/xdg-open and make the script executable. That's it!
I really hope the KDE team shows some love for such a fundamental issue, especially considering how widely used Slack is.
Solution 4:[4]
After trying various things, I noticed that what I suspect to be the workspace id, tlvs8sasf above are often in CAPS in the logs.
So, I tried updating the deep link by upper casing the workspace id, then click on it. Voila, it worked for me. Hope this helps anyone else also suffering from this same issue.
Solution 5:[5]
Faced the same problem in Kubuntu 20.04 and the Chrome browser. Firefox solved this issue)
Solution 6:[6]
I have this problem almost every time I restart my computer, and I have some 10 active slack workspaces, so hacked a quick bash script to do the caps trick for me. It's not meant to be robust, but it works. I'll leave it here in case it's useful for anybody else.
# Workaround to get slack to open workspaces correctly.
# Problem and workarond concept as described here:
# https://stackoverflow.com/questions/70867064/signing-into-slack-desktop-not-working-on-4-23-0-64-bit-ubuntu
# Usage: Run this script, open slack as normal, and attempt to log into workspaces as normal. Once done, kill the script.
while sleep .1; do
line=$(ps ax | grep slack | grep -v grep | grep magic | awk '{ print $NF }')
WD=$(echo $line | cut -d '/' -f 3 | tr [:lower:] [:upper:])
LN=$(echo $line | cut -d '/' -f 5)
if [ "$WD" != "" ]; then
echo "got $line"
line2="slack://$WD/magic-login/$LN"
echo "Attempting to open $line2"
/usr/lib/slack/slack --enable-crashpad $line2
fi
done | grep -v "^$"
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Aleksander Mierzwicki |
| Solution 2 | deathangel908 |
| Solution 3 | ϹοδεMεδιϲ |
| Solution 4 | Boon |
| Solution 5 | Pavel |
| Solution 6 | Germán Sanchis |
