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

docker container image to run slackdump #206

Open
akostadinov opened this issue Apr 10, 2023 · 9 comments
Open

docker container image to run slackdump #206

akostadinov opened this issue Apr 10, 2023 · 9 comments
Labels
enhancement New feature or request

Comments

@akostadinov
Copy link

akostadinov commented Apr 10, 2023

Is your feature request related to a problem? Please describe.
Hi, would be easier to have a container to run instead of relying on installing things on host machine. For example I tried to run slackdump locally and I see [pid=617132][err] /home/user/.cache/ms-playwright/firefox-1319/firefox/libstdc++.so.6: version 'GLIBCXX_3.4.30' not found (required by /lib64/libicuuc.so.69)

Describe the solution you'd like
Add docker image to release matrics. Using ghcr.io or dockerhub doesn't matter.

Describe alternatives you've considered
Alternative is to figure out local machine setup which is not ideal and not always feasible.

@rusq
Copy link
Owner

rusq commented Apr 11, 2023

Hey @akostadinov , thanks for the suggestion. It is possible to make the docker container with the Slackdump, however, that would not solve the problem that you're seeing — it won't be able to show the browser window in the OS from inside the docker container easily. Probably there's a way to make it connect to the X-window system on the host running the container, but that won't work on Windows or macOS that don't have X-windows installed. I'll see what I can do about this error, I don't remember if master branch has the ability to choose the browser, but that would have helped.

The workaround meanwhile would be the same as with containers - get the credentials (token/cookie) manually.

@rusq
Copy link
Owner

rusq commented Apr 11, 2023

Hey @akostadinov , i propagated the browser selection to the cli, you can try and use the flag -browser chromium (allowed values: "firefox" or "chromium") to use Chromium as a login browser:

https://github.com/rusq/slackdump/releases/tag/v2.3.2

@rusq rusq added bug Something isn't working help wanted Extra attention is needed labels Apr 11, 2023
@rusq
Copy link
Owner

rusq commented Apr 11, 2023

Also, if anyone else is experiencing this issue, please let me know.

For the record, what type and version of Linux are you using, @akostadinov?

@akostadinov
Copy link
Author

Thank you! I'll give it a try and report if I see issues. I'm on Fedora 36

@akostadinov
Copy link
Author

Just FYI the -browser chromium worked. Unfortunately I couldn't login to slack in this way. I think it is not an issue with slackdump but something to do with our slack instance and SSO integration.

So I had to use the manual credentials which appears to work, at least it shows log messages that threads are downloaded. I see errors like this though:

2023/04/11 14:26:15 error saving "F06DJ8P72J0-System workflow proposal" to "daily-system/attachments": callback error: download to "daily-system/attachments/F06DJ8P72J0-System workflow proposal" failed, [src=]: received empty download URL

@akostadinov
Copy link
Author

Thanks a lot for the great program!

Things seem to work. The empty attachments I think are google docs attachments that are not real attachments. So maybe it is worth making slackdump handle them more gracefully.

Just want to point out that goreleaser should be able to generate docker images. And it will be immediately useful if manual login approach is used in combination with docker run --env-file or podman run --env-file.

For getting the exports, either use docker cp or run the container with an attached volume.

While it will not allow auto-login with a browser, it will still help people that don't want to run downloaded executables or don't want to pollute their home dirs with stuff like the playwright downloads.

@rusq
Copy link
Owner

rusq commented Apr 12, 2023

Thanks for checking and your suggestions on goreleaser deployment — I'll have a look at that.

Regarding the file attachment, this error can also happen if you're running on a free Slack Workspace and the file attachment is older than 90 days and and slack hides it, but as you're saying that it's a google docs, it's interesting because I have never encountered this with google docs.

Would you be able to lookup the file "mode" value in the "files" object for it? You can locate it in the dump JSON file by searching for "F06DJ8P72J0". I guessing it would be of a "tombstone" type?

