rasa: Duplicate messages in Slack channel
Rasa version: 1.1.4
Python version: 3.6.8
Operating system (windows, osx, …): Windows + ngrok
Issue: When I send message to Slack channel, bot answering to me multiple times: Here was an issue with same problem: https://github.com/RasaHQ/rasa/issues/2120
At ngrok logs I see, what User-Agent: Slackbot 1.0 keeps POST me messages with headers:
X-Slack-Retry-Num: 1
X-Slack-Retry-Reason: http_timeout
X-Slack-Retry-Num: 2
X-Slack-Retry-Reason: http_timeout
As I see in slack.py, here is something like workaround for my problem:
https://github.com/RasaHQ/rasa/blob/master/rasa/core/channels/slack.py#L148
I’ve tried to modify credentials.yml:
slack:
slack_token: "xoxb-****"
errors_ignore_retry: "http_timeout"
But it doesn’t work. (same problem on production server with docker)
Summarizing:
- Slack duplicate messages to bot with reason of
http_timeouteven when no custom_actions executed (just utter from domain.yml) - Bot replies to every retry attempt
- I can’t bypass
http_timeoutwitherrors_ignore_retry
Could you advice please?
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 1
- Comments: 24 (14 by maintainers)
Hi, I’m facing very similar issue. After checking the source code, there is code for handle retry case but I spot this: https://github.com/RasaHQ/rasa/blob/e002d095134d52afbd4474a77738739957263db6/rasa/core/channels/slack.py#L256
When I read the request from slack, it turn out that slack sending the request with different headers (“x-slack-retry-reason” and “x-slack-retry-num”) so I changed the code to:
And now it is working as expected. I’m not sure if we can set this text as variable instead of hardcoded string?
Hi, I’ve created PR here, please take a look: https://github.com/RasaHQ/rasa/pull/4081
Why is there more user input happening without any response from the bot? IMO this is probably a UX problem – if you have an action that is going to take a long time, you should let the user know (e.g. “Sure, let me get that for you, this might take a few seconds…”