Slack bot not working post migration

We have an operational bot built on Rasa using Slack channel that have recently been migrated to another server. Post migration, some of the stories (with custom actions) times out before action completion with following in logs:

2021-09-08 15:40:55,776 [WARNI]  Received retry #1 request from slack due to http_timeout.
2021-09-08 15:40:55,781 [ERROR]  Exception occurred while handling uri: 'http://xyz.com/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).

And the same stories (using the same database and same slack app) still works alright in the old server. Environment details for old and new server:

New:

Rasa Version      :         2.8.0
Minimum Compatible Version: 2.8.0
Rasa SDK Version  :         2.8.1
Rasa X Version    :         None
Python Version    :         3.8.0
Operating System  :         Windows-10-10.0.17763-SP0

Old

Rasa Version     : 2.1.1
Rasa SDK Version : 2.1.2
Rasa X Version   : None
Python Version   : 3.8.6
Operating System : Windows-10-10.0.14393-SP0
Python Path      : c:\purplebot_env\scripts\python.exe

All other configuration are same. We have monitored perfmon across both servers and new performs better. So we clueless what else to check.

Could someone please assist in debugging the issue? Happy to pull more details as needed.

1 Like

hey @siddhbhatt can you share details on what response you’re trying to return when you get this TypeError?

Hi @desmarchris Couple of action outputs where we see errors:

  1. text pulled from database
- You are SIDDHARTHA BHATTACHARYA.
- You are working for None >> UNKNOWN >> None.
- Your BRID is UNKNOWN
- Your Delivery Lead is UNKNOWN.
  1. Database output in text formatted using beautifultables:

how are you returning this in your custom action?