SlackLogViewer: SlackLogViewer can't view images from slackdump's exports

I created a zip with slackdump with the following command

./slackdump -export workspace-name.zip -export-type mattermost -export-token xoxo-

I can open and view all my conversations with SlackLogViewer, but I can’t view any images. I just see a loading placeholder:

image

Do I have to put a specific value in for the export-token? Or do I need to feed the value I put into SlackLogViewer? I can see that slackdump created an __uploads directory and all the attachments are there, but I can’t see them in SlackLogViewer. If I click on a PDF it shows a bunch of HTML, but I can “download” the PDF to a folder, so it knows where it is.

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Reactions: 1
  • Comments: 22 (4 by maintainers)

Most upvoted comments

Hey @thayakawa-gh, thanks for attending to this, sorry I missed the email.

@DoTheBestMayB, sorry to say, but you’re adding the xoxc- (client) token, which requires cookies to be set, it wouldn’t work - you need either export (xoxe-), bot (xoxb-), application(xoxa-) or personal (xoxp-) (legacy) token to be able to see the images.

Alternatively you can try experimental slackdump v3.0.0-pre-alpha.2 (codename “Wetfart”), it has a very limited and simple viewer, which you can start with slackdump view <archive or directory name>, it is very clunky, but would be able to show images.

Hi, @DoTheBestMayB. First, please check your export files. There should be fields with url_private keys which is referenced by SlackLogViewer when accessing attachments. If the json files were successfully exported with a valid token, you can access the urls directly in your browser and retrieve the files. If there are no urls in url_private fields but local file paths, etc., you may have used slackdump the wrong way. If there are urls but you cannot retrieve files, your token may be invalid or the attachments may have been deleted because the file expiration date has passed.

Hello @thayakawa-gh. Thanks for replying, you’re absolutely correct! Sorry I’m late.

The difference between Slack native and Slackdump exports is that Slack exports have the export token but don’t have files in them. Slackdump exports have files (downloaded automatically), but don’t have token. SlackLogViewer works perfectly fine with Slack export files, but not with Slackdump, unless the -export-token is provided by the user.

The version 3 of Slackdump has a built in viewer, it’s not as finely made as SlackLogViewer - it’s simple and experimental - but it is able to show files. It is currently in early alpha, but those who interested can build the latest version of slackdump from master, i.e.:

go build github.com/rusq/slackdump/v3/cmd/slackdump@latest

and then run

./slackdump view your_export.zip

Hey @spacekaila , I may be able to help you with slackdump related questions (@thayakawa-gh I hope you don’t mind my intrusion into this issue).

When you say “json comes out with t=…%2F…” what is the exact command line you are invoking slackdump?

%2F represents ‘/’ and it shouldn’t be the part of the token.

Hi, @spacekaila. Sorry for my late reply. Did you use a valid token? You have to get a token from your slack workspace and pass it to the -export-token option. SlackLogViewer cannot load the attachments from the __uploads directory because downloading the attachments to the directory is a unique function of slackdump.