Google Assistant with Rasa - ngrok error

I followed the tutorial on Going beyond ‘Hey Google’: building a Rasa-powered Google Assistant I know that this is compatible with an old version of rasa so I used the github to update the codes. I fixed all errors, updated gactions and ran the test commands and ran ngrok using adminstrative previliges on the same port as rasa (5005 by default).

Everything works fine with no errors. However, when I test the Action on Google Assistant, I get the following response: Social Robot isn’t responding right now. Try again soon. (Social Robot is the name of my project on Google Assistant Actions.) at the same time, ngrok gives the following message: POST /webhooks/google_assistant/webhook 500 Internal Server Error

I also noticed that the shell (anaconda prompt) in which I ran ‘rasa run’ freezes…

I don’t have much experience with http requests or ngrok, can anyone help with this issue?

U can try ngrok port number like 5004 (ngrok.exe http 5004) not 5005. This will providing a url like https://xxxxxxx.ngrok.io, this url paste in your action.json file like below

“url”: “https://xxxxxxx.ngrok.io/webhooks/google_home/webhook”,

How can I make rasa run on 5004 so I can use ngrok with it? I tried changing the credentials file but it still runs on 5005. Also, why do you think it would make a difference if I changed that?

Your help would be greatly appreciated…

Going beyond ‘Hey Google’: building a Rasa-powered Google Assistant

Check this link , what you do in step:5 ? Are you running the python run_app.py ?

And what error you got while running the python run_app.py ?

No I don’t run run_app.py because this is for older versions of rasa I believe.

What I do is that I run “rasa run”. I believe that should run the nlu and core on its own and use my endpoints.yml?

If I need to use the run_app.py, how I can do that when I don’t have this organization of files? (models just contains a .gz file)

I use rasa run --enable-api -p 5004 and then use ngrok on port 5004, after that I copy the url generated by ngrok with suffix /webhooks/google_home/webhook . The last is run rasa run actions --actions actions and follow the rest of the tutorial from the blog.

But my assistant won’t response when I tested it and saying that “It isn’t responding right now. Try again soon.” . How to solve this?

Screenshot-20190707093507-543x201

Best regard

update : Does this source has an impact to our error? https://developers.google.com/actions/identity/user-info#migrating_to_webhook-generated_ids

I have the same exact problem. If you get anywhere with this, please post the solution.

1 Like

summon master @Juste

In your ga_connector.py removing the 44 line(sender_id = payload[‘user’][‘userId’]) and also removing sender_id parameter in 51th line.

Hey guys, I am working on updating this tutorial at the moment and will ping you once it’s ready to go :slight_smile:

1 Like

The tutorial has just been updated. Give it a go - quite a few things changed on Rasa’s as well as Google side. Let me know if you still face any issues :slight_smile:

1 Like

Works great! Thank you so much!

1 Like

Hi! I did the same as @paraparata, following the blogpost - Going beyond ‘Hey Google’: building a Rasa-powered Google Assistant (after @Juste updated the tutorial.)

I get the same error saying my bot isn’t responding right now and try again soon. Capture

The ngrok terminal shows this error:

POST /webhooks/google_assistant/webhook 404 Not Found

And the main terminal says:

raise NotFound(“Requested URL {} not found”.format(url)) sanic.exceptions.NotFound: Requested URL /webhooks/google_assistant/webhook not found

It does return Hello from Rasa: 1.6.0, when I open the ngrok link without the “/webhooks/google_assistant/webhook” suffix.

How to solve it??

I’m not sure but my first guess is the actions.json file in gactions. Make sure your fullfilment url is

https://****.ngrok.io/webhooks/google_assistant/webhook

Yeah. It’s done exactly as given and guided. Still has the same problem.

I am having the exact same problem as @aaditnarendar

Make sure you run your ngrok on the same port as rasa. ex:

rasa run --enable-api -p 5004

./ngrok http 5004

Also don’t forget to run ./gactions update and ./gactions test

Maybe attach the following files so I can understand the error more:

  1. action.json inside the google connector
  2. ga_connector.py
  3. credentials.yml

Yes. All of it was done. Still doesn’t work.

I’ve attached the asked files. Please let me know if there is a solution for this.

ga_connector.py (2.5 KB) action.json (1004 Bytes) credentials.yml (828 Bytes)

Sorry for the delay.

I think the problem lies in the fact that your connector was never run. This is because you need to add it to your credentials.yml file

Add this line

google_assistant.ga_connector.GoogleConnector:

Same packages you would give to python import. for example, the above line means that my ga_connector.py file (which contains GoogleConnector class) is inside another package called ‘google_assistant’ (which I initialized with a __init__.py file)

Let me know if this solves your problem!

I am still facing the same issue @paraparata. Kindly please help me. I followed the same tutorial. My testing console the debug error says “Error: Requested URL /webhooks/google_assistant/webhook not found”.

My ngrok console says "POST /webhooks/google_assistant/webhook 404 Not Found " please help @Juste @juste_petr