'Dialogflow Google Assisant breaks when followupEventInput has parameters

I successfully created a simple chatbot using Google Dialogflow and a webhook. The bot asks a user to enter their age.

  • If their age is between 18 and 60, the webhook sends back a "followupEventInput" response and calls the "ask_gender" event. The response also sets the "age" parameter.
  • If the age is not within that range, it will call event "reenter_age" that sits on another intent and asks the user to re-enter their age. No parameters are set here.

This all works 100% on Facebook and the Dialogflow test window, no problems at all.

I then enabled Google Assistant on exactly the same project using the same intents, same responses, etc.

  • The user is asked to enter their age. I then enter an age outside of the expected range and the "reenter_age" event is triggered. The Google Assistant then asks the user to re-enter their age. All good, no problems at all. Works the same as above, using the same code, etc.
  • I then enter the correct age and my webhook sends a "followupEventInput" response and calls the "ask_gender" event. The response also sets the "age" parameter. Exactly the same as in the first point above. But, unfortunately I keep getting a "Webhook error (206)" response, with Code 14. Here, the Google Assistant is supposed to ask for the person's gender (a question that it gets from the intent linked to the called event, not from my webhook), but that does not happen (works perfect in Facebook and the Dialogflow test window on the right).

When I remove the parameter value from my response, the Google Assistant will proceed to ask parameter prompts, because the parameter value never gets set, which is correct, this is supposed to happen.

I do believe this might be a bug, but I will really appreciated your input in case you stumbled upon this as well.

This gets shown in the Google Assistant simulator Window: "Sorry, COMPANY_NAME Cover isn't responding right now. Please try again soon." and just below that "xxx has left the conversation".

Funny thing is, in the Audio tab the text the assistant was supposed to ask is displayed: "Thank you. Are you male or female?"

