slack-cleaner icon indicating copy to clipboard operation
slack-cleaner copied to clipboard

Failed to delete

Open ghost opened this issue 8 years ago • 8 comments

I have a slack channel populated by and incoming webhook bot. I want to clear the channel, I have paid account maybe I can do this within admin? I use this command and just get loads of failed to delete messages, any help would be great!

This is the command I use slack-cleaner --token=###mytoken --message --channel my-channel --bot --perform --log --rate 1

ghost avatar Jun 30 '16 07:06 ghost

i ran into the same issue. Problem was that I used a bot token. I'm now using a test token from Slack's OAuth test page (https://api.slack.com/docs/oauth-test-tokens) and it works now.

olmoser avatar Jun 30 '16 09:06 olmoser

Thanks for info, I defo using a test token from that page so I dont think thats the problem.

ghost avatar Jun 30 '16 09:06 ghost

Same issue here. The token is created by the https://api.slack.com/docs/oauth-test-tokens so i don't think the token is the problem

gioialorusso avatar Nov 08 '16 13:11 gioialorusso

This was incredibly helpful! Perhaps this should be added in the readme at the bottom?

ghost avatar Mar 07 '17 14:03 ghost

Bump! Same issue happens Token from https://api.slack.com/custom-integrations/legacy-tokens Command: sudo slack-cleaner --token SECRET --message --group groupname --bot --after 20170325 --perform --log --rate 1 Result for each message: Failed to delete -> ...

FlackMonkey avatar Mar 30 '17 08:03 FlackMonkey

I use legacy tokens and I get a certain indeterminate number that DO delete but then it fails and the rest of the messages fail from then on.
I just have to keep re-running it multiple times until it fully deletes :( slack-cleaner --token SECRET --message --group groupname --bot --before 20170413 --perform Used to work flawlessly but have had this issue in the past couple months or so.

edwinter avatar Apr 13 '17 23:04 edwinter

Hello, Same issue with legacy tokens, and like @edwinter , we have to re-run after ~15sec (first messages are deleted correctly).

With zsh, there is a command called repeat, combined with timeout, it's possible to avoid manual re-run :

repeat 50 timeout 10s slack-cleaner --token ........

m4tm4t avatar Mar 30 '18 12:03 m4tm4t

Same here, trying to delete all msg from a channel. The msg count show up correctly but always failed to delete. We are using rate of 5 seconds.

Freelensia avatar Jul 29 '19 13:07 Freelensia