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

Error when dumping channel with files, when there are files that was deleted. #270

Closed svantek-admin closed 8 months ago

svantek-admin commented 9 months ago

Describe the bug When doing dump of Slack channel which downloading files I get following error

error saving "XXXXXXXXXX-" to "aaaaa/attachments": callback error: download to "aaaaa/attachments/XXXXXXXXXX-" failed, [src=]: received empty download URL

it seems that when there were file in message but later was deleted, slack returns array with file which "mode": "tombstone"

When this happens, malformed URL is added in exported file

        "url_private": "attachments/XXXXXXXXXX-",
        "url_private_download": "attachments/XXXXXXXXXX-",

To Reproduce Steps to reproduce the behavior:

  1. Create channel in slack
  2. Upload file
  3. Delete this file
  4. Run slackdump -download on this channel

Expected behavior

No attempt to download file is performed

Desktop (please complete the following information):

rusq commented 9 months ago

Hey @svantek-admin, thanks for the report, I thought tombstones are handled in the code, but I'll double check.

rusq commented 8 months ago

@svantek-admin, this is fixed now, sorry for the inconvenience. I did handle tombstones, but in the dev (v3) branch ¯\_(ツ)_/¯