# Getting multiple messages on Slack

**URL:** <https://forum.rasa.com/t/getting-multiple-messages-on-slack/46865>\
**Category:** Rasa Open Source\
**Created:** [August 13, 2021, 5:20pm UTC](https://forum.rasa.com/t/getting-multiple-messages-on-slack/46865 "2021-08-13T17:20:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![BornaGajic](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/bornagajic/32/16241_2.png) [@BornaGajic](https://forum.rasa.com/u/BornaGajic)\
**Post date:** [August 13, 2021, 5:20pm UTC](https://forum.rasa.com/t/getting-multiple-messages-on-slack/46865/1 "2021-08-13T17:20:26Z")

</div>

Hi,

I’m getting multiple duplicates of messages on Slack (same actions gets triggered). When my custom action gets called I get `200` from ngrok, but right after that I get `500` and a `http_timeout` error. Also I’ve added

```
  errors_ignore_retry: |
    - "http_timeout"

```

Under `slack` in my `credentials.yml` which doesn’t seem to work.

Bot is working properly on Rasa shell.

After the `http_timeout` I also get this error:

```
[1488] [ERROR] Exception occurred while handling uri: 'http://xxxxxxxxxxxx.ngrok.io/webhooks/slack/webhook'
Traceback (most recent call last):
  File "e:\anaconda\envs\chatbot_env\lib\site-packages\sanic\app.py", line 931, in handle_request
    response = await response
  File "e:\anaconda\envs\chatbot_env\lib\site-packages\rasa\core\channels\slack.py", line 526, in webhook
    return await self.process_message(
  File "e:\anaconda\envs\chatbot_env\lib\site-packages\rasa\core\channels\slack.py", line 351, in process_message
    return response.text(
  File "e:\anaconda\envs\chatbot_env\lib\site-packages\sanic\response.py", line 224, in text
    raise TypeError(
TypeError: Bad body type. Expected str, got NoneType)

```

And a side questions: does `utter_message(text)` have a string length limit? Could the errors that am getting be in any way related to new line tokens `\n` or emojis inside responses?

Also for some reason, half of the response text doesn’t get printed on Slack.

I have few `JSON` files that contain answers to questions asked by users. In custom actions I open these files and go through them in a for loop (nothing fancy) and concatenate them in one big `message` variable which is then given to the `text=` argument of `utter_message` method. Besides that, I followed Rasa guide for deploying bot to Slack so everything is the same except `errors_ignore_retry` that I mentioned earlier.

Please help!

---

<div class="post-metadata">

**Author:** ![Tobias\_Wochinger](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/tobias_wochinger/32/4580_2.png) [@Tobias\_Wochinger](https://forum.rasa.com/u/Tobias_Wochinger)\
**Post date:** [August 16, 2021, 11:22am UTC](https://forum.rasa.com/t/getting-multiple-messages-on-slack/46865/2 "2021-08-16T11:22:21Z")

</div>

> TypeError: Bad body type. Expected str, got NoneType)

This seems to be a bug. Would you mind creating github issue for this?

Are there any warnings in the logs before the exception happens?

> And a side questions: does `utter_message(text)` have a string length limit?

At least not on Rasa’s side. Maybe Slack has some. How many characters does your response have?

---

<div class="post-metadata">

**Author:** ![uddaishya22](https://avatars.discourse-cdn.com/v4/letter/u/e99b99/32.png) [@uddaishya22](https://forum.rasa.com/u/uddaishya22)\
**Post date:** [September 3, 2021, 4:59pm UTC](https://forum.rasa.com/t/getting-multiple-messages-on-slack/46865/4 "2021-09-03T16:59:43Z")

</div>

**Bot Stopped responding when it goes to the custom actions** We just migrated our bot from one server to another and upgraded the rasa version from 2.4.0 to 2.8.3 but stories using custom actions are not generating responses although process can be tracked to the logs and all seems fine over there but bot is unable to generate response back to the user over slack channel. it’s working in rasa shell but not on slack. we have been using these stories and in our old server with version 2.4.0 and never encountered this error (apart from few timeout errors).

Please take a cognizance over this and help us ASAP as our bot is down from a long period of time.@Tobias_Wochinger

here is the slack error we are getting on slack log file.

```auto
2021-09-03 21:00:30,013 [WARNI] Received retry #3 request from slack due to http_timeout.
2021-09-03 21:00:30,049 [ERROR] Exception occurred while handling uri: 'http://az2f-469-60-18-124.ngrok.io/webhooks/slack/webhook'
Traceback (most recent call last):
  File "c:\purplebot_env\lib\site-packages\sanic\app.py", line 931, in handle_request
    response = await response
  File "c:\purplebot_env\lib\site-packages\rasa\core\channels\slack.py", line 526, in webhook
    return await self.process_message(
  File "c:\purplebot_env\lib\site-packages\rasa\core\channels\slack.py", line 351, in process_message
    return response.text(
  File "c:\purplebot_env\lib\site-packages\sanic\response.py", line 224, in text
    raise TypeError(
TypeError: Bad body type. Expected str, got NoneType)

```

---

<div class="post-metadata">

**Author:** ![bitthal](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/bitthal/32/19916_2.png) [@bitthal](https://forum.rasa.com/u/bitthal)\
**Post date:** [May 19, 2022, 3:54pm UTC](https://forum.rasa.com/t/getting-multiple-messages-on-slack/46865/5 "2022-05-19T15:54:15Z")

</div>

I am also facing the same issue, when some message given in slack triggers a custom action, this error occurs.
