9

Hi, When I try to test my Test app, it gets stopped and display

My test app isn't responding right now. Try again soon
.

When I check validation error tab I notice I got this error

MalformedResponse
'final_response' must be set.
This is the error i got.

here is the Debug info:

<code>
{
  "audioResponse": "//NExAAQMQ...",
  "conversationToken": "GidzaW11bG...",
  "debugInfo": {
    "agentToAssistantDebug": {
      "agentToAssistantJson": "{}"
    },
    "assistantToAgentDebug": {
      "assistantToAgentJson": "{\"user\":{\"userId\":\"ABwppHG7Kyq6lQuC4UQhVkNFxGJ3HlCPVLe03G5Jo9UUsXcg41z8LL0ppX3pIv36nDLcvJD8YNxQexCrqoywTg\",\"locale\":\"en-US\",\"lastSeen\":\"2018-02-09T08:05:38Z\",\"userStorage\":\"{\\\"data\\\":{}}\"},\"conversation\":{\"conversationId\":\"1518164534381\",\"type\":\"NEW\"},\"inputs\":[{\"intent\":\"actions.intent.MAIN\",\"rawInputs\":[{\"inputType\":\"KEYBOARD\",\"query\":\"Talk to my test app\"}]}],\"surface\":{\"capabilities\":[{\"name\":\"actions.capability.SCREEN_OUTPUT\"},{\"name\":\"actions.capability.AUDIO_OUTPUT\"},{\"name\":\"actions.capability.WEB_BROWSER\"},{\"name\":\"actions.capability.MEDIA_RESPONSE_AUDIO\"}]},\"isInSandbox\":true,\"availableSurfaces\":[{\"capabilities\":[{\"name\":\"actions.capability.SCREEN_OUTPUT\"},{\"name\":\"actions.capability.AUDIO_OUTPUT\"}]}]}",
      "curlCommand": "curl -v 'https://api.api.ai/api/integrations/google?token=e4092e2db85b4744be7d736861988a51' -H 'Content-Type: application/json;charset=UTF-8' -H 'Google-Actions-API-Version: 2' -H 'Authorization: eyJhbGciOiJSUzI1NiIsImtpZCI6ImJhNGRlZDdmNWE5MjQyOWYyMzM1NjFhMzZmZjYxM2VkMzg3NjJjM2QifQ.eyJhdWQiOiJyZXN0YXVyYW50LTRhYzMzIiwiYXpwIjoiMzk3NjQzMDYwNTkyLWlydW9ubHFzZ2cyZm81cnM1OXIwcGpkYTBxMjVsZjZsLmFwcHMuZ29vZ2xldXNlcmNvbnRlbnQuY29tIiwiZXhwIjoxNTE4MTY0NjU0LCJpc3MiOiJodHRwczovL2FjY291bnRzLmdvb2dsZS5jb20iLCJqdGkiOiI0NzVhMDU5OTllMzc4ODA0MmE5YTlhYjFkZmQ0YWU0MzA2Y2MzNTA3IiwiaWF0IjoxNTE4MTY0NTM0LCJuYmYiOjE1MTgxNjQyMzR9.GZ3NrlfYPAx5egtOYDktY9W-6P776_eLsth7tvyK-q7vytHdbMOcL4Pkq27g4pcWL8VRJkPv_3VL-QA2uAPaVm1m0F2H3qfYHqQtZmBgxgICSiwKCpyUnV1KkQWlD5O6MRW1VVZFXMqk2n2_w1U_8MCXH3z1nIB_G9MHLUD3mTomvM1W_SoyIx6xhvDJKVHN42pu28Ahj_BJEilazK6q91OhtY3hbcGjB5xAYnVP6Soh_N4qSvlrPV3J5-L8pKu0sArlspukGLKb_ijNKZiEgxsire2WCs85-5GbB-mKPXGnOuPY7mE168b2Xw37us-5V0sZ1y7Qtod7nH85A1kHaA'  -A 'Mozilla/5.0 (compatible; Google-Cloud-Functions/2.1; +http://www.google.com/bot.html)' -X POST -d '{\"user\":{\"userId\":\"ABwppHG7Kyq6lQuC4UQhVkNFxGJ3HlCPVLe03G5Jo9UUsXcg41z8LL0ppX3pIv36nDLcvJD8YNxQexCrqoywTg\",\"locale\":\"en-US\",\"lastSeen\":\"2018-02-09T08:05:38Z\",\"userStorage\":\"{\\\"data\\\":{}}\"},\"conversation\":{\"conversationId\":\"1518164534381\",\"type\":\"NEW\"},\"inputs\":[{\"intent\":\"actions.intent.MAIN\",\"rawInputs\":[{\"inputType\":\"KEYBOARD\",\"query\":\"Talk to my test app\"}]}],\"surface\":{\"capabilities\":[{\"name\":\"actions.capability.SCREEN_OUTPUT\"},{\"name\":\"actions.capability.AUDIO_OUTPUT\"},{\"name\":\"actions.capability.WEB_BROWSER\"},{\"name\":\"actions.capability.MEDIA_RESPONSE_AUDIO\"}]},\"isInSandbox\":true,\"availableSurfaces\":[{\"capabilities\":[{\"name\":\"actions.capability.SCREEN_OUTPUT\"},{\"name\":\"actions.capability.AUDIO_OUTPUT\"}]}]}'"
    },
    "sharedDebugInfo": [
      {
        "name": "ResponseValidation",
        "subDebugEntry": [
          {
            "debugInfo": "'final_response' must be set.",
            "name": "MalformedResponse"
          }
        ]
      }
    ]
  },
  "response": "My test app isn't responding right now. Try again soon.",
  "visualResponse": {
    "visualElements": []
  }
}
</code>
  • @Maciej Bialorucki How to solve MalformedResponse 'final_response' must be set. error in action simulator: am also having the same issue. – Vikram Feb 09 '18 at 10:18
  • 1
    Are you using Dialogflow or the Action SDK? If Dialogflow, can you post a screenshot of the entire Intent that you think is handling it. If you're using a webhook - what JSON are you returning from the webhook or can you show the code that sends the reply? – Prisoner Feb 09 '18 at 10:46
  • @Prisoner , yes am using Dialogflow. if (requestSource === googleAssistantRequest) { sendGoogleResponse(_DisplayName.toString()); } else { sendResponse(_DisplayName.toString()); } this is the code of webhook response. – Niranjan Dharmarajan Feb 14 '18 at 06:33
  • Can you update the question with the code and with a screen shot of the Intent you think is handling your request? (Don't post code in comments since they're hard to read, but update the question and post a comment that you've done so.) – Prisoner Feb 14 '18 at 10:02

7 Answers7

2

There could be a silly mistake like I did.

In Your index.js file, Check out this similar line:

app.intent('favourite color', (conv, {color}) => {
    const luckyNumber = color.length;

In this, be sure that your intent name is exactly same as your intent that you created while creating a new intent.

NOTE: Intent name is CASE-SENSITIVE. So make sure you type the same name exactly in this line of .js file.

Akshay Chopra
  • 1,035
  • 14
  • 10
1

I had same issue, resolved following way

  1. go to logs of firebase function in my case url was
    https://console.firebase.google.com/project/project-1/functions/logs?search=&severity=DEBUG
  2. Refresh action simulator window and Check error log while executing
  3. In my case error was

enter image description here

  1. I have added Intent handler in firebase function as below

    app.intent('Default Welcome Intent', conv => { conv.ask('Hi, I am in welcom intent.') })

  2. Refresh simulator window, and I got the proper response.

Similarly you can also find the cause of the error and resolve it.

vikram eklare
  • 800
  • 7
  • 25
0

Is this intent webhook enabled ?

if yes, did you catch this intent in your code

if no, did you add a response to your intent

That is usually the first 2 things to check

nokiko
  • 483
  • 1
  • 6
  • 14
0

What I find is that you need something in Speech. In the Response I find

'Failed to parse Dialogflow response into AppResponse because of empty speech response'

I find Media Object works but not list or carousel as they don't have a Speech option. I am also trying to solve this problem.

If there is a way for List of Carousel to return a Speech response that might solve it

woisme
  • 279
  • 2
  • 15
0

If anyone else have this issue try turning on "Enable webhook call for this intent" in Fulfillment under Intents .

el2e10
  • 1,518
  • 22
  • 22
0

I had similar issue and changing version(at Agent) resolved the issue:

enter image description here

consider using legacy Apis

Also you may need to provide a default response in the intent :

enter image description here

Shashank Bodkhe
  • 941
  • 10
  • 15
0

Check if you have multiple languages set in Dialogflow, if there is more than 1 language, and you have not added translations, it will come up with that message.

balslev
  • 331
  • 4
  • 11