4

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) flow

The weird thing is the request and response and error tab is empty: (they are never empty for other use cases) Empty request tab Empty response tab Empty errors tab

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"  
}

Full error log

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 fallback intent definition 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.');
    }

});
daniel.szaniszlo
  • 413
  • 5
  • 13
  • The reason is right there in the error message: `Could not find a RichResponse or SystemIntent in the platform response`. You should definitively post the code that produced this response. – gmolau Jun 11 '19 at 20:40
  • I've edited the original post with implementation of the intent and a screenshot with the default fallback intent. But still, sometimes it is working sometimes don't this is why it is weird for me. It is depending on the input. And I could see any error message in the Firebase function logs. If something is wrong with the js code there should be an error there. – daniel.szaniszlo Jun 11 '19 at 21:53
  • Hi @daniel.szaniszlo, were you able to resolve this ? I am getting a similar problem with my action. – karan vs Jun 17 '19 at 11:42
  • Hi @karanvs, Somehow the problem solved itself. After a time the error disappeared. Maybe the dialogflow trained itself.... – daniel.szaniszlo Jun 19 '19 at 20:47
  • In my case, the problem won't go away – karan vs Jun 20 '19 at 05:34

1 Answers1

2

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.

yanp
  • 151
  • 1
  • 1