Below is the debug log from the Google Assistant simulator test page:

  "response": "Sorry, COMPANY_NAME Cover isn't responding right now. Please try again soon.",
  "expectUserResponse": false,
  "conversationToken": "xxx...",
  "audioResponse": "//xxx...",
  "ssmlMarkList": [],
  "debugInfo": {
    "assistantToAgentDebug": {
      "curlCommand": "curl -v 'https://api.api.ai/api/integrations/google?token=xxxxx' -H 'Content-Type: application/json;charset=UTF-8' -H 'Google-Actions-API-Version: 2' -H 'Authorization: eyJhbGciOiJSUzI1NiIsImtpZCI6IjI4Yjc0MWU4ZGU5ODRhNDcxNTlmMTllNmQ3NzgzZTlkNGZhODEwZGIiLCJ0eXAiOiJKV1QifQ.eyJpc3MiOiJodHRwczovL2FjY291bnRzLmdvb2dsZS5jb20iLCJhdWQiOiJhZ2VudC1jb3Zlci10ZXN0LW5xbXB3aCIsIm5iZiI6MTU4ODA3MTg5MSwiaWF0IjoxNTg4MDcyMTkxLCJleHAiOjE1ODgwNzIzMTEsImp0aSI6ImE0MWUyMzgzMWMzYTQ3MDY0MTViYTM1ODQxNGJlZmRlNTM4NzYzYzEifQ.aHxw-af5z3jFgIR0biT-MLGSfHsxtKn2-b966pmqMiAGlhD5xe4OUnAiyXedgR4I65AMAEdiYDHODI-H_WgnPyHh9j23Dfqfn3RJD-Z_vvCl_woEFQB4DXp1uFOZEOsJVf-n3tBWTmkCJvERGuDBdbisvwIIHvcjg3NTDeUPNDvuDvGbU915TA7qWp0vtTNr923zu5qoZC3x9lVYNqK5eXXZgDBd0DUjLkfnmEmX_6cRhvTvFptLjFD54TOw920kjlfCGslu2cy4GzMSsbOYiLwDc6Nmt7SW7ekTRPY4FwMXP7YE0-fj5ELDDGV-7zh3jydJusqx_Yi1UvkDr1EWwg'  -A Google-ActionsOnGoogle/1.0 -X POST -d '{\"user\":{\"locale\":\"en-US\",\"lastSeen\":\"2020-04-28T11:09:46Z\",\"userVerificationStatus\":\"VERIFIED\"},\"conversation\":{\"conversationId\":\"ABwppHGl1ac0akIrzrAht8MzMsi-Um7CE4a_6YBczuuJQrgypBqq3BHGkoRcnYXeuZm33-MKMAiPXgOQs_LacUF5yBgtpLc\",\"type\":\"ACTIVE\",\"conversationToken\":\"[\\\"expecting_age\\\"]\"},\"inputs\":[{\"intent\":\"actions.intent.TEXT\",\"rawInputs\":[{\"inputType\":\"KEYBOARD\",\"query\":\"40\"}],\"arguments\":[{\"name\":\"text\",\"rawText\":\"40\",\"textValue\":\"40\"}]}],\"surface\":{\"capabilities\":[{\"name\":\"actions.capability.SCREEN_OUTPUT\"},{\"name\":\"actions.capability.WEB_BROWSER\"},{\"name\":\"actions.capability.AUDIO_OUTPUT\"},{\"name\":\"actions.capability.MEDIA_RESPONSE_AUDIO\"},{\"name\":\"actions.capability.ACCOUNT_LINKING\"}]},\"isInSandbox\":true,\"requestType\":\"SIMULATOR\"}'",
      "assistantToAgentJson": "{\"user\":{\"locale\":\"en-US\",\"lastSeen\":\"2020-04-28T11:09:46Z\",\"userVerificationStatus\":\"VERIFIED\"},\"conversation\":{\"conversationId\":\"ABwppHGl1ac0akIrzrAht8MzMsi-Um7CE4a_6YBczuuJQrgypBqq3BHGkoRcnYXeuZm33-MKMAiPXgOQs_LacUF5yBgtpLc\",\"type\":\"ACTIVE\",\"conversationToken\":\"[\\\"expecting_age\\\"]\"},\"inputs\":[{\"intent\":\"actions.intent.TEXT\",\"rawInputs\":[{\"inputType\":\"KEYBOARD\",\"query\":\"40\"}],\"arguments\":[{\"name\":\"text\",\"rawText\":\"40\",\"textValue\":\"40\"}]}],\"surface\":{\"capabilities\":[{\"name\":\"actions.capability.SCREEN_OUTPUT\"},{\"name\":\"actions.capability.WEB_BROWSER\"},{\"name\":\"actions.capability.AUDIO_OUTPUT\"},{\"name\":\"actions.capability.MEDIA_RESPONSE_AUDIO\"},{\"name\":\"actions.capability.ACCOUNT_LINKING\"}]},\"isInSandbox\":true,\"requestType\":\"SIMULATOR\"}",
      "delegatedRequest": {
        "delegatedRequest": ""
      }
    },
    "agentToAssistantDebug": {
      "agentToAssistantJson": "{\n  \"conversationToken\": \"[\\\"expecting_gender\\\",\\\"expecting_age\\\"]\",\n  \"expectUserResponse\": true,\n  \"expectedInputs\": [{\n    \"inputPrompt\": {\n      \"richInitialPrompt\": {\n        \"items\": [{\n          \"simpleResponse\": {\n            \"textToSpeech\": \"Thank you.\"\n          }\n        }, {\n          \"simpleResponse\": {\n            \"textToSpeech\": \"Are you male or female?\"\n          }\n        }]\n      }\n    },\n    \"possibleIntents\": [{\n      \"intent\": \"assistant.intent.action.TEXT\"\n    }, {\n      \"intent\": \"956e9d14-6369-4b69-a1dd-443f37ebff64\"\n    }, {\n      \"intent\": \"e4abebaf-e693-4989-bfa9-5fc3e329a5ce\"\n    }],\n    \"speechBiasingHints\": [\"$entity-gender\", \"$sys.number-integer\"]\n  }],\n  \"responseMetadata\": {\n    \"status\": {\n      \"code\": 14,\n      \"message\": \"Webhook error (206)\"\n    },\n    \"queryMatchInfo\": {\n      \"queryMatched\": true,\n      \"intent\": \"956e9d14-6369-4b69-a1dd-443f37ebff64\",\n      \"parameterNames\": [\"age\"]\n    },\n    \"delegatedRequest\": {\n      \"delegatedRequest\": \"{\\n  \\\"responseId\\\": \\\"77a4105c-11c4-41fc-b8b4-f85753f056c9-8e1f57f1\\\",\\n  \\\"queryResult\\\": {\\n    \\\"queryText\\\": \\\"ask_gender\\\",\\n    \\\"parameters\\\": {\\n      \\\"age\\\": {\\n        \\\"amount\\\": 40.0,\\n        \\\"unit\\\": \\\"year\\\"\\n      }\\n    },\\n    \\\"allRequiredParamsPresent\\\": true,\\n    \\\"fulfillmentText\\\": \\\"Are you male or female?\\\",\\n    \\\"fulfillmentMessages\\\": [{\\n      \\\"platform\\\": \\\"ACTIONS_ON_GOOGLE\\\",\\n      \\\"simpleResponses\\\": {\\n        \\\"simpleResponses\\\": [{\\n          \\\"textToSpeech\\\": \\\"Thank you.\\\"\\n        }]\\n      }\\n    }, {\\n      \\\"platform\\\": \\\"ACTIONS_ON_GOOGLE\\\",\\n      \\\"simpleResponses\\\": {\\n        \\\"simpleResponses\\\": [{\\n          \\\"textToSpeech\\\": \\\"Are you male or female?\\\"\\n        }]\\n      }\\n    }, {\\n      \\\"text\\\": {\\n        \\\"text\\\": [\\\"Thank you.\\\"]\\n      }\\n    }, {\\n      \\\"text\\\": {\\n        \\\"text\\\": [\\\"Are you male or female?\\\"]\\n      }\\n    }],\\n    \\\"outputContexts\\\": [{\\n      \\\"name\\\": \\\"projects/agent-cover-test-nqmpwh/agent/sessions/ABwppHGl1ac0akIrzrAht8MzMsi-Um7CE4a_6YBczuuJQrgypBqq3BHGkoRcnYXeuZm33-MKMAiPXgOQs_LacUF5yBgtpLc/contexts/expecting_gender\\\",\\n      \\\"lifespanCount\\\": 20,\\n      \\\"parameters\\\": {\\n        \\\"age\\\": {\\n          \\\"amount\\\": 40.0,\\n          \\\"unit\\\": \\\"year\\\"\\n        },\\n        \\\"age.original\\\": \\\"40\\\"\\n      }\\n    }, {\\n      \\\"name\\\": \\\"projects/agent-cover-test-nqmpwh/agent/sessions/ABwppHGl1ac0akIrzrAht8MzMsi-Um7CE4a_6YBczuuJQrgypBqq3BHGkoRcnYXeuZm33-MKMAiPXgOQs_LacUF5yBgtpLc/contexts/ask_gender\\\",\\n      \\\"parameters\\\": {\\n        \\\"age\\\": {\\n          \\\"amount\\\": 40.0,\\n          \\\"unit\\\": \\\"year\\\"\\n        },\\n        \\\"age.original\\\": \\\"40\\\"\\n      }\\n    }, {\\n      \\\"name\\\": \\\"projects/agent-cover-test-nqmpwh/agent/sessions/ABwppHGl1ac0akIrzrAht8MzMsi-Um7CE4a_6YBczuuJQrgypBqq3BHGkoRcnYXeuZm33-MKMAiPXgOQs_LacUF5yBgtpLc/contexts/expecting_age\\\",\\n      \\\"lifespanCount\\\": 17,\\n      \\\"parameters\\\": {\\n        \\\"age\\\": {\\n          \\\"amount\\\": 40.0,\\n          \\\"unit\\\": \\\"year\\\"\\n        },\\n        \\\"age.original\\\": \\\"40\\\"\\n      }\\n    }, {\\n      \\\"name\\\": \\\"projects/agent-cover-test-nqmpwh/agent/sessions/ABwppHGl1ac0akIrzrAht8MzMsi-Um7CE4a_6YBczuuJQrgypBqq3BHGkoRcnYXeuZm33-MKMAiPXgOQs_LacUF5yBgtpLc/contexts/__system_counters__\\\",\\n      \\\"parameters\\\": {\\n        \\\"no-input\\\": 0.0,\\n        \\\"no-match\\\": 0.0,\\n        \\\"age\\\": {\\n          \\\"amount\\\": 40.0,\\n          \\\"unit\\\": \\\"year\\\"\\n        },\\n        \\\"age.original\\\": \\\"40\\\"\\n      }\\n    }],\\n    \\\"intent\\\": {\\n      \\\"name\\\": \\\"projects/agent-cover-test-nqmpwh/agent/intents/956e9d14-6369-4b69-a1dd-443f37ebff64\\\",\\n      \\\"displayName\\\": \\\"cover.funeral.get.quote.age\\\"\\n    },\\n    \\\"intentDetectionConfidence\\\": 1.0,\\n    \\\"languageCode\\\": \\\"en\\\"\\n  },\\n  \\\"originalDetectIntentRequest\\\": {\\n    \\\"source\\\": \\\"google\\\",\\n    \\\"version\\\": \\\"2\\\",\\n    \\\"payload\\\": {\\n      \\\"user\\\": {\\n        \\\"locale\\\": \\\"en-US\\\",\\n        \\\"lastSeen\\\": \\\"2020-04-28T11:09:46Z\\\",\\n        \\\"userVerificationStatus\\\": \\\"VERIFIED\\\"\\n      },\\n      \\\"conversation\\\": {\\n        \\\"conversationId\\\": \\\"ABwppHGl1ac0akIrzrAht8MzMsi-Um7CE4a_6YBczuuJQrgypBqq3BHGkoRcnYXeuZm33-MKMAiPXgOQs_LacUF5yBgtpLc\\\",\\n        \\\"type\\\": \\\"ACTIVE\\\",\\n        \\\"conversationToken\\\": \\\"[\\\\\\\"expecting_age\\\\\\\"]\\\"\\n      },\\n      \\\"inputs\\\": [{\\n        \\\"intent\\\": \\\"actions.intent.TEXT\\\",\\n        \\\"rawInputs\\\": [{\\n          \\\"inputType\\\": \\\"KEYBOARD\\\",\\n          \\\"query\\\": \\\"40\\\"\\n        }],\\n        \\\"arguments\\\": [{\\n          \\\"name\\\": \\\"text\\\",\\n          \\\"rawText\\\": \\\"40\\\",\\n          \\\"textValue\\\": \\\"40\\\"\\n        }]\\n      }],\\n      \\\"surface\\\": {\\n        \\\"capabilities\\\": [{\\n          \\\"name\\\": \\\"actions.capability.SCREEN_OUTPUT\\\"\\n        }, {\\n          \\\"name\\\": \\\"actions.capability.WEB_BROWSER\\\"\\n        }, {\\n          \\\"name\\\": \\\"actions.capability.AUDIO_OUTPUT\\\"\\n        }, {\\n          \\\"name\\\": \\\"actions.capability.MEDIA_RESPONSE_AUDIO\\\"\\n        }, {\\n          \\\"name\\\": \\\"actions.capability.ACCOUNT_LINKING\\\"\\n        }]\\n      },\\n      \\\"isInSandbox\\\": true,\\n      \\\"requestType\\\": \\\"SIMULATOR\\\"\\n    }\\n  },\\n  \\\"session\\\": \\\"projects/agent-cover-test-nqmpwh/agent/sessions/ABwppHGl1ac0akIrzrAht8MzMsi-Um7CE4a_6YBczuuJQrgypBqq3BHGkoRcnYXeuZm33-MKMAiPXgOQs_LacUF5yBgtpLc\\\"\\n}\"\n    },\n    \"delegatedResponse\": {\n      \"delegatedResponse\": \"{\\\"followupEventInput\\\": {\\\"name\\\": \\\"ask_gender\\\", \\\"languageCode\\\": \\\"en-US\\\", \\\"parameters\\\": {\\\"age\\\": {\\\"amount\\\": 40.0, \\\"unit\\\": \\\"year\\\"}, \\\"age.original\\\": \\\"40\\\"}}}\"\n    }\n  }\n}",
      "delegatedResponse": {
        "delegatedResponse": ""
      }
    },
    "sharedDebugInfoList": [
      {
        "name": "ResponseValidation",
        "debugInfo": "",
        "subDebugEntryList": [
          {
            "name": "MalformedResponse",
            "debugInfo": "Webhook error (206).",
            "subDebugEntryList": []
          }
        ]
      }
    ],
    "conversationBuilderExecutionEventsList": []
  },
  "visualResponse": {
    "visualElementsList": [
      {
        "displayText": {
          "content": "Sorry, COMPANY_NAME Cover isn't responding right now. Please try again soon."
        }
      }
    ],
    "suggestionsList": [],
    "agentLogoUrl": ""
  },
  "clientError": 0,
  "is3pResponse": true,
  "clientOperationList": [
    {
      "operationType": 7,
      "exitIndicatorPayLoad": {
        "status": 1
      }
    }
  ],
  "projectName": "",
  "renderedHtml": ""
}```





Solution 1:[1]

I found a workaround. If you send back a" fulfillmentMessages" response (not the followUpIntent reponse), Google Assistant will continue with the next intent, and keep all contexts and parameters in tact. This is most definitely not ideal but it is a workaround. You can put whatever text you want in there and it continues.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 necrolingus