grundleborg / slack-advanced-exporter

A tool for exporting additional data from Slack that is missing from the official data export.
MIT License
97 stars 19 forks source link

It fetches the e-mails, but no attachments #9

Closed BobTB closed 3 years ago

BobTB commented 6 years ago

I tried it many times. I can use the command to get the email addresses, it does this great.

But when using the fetch-attachments it does create the new ZIP file, but the file is smaller even tehn the original one, and no attachments are added.

Is there anything else to set? I even tried with api-token while fetching the attachments, but it does nothing.

Probably SLACK changed something?

SvenSchoe commented 6 years ago

Same issue for me. A few weeks ago on a test run everything went smoothly, but today the "fetch-attachments" is not working any more. Must be something Slack did. Is it possible to adapt the exporter?

kongr45gpen commented 6 years ago

I'm trying to fix this issue in #10, could you compile this code and see if it works for you?

If you're attempting to export to Mattermost, it still won't work. So make sure to use the mm-workaround branch from the fork above that contains a workaround for that.

thomas-bouvier commented 6 years ago

I compiled your version @kongr45gpen, and unfortunately I can't make it work. The output archive file contains the attachments, however they are not loaded in Mattermost after using the CLI importer. Maybe the way they are stored in mattermost/data also changed ?

kongr45gpen commented 6 years ago

I think that Slack changed the way they export files - it was a simple change, the files key became file, or something like that (probably because files became attachments to posts, while they used to be just the posts themselves?), and Mattermost does not contain the fix for that.

Perhaps you could try a workaround for this, which I wrote because I needed Slack's files: https://github.com/kongr45gpen/slack-advanced-exporter/tree/mm-workaround

thomas-bouvier commented 6 years ago

My comment was about your workaround 🙂

I may be doing this wrong, but after importing, attachments do not appear in Mattermost. I was suggesting that their organization had also changed in mattermost/data, but I have not investigated yet.

kongr45gpen commented 6 years ago

Oh! Do you at least get any errors about the files during the import?

thomas-bouvier commented 6 years ago

Unfortunately, I don't get any errors related to the files. Did the import work for you?

kongr45gpen commented 6 years ago

Yeah, it imported all the files. Although note that I did a command-line import.

thomas-bouvier commented 6 years ago

@kongr45gpen, I can confirm that your workaround works. My messages above were about an issue unrelated to this thread.

For reference, the imported data under data/ were not owned by mattermost:mattermost for some reason.

SvenSchoe commented 6 years ago

Could somebody please provide me with a compiled version of the fixed fork? I'm not sure how to compile this... Thanks a lot!

kongr45gpen commented 6 years ago

This is the fixed fork with the Mattermost workaround, for 64-bit Linux: slack-advanced-exporter.tar.gz

If you're on another platform, I could try cross-compiling it for you.

SvenSchoe commented 6 years ago

Thanks a lot! Works like a charm.

victorwpbastos commented 6 years ago

This is the fixed fork with the Mattermost workaround, for 64-bit Linux: slack-advanced-exporter.tar.gz

If you're on another platform, I could try cross-compiling it for you.

Is there a Windows version?

kongr45gpen commented 6 years ago

This should contain a Windows x64 executable with the Mattermost workaround:
slack-advanced-exporter-win64.tar.gz

Please confirm if it's working, so I can try compiling it in a different way if it fails!

codeguy commented 5 years ago

Hi all. I successfully generated a Slack export using the mm-workaround branch mentioned above in this thread. I do have a ZIP archive containing all Slack messages, emails, and file attachments. However, when I try to import into Mattermost 5.9.0 using the ./bin/mattermost CLI, I receive a lot of these errors:

{"level":"error","ts":1554213618.9882154,"caller":"app/slackimport.go:252","msg":"Slack Import: An error occurred when attaching files to a message, post_id=, file_ids=[j8juo494o7d8jceyxqs6eba7rr], err=SqlFileInfoStore.AttachToPost: Unable to attach the file info to the post, post_id=, file_id=j8juo494o7d8jceyxqs6eba7rr."}

Does anyone know what's going on?

grundleborg commented 3 years ago

The fix for this was merged in version 0.3.0