com.slack.Slack icon indicating copy to clipboard operation
com.slack.Slack copied to clipboard

Signin URI does not work for Chromium on KDE

Open mzabaluev opened this issue 6 years ago • 39 comments

With revision 45cd270cb3a69dc2c9c08cd9211068336fdc52ece08c77e5413a44f70e2a0d5b, I see the same symptoms as in #41: after signing in with the browser, the magic login link opens the Slack app window, but it only shows the Sign In view.

mzabaluev avatar Aug 28 '19 09:08 mzabaluev

Content of the desktop entry in /var/lib/flatpak/exports/share/applications/com.slack.Slack.desktop:

[Desktop Entry]
Name=Slack
Comment=Slack Desktop
GenericName=Slack Client for Linux
Exec=/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=slack --file-forwarding com.slack.Slack @@u %U @@
Icon=com.slack.Slack
Type=Application
StartupNotify=true
Categories=GNOME;GTK;Network;InstantMessaging;
MimeType=x-scheme-handler/slack;
X-Desktop-File-Install-Version=0.23
StartupWMClass=Slack
X-Flatpak-RenamedFrom=slack.desktop;
X-Flatpak=com.slack.Slack

mzabaluev avatar Aug 28 '19 10:08 mzabaluev

I personally can not get xdg-links to work with Snap packages (like Ubuntu's Chromium). This will cause an issue with these URIs.

FakeShemp avatar Mar 25 '20 21:03 FakeShemp

I have this issue, maybe.

installed slack in --user but the first link to 'Sign in to Slack' is a green button and when click nothing happens.

japrogramer avatar Oct 08 '20 04:10 japrogramer

I am using Arch Linux with KDE Plasma, and I had the same issue. What fixed it for me was installing xdg-desktop-portal (not the kde one). Hope this helps!

This also fixed other URLs not working in Slack.

abheekda1 avatar Oct 21 '20 05:10 abheekda1

Same issue on Ubuntu 20.04. No workaround yet :(

mmatrosov avatar Dec 09 '20 11:12 mmatrosov

It works on me (openSUSE Tumbleweed, Flatpak 1.8.3, Slack 4.12.0) with sign in from Firefox

cho2 avatar Dec 15 '20 01:12 cho2

edit .config/mimeapps.list to include : x-scheme-handler/slack=com.slack.Slack.desktop

and then restart or logout

https://wiki.archlinux.org/title/XDG_MIME_Applications#mimeapps.list

thegarlynch avatar Dec 02 '21 01:12 thegarlynch

Try firefox, had same issue with google chrome.

amirdora avatar Feb 23 '22 16:02 amirdora

Is this the same of #160 ?

zarelit avatar Feb 24 '22 11:02 zarelit

edit .config/mimeapps.list to include : x-scheme-handler/slack=com.slack.Slack.desktop

and then restart or logout

https://wiki.archlinux.org/title/XDG_MIME_Applications#mimeapps.list

I was having this problem with Vivaldi (Chromium-based).

As a workaround, using Firefox to login & xdg-open com.slack.Slack worked.

As a solution, adding the above entry to .config/mimeapps.list made it work from Vivaldi.

Arch Wiki, once again, to the rescue (even though I'm on Fedora).

cgoetzke avatar Apr 11 '22 21:04 cgoetzke

I have the following in $HOME/.config/mimeapps.list: x-scheme-handler/slack=slack.desktop

(since it's a native app that I installed, not flatpak)

However, it does not work.

Distribution: openSUSE Tumbleweed

kanwarplaha avatar Apr 27 '22 06:04 kanwarplaha

Workaround:

  1. Downgrade to oldest suported Slack version

flatpak update --commit=5ae2f31e0a632f0b0114d25d6752758864f4f8480a52d6036acf8066b26b8d25 com.slack.Slack

  1. Login to the app

  2. Update to latest Slack

flatpak update

awerlang avatar May 06 '22 01:05 awerlang

Plus one. Don't know what to do.

dottorblaster avatar May 28 '22 11:05 dottorblaster

@dottorblaster The workaround suggested by @awerlang works for me, I'm on OpenSUSE Tumbleweed.

It is a bit clunky, but usually you have to join a new workspace only from time to time, so until they fix it, it can be a solution.

stefanobartoletti avatar Jun 01 '22 08:06 stefanobartoletti

@stefanobartoletti thanks for the answer! Sadly, due to security reasons one of my organizations logs me out every week, so I guess it's not feasible for me :sweat:

dottorblaster avatar Jun 01 '22 08:06 dottorblaster

Same here. Every now and then, Slack asks me to sign-in again. The sign-in always fails with Chrome. I have to install Firefox just to sign-in to Slack. What a terrible login design, given that Slack itself is basically a browser window wrapped up as a desktop application.

On Wed, Jun 1, 2022 at 6:33 PM Alessio Biancalana @.***> wrote:

@stefanobartoletti https://github.com/stefanobartoletti thanks for the answer! Sadly, due to security reasons one of my organizations logs me out every week, so I guess it's not feasible for me 😓

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

kanwarplaha avatar Jul 13 '22 06:07 kanwarplaha

I am experiencing this. Reset my SSO, and thus need to re-login. I can see that the application receives the call from xdg-open, but there is no apparent action taken:

[09/20/22, 14:32:08:275] info: Store: HANDLE_DEEP_LINK {
  "url": "slack://tBOGUS/magic-login/REDACTED"
}

WarheadsSE avatar Sep 20 '22 18:09 WarheadsSE

For anyone who gets here searching for Slack not signing in on KDE with Chrome or Chromium based browsers, this is the crux:

https://bugs.kde.org/show_bug.cgi?id=451018

In summary:

Chrome calls xdg-open, which calls kde-open5, which uses KIO::OpenUrlJob internally. That uses QUrl everywhere to parse and store urls. The problem is that QUrl internally sanitizes the hostname part of the url (anything between the slack:// and the next /) and thereby converts it to lowercase

I'm guessing the issue is similar for other WMs if they happen to be using Qt and QUrl for this purpose. The ticket is marked 'resolved downstream' as lowercasing the URL is correct RFC behavior and "likely" an intentional choice by QUrl developers. The 'fix' is to wait for Slack to make their comparison case insensitive...

A quick fix for the impatient of us in the dust who need to sign in right now, is to watch the process list for the passing of the magic URL, copy it with the correct case, and open slack using it as an argument:

#  while sleep .1; do ps aux | grep slack | grep -v grep | grep magic; done
-----
bogusr       2110  0.0  0.2 268980 39224 ?        Sl   14:45   0:00 kde-open5 slack://T5NDEADBEEF/magic-login/1234573490663-fdf3cf84ac5e13f40497ec690b3f1fc8e96ed86da0b3a2535f186a030d5ec809

# /usr/lib/slack/slack --enable-crashpad slack://T5NDEADBEEF/magic-login/1234573490663-fdf3cf84ac5e13f40497ec690b3f1fc8e96ed86da0b3a2535f186a030d5ec809

TwidgeVR avatar Oct 04 '22 19:10 TwidgeVR

The much easier way to get the URL is to open Chromium's Developer Tools - the URL will be right there after the log entry "launched external handler for ..."

restena-sw avatar Feb 17 '23 07:02 restena-sw

The much easier way to get the URL is to open Chromium's Developer Tools - the URL will be right there after the log entry "launched external handler for ..."

Once you've found this URL what do you do with it to make it open in slack?

m-fe02 avatar Mar 02 '23 18:03 m-fe02

Quit Slack, and re-launch on the command-line with this URL as the first and only parameter.

restena-sw avatar Mar 03 '23 07:03 restena-sw

You can also just copy the URL and click on the Slack window that says "Log In ...". It works for me.

kanwarplaha avatar Mar 12 '23 11:03 kanwarplaha

I had this issue with Chrome and I logged in by using Firefox

Slack version: 8f777cfcdeadd6ddb12b43760cd003c71c35d0c9@1680598645 Snap 4.29.149 64-bit

RichardsonWTR avatar Apr 04 '23 11:04 RichardsonWTR

I just started using the Flatpak and ran into this issue. I was already aware of the issue with KDE and had my own workaround script that I run when signing into any workspaces (I have a few to login to). I have updated for the flatpak (removing the executable and -s from the command and replacing it with flatpak run com.slack.Slack. I did notice that it tries to run the login command with /app/extra/lib/slack/slack which does not exist, indicates that the Flatpak version is not registered in XDG correctly?

I may switch to a solution like the one in this comment though this will still not work with the Flatpak as it stands.

gunzy83 avatar Apr 13 '23 23:04 gunzy83

Just had this same issue on openSUSE Tumbleweed when trying to sign in to Slack workspaces via Firefox.

I tried a different browser and randomly grabbed the ungoogled-chromium flatpak, now everything works as expected.

timtait avatar Apr 19 '23 09:04 timtait

No URI works besides firefox, it seems, for sign-in or even external links. I'm on arch using brave. Slack opens no links when $BROWSER set to brave in /etc/environment

jacohend avatar Jun 13 '23 22:06 jacohend

Workaround:

1. Downgrade to oldest suported Slack version

flatpak update --commit=5ae2f31e0a632f0b0114d25d6752758864f4f8480a52d6036acf8066b26b8d25 com.slack.Slack

2. Login to the app

3. Update to latest Slack

flatpak update

This commit does not seem to exist any more. Same for 8f777cfcdeadd6ddb12b43760cd003c71c35d0c9@1680598645 in one of the latest comments. Any other workaround?

raulillo82 avatar Sep 12 '23 10:09 raulillo82

Hello, i can confirm this is a google-chrome related bug, i just used firefox instead to login and join the workspace

sombriks avatar Oct 10 '23 13:10 sombriks

Try firefox, had same issue with google chrome.

Helped me out, thanks for the tip! I really like Vivaldi with all of its features and cool stuff that no other browser has, but I just feel that there are some basic stuff that just doesn't work anymore... This is not the first case.

golgor avatar Nov 30 '23 08:11 golgor

I'm having the same problem with Firefox - see https://github.com/flathub/com.slack.Slack/issues/230. I stopped using the Slack flatpak because I still can't get it to log in.

m-czernek avatar Dec 13 '23 09:12 m-czernek