Rasa + Aimybox not working on server


I’m trying to follow this guide on how to connect Rasa to Aimybox for interacting with your assistant by voice.

It works just fine if I follow the guide step by step, creating the chatbot locally and then making it public with ngrok. What I wanted to do next was to connect the chatbot that I have running on my server, so that I don’t need to have ngrok running all the time. So what I did was just replacing

val dialogApi = RasaDialogApi(unitId, "https://be1daa0d.ngrok.io/webhooks/rest/webhook")


val dialogApi = RasaDialogApi(unitId, "http://<my-ip>/webhooks/rest/webhook")

but this time I get no answer from the bot. What am I doing wrong?

Also, I would like to make the application work offline, without needing of ngrok or a server being running, how can I achieve that?

Thank you, Tiziano

I think that the problem is that http://<my-ip>/webhooks/rest/webhook returns an html page instead of a JSON object… why is that?

I also tried with http://<my-ip>/core/webhooks/rest/webhook, but still not getting any answer from the bot

Mhm, this should be the right url. Can you try hitting this url (http://<my-ip>/core/webhooks/rest/webhook) manually (e.g. with curl) to see if it works?

You mean like that?

Also tried with Postman:

(it’s not the same response I was getting yesterday though :thinking: yesterday it was an HTML page with an error)


Ok, now I’m getting the same response as yesterday:

And my Rasa production says so:

rasa-production_1  | Traceback (most recent call last):
rasa-production_1  |   File "/build/lib/python3.6/site-packages/sanic/app.py", line 942, in handle_request
rasa-production_1  |     response = await response
rasa-production_1  |   File "/usr/local/lib/python3.6/asyncio/coroutines.py", line 110, in __next__
rasa-production_1  |     return self.gen.send(None)
rasa-production_1  |   File "/build/lib/python3.6/site-packages/rasa/core/channels/channel.py", line 462, in receive
rasa-production_1  |     sender_id = await self._extract_sender(request)
rasa-production_1  |   File "/usr/local/lib/python3.6/asyncio/coroutines.py", line 110, in __next__
rasa-production_1  |     return self.gen.send(None)
rasa-production_1  |   File "/build/lib/python3.6/site-packages/rasa/core/channels/channel.py", line 412, in _extract_sender
rasa-production_1  |     return req.json.get("sender", None)
rasa-production_1  | AttributeError: 'NoneType' object has no attribute 'get'


Ok, If insert the header and the body of the request, it works just fine:

Maybe I spotted the problem… If I use http instead of https with my ngrok link, it works fine if I send a test request, but doesn’t work with Aimybox -> just like what happens with my server.

So maybe the problem is that Aimybox doesn’t accept not protected connections. I still need to find a workaround though…

Solved. It was Android, not Aimybox, who blocked connections over http.

I followed this guide and added an exception to the Android policy, now it works.