Google action testing with API Gateway

google-assistant

#1

I have a google action created on the actions console. Im able to deploy that action with the jovo CLI. the webhook is enabled and points to a Lambda API.
Everything works fine with Alexa off course Its the same code base.
When I test from the actions simulator the resquest reach the API gateway and it passes on the request the lamda handler. request is the following:
{
“handler”: {
“name”: “Jovo”
},
“intent”: {
“name”: “actions.intent.MAIN”,
“params”: {},
“query”: “Talk to project shell”
},
“scene”: {
“name”: “actions.scene.START_CONVERSATION”,
“slotFillingStatus”: “UNSPECIFIED”,
“slots”: {}
},
“session”: {
“id”: “ABwppHFfAOvTPuiiooXBnnA_r9R5ptvUiYmba1QrnVtcUe2Wc2mMhzAWqbpc9u6mjMiRd7LjYUj5qYofUamPzz0w7gtsNRFLcBQ”,
“params”: {},
“typeOverrides”: [],
“languageCode”: “”
},
“user”: {
“locale”: “en-US”,
“params”: {
“userId”: “f72b6f69-d831-43b7-a816-b1448c17ea83”
},
“accountLinkingStatus”: “ACCOUNT_LINKING_STATUS_UNSPECIFIED”,
“verificationStatus”: “VERIFIED”,
“packageEntitlements”: [],
“gaiamint”: “”,
“permissions”: [],
“lastSeenTime”: “2021-05-31T17:15:32Z”
},
“home”: {
“params”: {}
},
“device”: {
“capabilities”: [
“SPEECH”,
“RICH_RESPONSE”,
“LONG_FORM_AUDIO”
],
“timeZone”: {
“id”: “America/Guatemala”,
“version”: “”
}
}
}
The error on the lambda code is the following:
{
“errorType”: “Error”,
“errorMessage”: “Can’t handle request object.”,
“code”: “ERR_NO_MATCHING_PLATFORM”,
“module”: “jovo-core”,
“hint”: “Please add an integration that handles that type of request.”,
“stack”: [
“Error: Can’t handle request object.”,
" at App.handle (/var/task/node_modules/jovo-core/dist/src/core/BaseApp.js:176:23)",
" at async App.handle (/var/task/node_modules/jovo-framework/dist/src/App.js:265:9)",
" at async Runtime.exports.handler (/var/task/index.js:26:3)"
]
}

thats what I’m able to find on the cloudwatch logs on my voice app log group. Any idea of may be causing the issue?


#2

Hey @Mairon_Corrales

Does it work locally with the Jovo Webhook?


#3

Hey @AlexSwe, yes this works on the webhook, and on the lambda function on AWS. What I found most interesting is that when testing against the actions simulator error happens, but if testing on dialog flow it works. So the question now would be, how to deploy dialog flow instead of action on action builder?
Or at least how to make action on action builder to work?


#4

Hey @Mairon_Corrales, as far as I know Jovo is looking if your project.js contains a dialogflow configuration to check if deployment is done for conversational actions or dialogflow.
grafik
If it contains one like shown above deployment is done for dialogflow.
The no matching platform error occured for me, when I deployed a conversational action but instantiated a usual google action object (instead of conversational action). Could you check if your app.ts imports the google object from the “conv” googe action repo? The old googleAction would not have the “conv” at the end.
grafik


#5

I have my project.js like
googleAction:{
projectId: ‘my-project-id’,
webhook: ‘my-wehook-url’
So I need to modify it as the one you showed me to deploy to dialog flow?
Thing is that I already have a a dialog flow manually set up and been able to make requests to the backend but when testing from a device it is pointing to the action on actions builder.
Also my app.js have this 2 lines:
const {GoogleAssistant}=require(‘jovo-platform-googleassistant’);

const{Dialogflow}=require(‘jovo-platform-dialogflow’);


#6

I would recommend using the new Actions Builder.

Here’s the sample project for the new Conversational Actions.

Hope it helps to add the missing parts in your code. Let me know if you need further help.


#7

Hello Guys! thanks for your answers. I have my code working now with an action on google and dialogflow as the NLU engine. That is ok but now I´m not able to test on smart display devices, or mobile devices, it just works on speaker devices.
Do you happen to know why is this happening?


#8

This is weird.

Do you get any error messages? Is the webhook called?


#9

Yeah error mesages says that ssml are malformed. I think its due to not having cards or simple texts set as part of the response.


#10

Could you post the response json?