Reputation: 421
I am facing a mysterious error in my application. (Google Assistant + Fulfillment written in NodeJS running on Firebase) My application is about buying gasoline.
If you want to buy something else like apples it will ask back.
If want to buy something else for second time like 7 plum it will redirect you to the default intent. This is how it should work.
But instead of that (see screenshot)
The weird thing is the request and response and error tab is empty: (they are never empty for other use cases)
Inside firebase functions I see no error log but under GCP log i see one error:
{
insertId: "1fmi9ryg1rc8hud"
labels: {
channel: "preview"
querystream: "GOOGLE_USER"
source: "JSON_RESPONSE_VALIDATION"
}
logName: "projects/xxxxxx/logs/actions.googleapis.com%2Factions"
receiveTimestamp: "2019-06-11T17:10:13.712416274Z"
resource: {
labels: {
action_id: "actions.intent.TEXT"
project_id: "xxxxxx"
version_id: ""
}
type: "assistant_action"
}
severity: "ERROR"
textPayload: "MalformedResponse: ErrorId: 113661de-882c-4238-a67a-f324359004a4. Failed to parse Dialogflow response into AppResponse because of invalid platform response. : Could not find a RichResponse or SystemIntent in the platform response for agentId: d7069fa0-5691-4104-848a-56f78e3007c4 and intentId: "
timestamp: "2019-06-11T17:10:13.699816952Z"
trace: "projects/xxxxxxx/traces/ABwppHEdFw2KY23BcC1eOVrIkgUCPC0ae2Sa39ixR7r1mUexFYRhdj2pH-BHNkXky1s9cgLGSw"
}
And the reason why it is mysterious is because for example if I say 7 plum first it accepts, and 7 apple second it will go to the default intent. Why? I don't have any idea. If I type random text like 3 sadjhb it will also ask back, and for the second time it will go to the default intent. I know it is not the proper description of the problem but I feel it is not working consistently.
I can copy the fulfillment code of this intent as well but right now I thing it has nothing to do with this. I hope one of you faced with this type of behavior before. Thank you for reading!
EDIT:
I have one fallback intent which should run every time when no intent found
And the intent implementation
app.intent('service.addgasoline.getinput', (conv, params) => {
if (params.value && params.unittype) {
const outmessage = 'So buy gas for - ' + params.value + ' ' + params.unittype;
conv.ask(outmessage);
conv.ask(new Suggestions(['Yes', 'No']));
} else {
conv.ask('How much gas you want to buy? For example, you can say 1 L or 1 gallon.');
}
});
Upvotes: 4
Views: 2813
Reputation: 151
I just fixed a similar issue on my app.
The problem in my case was in the training phrases of the intent on DialogFlow. The resolved values of the entities was not exactly as expected.
For example, the whole phrase "7 plum" may be mistakenly resolved as the value, instead of just "7" in it.
Upvotes: 2