"There was an error loading messages and polling has been stopped."

When I post requests to/webhooks/rest/webhook using curl or the requests library in python, the conversation lands in Rasa-X with a “rest” channel name and is between the Demobot and whatever my sender is called.

I am using a backend inside a docker container with fastapi to make these calls and have an endpoint set up that takes a sender and message as parameters and posts a request to /webhooks/rest/webhook. The conversations also land the way they should when sent through the fastapi interactive swagger docs.

So far so good.

I have a chatbot widget in my frontend which sends requests from the frontend to the fastapi endpoint. This is the only case in which Rasa-X refuses to load the conversation, giving me this error message in its UI:

There was an error loading messages and polling has been stopped.

The image below shows how the error message appears in Rasa-X:

Just to demonstrate, here is the log message when Rasa-X makes a successful request to retrieve the conversation and no error appears with a status code is 200:

[2021-04-13 14:04:14 +0000] - (sanic.access)[INFO][]: 
GET http://chat.masspredict.io/api/conversations/someone? 
format=full_conversation&since=1618322216.447606 200 298

And here is the log message when Rasa-X fails to make a successful request and returns a 400 status code, which is when the error message appears:

[2021-04-13 14:04:16 +0000] - (sanic.access)[INFO][]: 
GET http://chat.masspredict.io/api/conversations/someone? 
format=full_conversation&since=0 404 198

After taking a look at the docs, and it clear that the since parameter is set to 0 when the request fails in the latter, whereas the former shows this: 1618322216.447606

I checked the Rasa-X API docs (Rasa X Documentation) for that specific endpoint, and it states this about since:

Include only events with a timestamp after since

But I have no idea what that means.

Things I tried:

  • Removing AdBlock from my browser, didn’t help
  • Trying another browser, no difference
  • Attaching the backend container shell and sending the request (even without the headers) from there using python – this works, no errors!


1 Like