Or, if you feel comfortable attaching the "files" object entirely, (you can remove the download URLs, filename and all identifiable fields, I'll be looking at the system fields only), I'd greatly appreciate that.

This is my public GPG key that you could use to encrypt it and then just post it here:

-----BEGIN PGP PUBLIC KEY BLOCK-----

mQINBF53EqUBEADlNt/tY3xiywb0/YekE+MVKeF6XnF7F1/vwCPEW/CLGTSQ0kmA
WCP4keJYBR1yctDy+Tywg0sYLzHvvv2WwY8IaIlAqGudEMkELTw/cIkjH3kbP79W
yS2bDJ9RvFGy7DE06m5x+Cqc2hPTeAqxe/lyzs0HTPX6ZrxVBIF1EIA5EMGRT+v5
CeFYdH2uZASRR8BaDdofXENbRbqnpu0kIix3H2UcXcI3xp4G+nYyi6dvin5YzBjx
d94dcXicWo3biyZOpNw2aJ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EbCLw1MjIihXXVRX2SADxh+UlzhFYJ8dXlH55O/K
xN+vXVG5lWsfBoxlPl8MlE7t1NXPHFDU17hFYRiRIM+rPP03r3fO2z+HJ6ipit31
o91j/xNw8Fxmu66/sbnrF/7kK3x7MFb1XUtsqcaBA6nOOeQ8hAnANvkG6+Kdr8iP
zPCzDELyPQI3z6umoir1oQJQBA+JL41Zav57Qasf2c28/l7aeH2shr+WRtb2Chm4
pMVXoP0U/C6Q6xBNDJFkMY8Ot0l2/2qlLe/sZbCi66YrFLNXW6WDt6sEFesv9au4
WnRxw+wHBb/n4QzvTG4apxZs48xEXciGV1ykstELoRM+nfDTNxHxiIKCTQTqM+P7
JH4sUebliip+ealnlm4iatPstweMqQtt0Flcxc7YMVzlmUayai8qCadlc/tjuOon
bDDqiCSKg0ikNV+eiMc6GXa4bZ27OOTaZ/eH63j8rACWsbxQlbjTvJdBEvdTwD/l
A9tvq05yHz7gFiEGviChMQCOIhYzP1f71kkckUi9bdmsQb1r7YBR+4954z1KMPJN
JpxVSQIjZctXVe3jgJs86GthNtv/8gG6xVpTBgoB4twnFrK/8SUf4svgmvOCImv6
NM9ENiyd7l/il9NZKtXaq8i/GDqv7RRjTy9Z5jGxhdU=
=QFMD
-----END PGP PUBLIC KEY BLOCK-----

@rusq rusq removed the help wanted Extra attention is needed label Apr 12, 2023
@akostadinov
Copy link
Author

akostadinov commented Apr 12, 2023

I tried to randomize the file id, user id and URL to begin with. Also I doubt there's anything very secret in the document. But encrypting it to err on the safe side anyway. For lurkers, the file is listed as:

"mimetype": "application/vnd.google-apps.document",
"pretty_type": "G Suite Document",
"filetype": "gdoc",
"mode": "external",

-----BEGIN PGP MESSAGE-----

hQIMA+FHKt6pGXQBAQ//ft8TnbsyUN7P0OY4dpL0qCBj2YDcC8yRE5ANeSEDgPL5
35VynMBZCQERM4IVOVp3S7Q5dHK8fqxvFsxlr9oASG3owptVL9/8jBa74CAwQX6Z
UHTQR1bDFIh0fGD0cpbCoGZh9vprx8pjR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ESSAGE-----

P.S. Plan is presently not free, I don't know exactly what it is. But we are migrating off that instance, that's how I found this project.

@rusq
Copy link
Owner

rusq commented Apr 13, 2023

Thank you! I successfully decrypted and checked the JSON, will modify the downloader to skip the "external" files. Looks like these types of files appear when one has come kind of google drive integration, strange that no one reported it yet 🤔 Will have to mess around with this, maybe it would be even possible to fetch those.

TODO:

@rusq rusq added enhancement New feature or request and removed bug Something isn't working labels Apr 13, 2023
rusq added a commit that referenced this issue Apr 13, 2023
rusq added a commit that referenced this issue Apr 13, 2023
rusq added a commit that referenced this issue Apr 14, 2023
#206 and use external fsadapter package
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants