rusq / slackdump

Save or export your private and public Slack messages, threads, files, and users locally without admin privileges.
GNU General Public License v3.0
1.6k stars 72 forks source link

Cannot use system browser firefox on linux #370

Open deknos opened 1 day ago

deknos commented 1 day ago

Describe the bug I want to use my system browser for authentication. I am already logged in into my enterprise slack workspace with an commercial OAuth Provider. I don't know though if they use OAuth/OpenID for authenticating against slack.

Authentication type (please read) Interactive starts downloading chrome from the internet, even with -browser=firefox and selecting "User Browser" just stops and says it does not find a browser:

To Reproduce

benutzer01@localhost:~/tmp/slackdumptest> slackdump  -browser=firefox -w mycompany -base=/home/benutzer01/tmp/slackdumptest/t1 https://mycompany.slack.com/archives/D05K22ALVTR
Slackdump dev (commit: placeholder) built on: 2077

With tag 2.6.0 and with github master branch

Expected behavior I can authenticate in the open browser, firefox, installed on the system (linux, opensuse tumbleweed) where i am logged into my slack workspace

Output

benutzer01@localhost:~/tmp/slackdumptest> slackdump  -browser=firefox -w mycompany -base=/home/benutzer01/tmp/slackdumptest/t1 https://mycompany.slack.com/archives/D05K22ALVTR
Slackdump dev (commit: placeholder) built on: 2077

Desktop (please complete the following information):

deknos commented 1 day ago

do i have to close my browser perhaps?

rusq commented 1 day ago

Hey, you'd have to use the -legacy-browser flag: https://github.com/rusq/slackdump/wiki/EZ-Login-3000#using-playwright-instead-of-rod

deknos commented 1 day ago

Hey, is there any way, not to download a random browser from somewhere but to use the already installed one?

rusq commented 1 day ago

Yes, as long as it's not a firefox.

In the auth menu, one must choose "User Browser" image

Then it offers the list of compatible (Chromium-based) browsers installed on the system image

The screenshots are from v3, but for v2.6.0 the flow is the same - they use the same version of authentication library.

Oh, here's the guide for v2.5.15+ https://github.com/rusq/slackdump/wiki/EZ-Login-3000#login-methods

rusq commented 1 day ago

I'll reopen this for convenience

deknos commented 1 day ago

Okay, it works. funnily it lists 4 instances of chromium, though i installed only chromium and flatpak chromium. and even after removing the flatpak it still listed four chromium instances.

Any chances you will reenable firefox as well?

rusq commented 23 hours ago

I have nothing against firefox, the library I use for browser automation uses Chrome Devtools Protocol, and firefox is not supported.

The previous library (engaged with -legacy-browser) supports firefox, but it pulls a ton of dependencies, including nodejs and playwright js layer + browser, and also it needs a "specific version of the browser", so it wouldn't be able to interact with the user browser. Also, there were so many times that the upstream changes broke the API, so I decided to gradually get rid of it.

rusq commented 23 hours ago

I'll see into adding a path to the browser selection screen, so it would be obvious which is which

deknos commented 23 hours ago

Okay, as well as it works with a system-installed chromium-based browser, i am fine :) I do not want to create more work for you.

rusq commented 23 hours ago

Just checked - it should already display the browser path in the description for the highlighted browser.