简体   繁体   中英

Test Google Assistant is not connecting with my Dialogflow Webhook fulfillment

I have been building a simple chatbot in Dialogflow, and the las week I decided to test the chatbot in Google Assistant. I already tested the chatbot in Dialogflow and it connect with the web hook fulfillment and it works ok. But when I test it in google assistant, I'm getting and error from response.

Google Assistant Response

Actually I'm testing the webhook fulfillment using ngrok and I put the temp url in the webhook. When I test it with the Dialogflow demo, I get the log when the Api is called. But when I did it with Google Assistant, I don't get logs. it is like if the api never was called.

I don't know if I did something bad or I didn't configure something in google assistant or Dialogflow.

I'm working with nodejs using the library dialogflow-fulfillment and actions-on-google to get the post from Dialogflow and give the answer to Dialogflow and Google assistant.

Response Google Assistant

{
  "responseMetadata": {
    "status": {
      "code": 10,
      "message": "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: 905b630b-ec2d-4b34-b2b1-5c4012eaa2c1 and intentId: 1e2e382e-2208-4857-8a0e-7311a141d13c. WebhookStatus: code: 5\nmessage: \"Webhook call failed. Error: NOT_FOUND, State: URL_ERROR, Reason: ERROR_NOT_FOUND, HTTP status code: 404.\"\n."
    }
  }
}

Debug Google Assistant

{
  "response": "Sorry, Shell Virtual Agent isn't responding right now. Please try again soon.",
  "expectUserResponse": false,
  "conversationToken": "EosDS2o5ck...",
  "audioResponse": "//NExAAPeD...",
  "ssmlMarkList": [],
  "debugInfo": {
    "assistantToAgentDebug": {
      "curlCommand": "curl -v 'https://api.api.ai/api/integrations/google?token=b8699f38e6954887882558306b2ef106&versionId=3' -H 'Content-Type: application/json;charset=UTF-8' -H 'Google-Actions-API-Version: 2' -H 'Authorization: 'sadsd'  -A Google-ActionsOnGoogle/1.0 -X POST -d '{\"user\":{\"locale\":\"en-US\",\"userVerificationStatus\":\"GUEST\"},\"conversation\":{\"conversationId\":\"ABwppHG-ocBDbzP3aYSkXq90WPBMb19DcQQOfKRHKsLDv4cyow4hMjLTtM26t-5gk4VICfQfef1NmOSAJqalt9dvGRzhQ7amEA\",\"type\":\"ACTIVE\",\"conversationToken\":\"[\\\"authentication-flow\\\",\\\"authentication-s3-email\\\",\\\"authentication-vars\\\",\\\"bill-my-value-high\\\"]\"},\"inputs\":[{\"intent\":\"actions.intent.TEXT\",\"rawInputs\":[{\"inputType\":\"VOICE\",\"query\":\"ed@jones.com\"}],\"arguments\":[{\"name\":\"text\",\"rawText\":\"ed@jones.com\",\"textValue\":\"ed@jones.com\"}]}],\"surface\":{\"capabilities\":[{\"name\":\"actions.capability.MEDIA_RESPONSE_AUDIO\"},{\"name\":\"actions.capability.ACCOUNT_LINKING\"},{\"name\":\"actions.capability.SCREEN_OUTPUT\"},{\"name\":\"actions.capability.AUDIO_OUTPUT\"}]},\"availableSurfaces\":[{\"capabilities\":[{\"name\":\"actions.capability.AUDIO_OUTPUT\"},{\"name\":\"actions.capability.SCREEN_OUTPUT\"},{\"name\":\"actions.capability.WEB_BROWSER\"}]}],\"requestType\":\"SIMULATOR\"}'",
      "assistantToAgentJson": "{\"user\":{\"locale\":\"en-US\",\"userVerificationStatus\":\"GUEST\"},\"conversation\":{\"conversationId\":\"ABwppHG-ocBDbzP3aYSkXq90WPBMb19DcQQOfKRHKsLDv4cyow4hMjLTtM26t-5gk4VICfQfef1NmOSAJqalt9dvGRzhQ7amEA\",\"type\":\"ACTIVE\",\"conversationToken\":\"[\\\"authentication-flow\\\",\\\"authentication-s3-email\\\",\\\"authentication-vars\\\",\\\"bill-my-value-high\\\"]\"},\"inputs\":[{\"intent\":\"actions.intent.TEXT\",\"rawInputs\":[{\"inputType\":\"VOICE\",\"query\":\"ed@jones.com\"}],\"arguments\":[{\"name\":\"text\",\"rawText\":\"ed@jones.com\",\"textValue\":\"ed@jones.com\"}]}],\"surface\":{\"capabilities\":[{\"name\":\"actions.capability.MEDIA_RESPONSE_AUDIO\"},{\"name\":\"actions.capability.ACCOUNT_LINKING\"},{\"name\":\"actions.capability.SCREEN_OUTPUT\"},{\"name\":\"actions.capability.AUDIO_OUTPUT\"}]},\"availableSurfaces\":[{\"capabilities\":[{\"name\":\"actions.capability.AUDIO_OUTPUT\"},{\"name\":\"actions.capability.SCREEN_OUTPUT\"},{\"name\":\"actions.capability.WEB_BROWSER\"}]}],\"requestType\":\"SIMULATOR\"}",
      "delegatedRequest": {
        "delegatedRequest": ""
      }
    },
    "agentToAssistantDebug": {
      "agentToAssistantJson": "{\n  \"responseMetadata\": {\n    \"status\": {\n      \"code\": 10,\n      \"message\": \"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: 905b630b-ec2d-4b34-b2b1-5c4012eaa2c1 and intentId: 1e2e382e-2208-4857-8a0e-7311a141d13c. WebhookStatus: code: 5\\nmessage: \\\"Webhook call failed. Error: NOT_FOUND, State: URL_ERROR, Reason: ERROR_NOT_FOUND, HTTP status code: 404.\\\"\\n.\"\n    }\n  }\n}",
      "delegatedResponse": {
        "delegatedResponse": ""
      }
    },
    "sharedDebugInfoList": [
      {
        "name": "ResponseValidation",
        "debugInfo": "",
        "subDebugEntryList": [
          {
            "name": "MalformedResponse",
            "debugInfo": "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: 905b630b-ec2d-4b34-b2b1-5c4012eaa2c1 and intentId: 1e2e382e-2208-4857-8a0e-7311a141d13c. WebhookStatus: code: 5\nmessage: \"Webhook call failed. Error: NOT_FOUND, State: URL_ERROR, Reason: ERROR_NOT_FOUND, HTTP status code: 404.\"\n..",
            "subDebugEntryList": []
          }
        ]
      }
    ],
    "conversationBuilderExecutionEventsList": []
  },
  "conversationBuilderDebugInfo": {
    "eventList": []
  },
  "visualResponse": {
    "visualElementsList": [
      {
        "displayText": {
          "content": "Sorry, Shell Virtual Agent isn't responding right now. Please try again soon."
        }
      }
    ],
    "suggestionsList": [],
    "agentLogoUrl": ""
  },
  "clientError": 0,
  "is3pResponse": true,
  "clientOperationList": [
    {
      "operationType": 7,
      "exitIndicatorPayLoad": {
        "status": 1
      }
    }
  ],
  "projectName": "",
  "renderedHtml": "",
  "previewStartTimeMicros": "1649805199475166",
  "isEmptyResponse": false,
  "agentName": "Shell Virtual Agent",
  "servingModelOutdated": false
}

