突然出现间歇性错误 "Failed to parse Dialogflow response into AppResponse : null"
Suddenly getting intermittent error "Failed to parse Dialogflow response into AppResponse : null"
我最近突然开始看到像 "Failed to parse Dialogflow response into AppResponse : null" 这样的错误 Google/Dialogflow 以前工作正常的项目上的操作。
即使是现在,错误似乎也是断断续续的,尽管我的 Firebase 函数(fulfilment webhook)的响应是相同的,但它还是会发生。换句话说,有时我会遇到上述错误,有时它会起作用,但我的 Firebase 函数的响应在这两种情况下都是相同的。
例如,这里有一个响应有时但并非总是会导致我上面提到的错误:
{ "status": 200, "headers": { "content-type":
"application/json;charset=utf-8" }, "body": { "payload": { "google": {
"expectUserResponse": true, "systemIntent": { "intent":
"actions.intent.OPTION", "data": { "@type":
"type.googleapis.com/google.actions.v2.OptionValueSpec", "listSelect":
{ "title": "Please select one option:", "items": [ { "optionInfo": {
"key": "Yes", "synonyms": [ [ "Go", "Lets go", "Let's go", "Get
started", "Yes", "I am ready", "Start the survey", "Start", "1", "One"
] ] }, "description": " Start a new diary entry", "title": "1. Let's
Go" }, { "optionInfo": { "key": "Stop", "synonyms": [ [ "No", "Don't
continue", "No thanks", "Stop", "Stop the survey", "2", "Two" ] ] },
"description": " Don't make a new diary entry", "title": "1. Stop" } ]
} } }, "richResponse": { "items": [ { "simpleResponse": {
"textToSpeech": "Hi. It’s
nice to have you here and we look forward to discussing the food and
drink you give your baby.Let us know each time
you give them something to eat or drink.When you
are ready to start, say Let’s go.", "displayText":
"Hi. \n \nLet us know each time you give them something to eat or
drink. \n \nWhen you are ready to start, select Let’s go." } } ] },
"userStorage":
"{\"data\":{\"userId\":\"bb46f3f9-e522-2da0-7b3c-302a615d28e4\",\"unicomId\":\"danone2\"}}"
} } } }
所以在 Firebase 日志中我可以看到在所有情况下都返回了上述内容,但有时 Google Assistant 会失败,并且 Google 云日志显示 "Failed to parse Dialogflow response into AppResponse : null" 错误,并且其他时候,使用 Firebase 返回的相同 JSON,它可以愉快地工作。
我不知道在哪里可以进一步查看,如果有人有任何指示,我将不胜感激,谢谢!
我遇到了同样的问题。在我的例子中,我的响应 json 中的 systemIntent 为空,它导致了这个错误。它以前工作得很好,但最近它失败了。我希望它能帮助某人。
只是为了解决这个问题 - 结果证明这是我的错,JSON 响应构造错误("synonyms" 包含在重复的 [[ 和 ]] 中)。我相信 Dialogflow 突然将此标记为错误,而以前它更宽容。
无论如何 - 修复 JSON 响应已解决问题。
我最近突然开始看到像 "Failed to parse Dialogflow response into AppResponse : null" 这样的错误 Google/Dialogflow 以前工作正常的项目上的操作。
即使是现在,错误似乎也是断断续续的,尽管我的 Firebase 函数(fulfilment webhook)的响应是相同的,但它还是会发生。换句话说,有时我会遇到上述错误,有时它会起作用,但我的 Firebase 函数的响应在这两种情况下都是相同的。
例如,这里有一个响应有时但并非总是会导致我上面提到的错误:
{ "status": 200, "headers": { "content-type": "application/json;charset=utf-8" }, "body": { "payload": { "google": { "expectUserResponse": true, "systemIntent": { "intent": "actions.intent.OPTION", "data": { "@type": "type.googleapis.com/google.actions.v2.OptionValueSpec", "listSelect": { "title": "Please select one option:", "items": [ { "optionInfo": { "key": "Yes", "synonyms": [ [ "Go", "Lets go", "Let's go", "Get started", "Yes", "I am ready", "Start the survey", "Start", "1", "One" ] ] }, "description": " Start a new diary entry", "title": "1. Let's Go" }, { "optionInfo": { "key": "Stop", "synonyms": [ [ "No", "Don't continue", "No thanks", "Stop", "Stop the survey", "2", "Two" ] ] }, "description": " Don't make a new diary entry", "title": "1. Stop" } ] } } }, "richResponse": { "items": [ { "simpleResponse": { "textToSpeech": "Hi. It’s nice to have you here and we look forward to discussing the food and drink you give your baby.Let us know each time you give them something to eat or drink.When you are ready to start, say Let’s go.", "displayText": "Hi. \n \nLet us know each time you give them something to eat or drink. \n \nWhen you are ready to start, select Let’s go." } } ] }, "userStorage": "{\"data\":{\"userId\":\"bb46f3f9-e522-2da0-7b3c-302a615d28e4\",\"unicomId\":\"danone2\"}}" } } } }
所以在 Firebase 日志中我可以看到在所有情况下都返回了上述内容,但有时 Google Assistant 会失败,并且 Google 云日志显示 "Failed to parse Dialogflow response into AppResponse : null" 错误,并且其他时候,使用 Firebase 返回的相同 JSON,它可以愉快地工作。
我不知道在哪里可以进一步查看,如果有人有任何指示,我将不胜感激,谢谢!
我遇到了同样的问题。在我的例子中,我的响应 json 中的 systemIntent 为空,它导致了这个错误。它以前工作得很好,但最近它失败了。我希望它能帮助某人。
只是为了解决这个问题 - 结果证明这是我的错,JSON 响应构造错误("synonyms" 包含在重复的 [[ 和 ]] 中)。我相信 Dialogflow 突然将此标记为错误,而以前它更宽容。 无论如何 - 修复 JSON 响应已解决问题。