GCP Logging

{
  "textPayload": "MalformedResponse: 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: 905b630b-ec2d-4b34-b2b1-5c4012eaa2c1 and intentId: 1e2e382e-2208-4857-8a0e-7311a141d13c. WebhookStatus: code: 5\nmessage: \"Webhook call failed. Error: NOT_FOUND, State: URL_ERROR, Reason: ERROR_NOT_FOUND, HTTP status code: 404.\"\n.",
  "insertId": "8lq5l0fp25rsx",
  "resource": {
    "type": "assistant_action",
    "labels": {
      "version_id": "",
      "project_id": "shell-energy-ccai-poc-dev",
      "action_id": "actions.intent.TEXT"
    }
  },
  "timestamp": "2022-04-18T17:08:02.112767941Z",
  "severity": "ERROR",
  "labels": {
    "source": "JSON_RESPONSE_VALIDATION",
    "channel": "preview",
    "querystream": "GOOGLE_USER"
  },
  "logName": "projects/shell-energy-ccai-poc-dev/logs/actions.googleapis.com%2Factions",
  "trace": "projects/702646568948/traces/ABwppHG-ocBDbzP3aYSkXq90WPBMb19DcQQOfKRHKsLDv4cyow4hMjLTtM26t-5gk4VICfQfef1NmOSAJqalt9dvGRzhQ7amEA",
  "receiveTimestamp": "2022-04-18T17:08:02.122590076Z"
}

You will have to migrate your project to the google action console. You will find the migration option under the integrations section of dialogflow console. 点击集成链接

在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM