Search code examples
dialogflow-esactions-on-googledialogflow-es-fulfillment

HtmlResponse is not supported on this device


I have developed interactive canvas application and it was working fine with devices having display.

Suddenly when I checked it today it says "Application is not responding, try again later.". When I checked in test simulator and gone through debug I have received following error printed in debug.

"sharedDebugInfoList": [
  {
    "name": "ResponseValidation",
    "debugInfo": "",
    "subDebugEntryList": [
      {
        "name": "MalformedResponse",
        "debugInfo": "expected_inputs[0].input_prompt.rich_initial_prompt.items[1].html_response: HtmlResponse is not supported on this device..",
        "subDebugEntryList": []
      }
    ]
  }
],

It was working and users were using it in their mobile device, but this sudden error made me blind to understand it. I have not made even 1 line of change in my code. I have even checked cloud logs and there is nothing. Here is what I am doing when user enters in my action.

app.intent('welcome', (conv) => {
    console.log('capabilities = ',conv.surface.capabilities)
    if (!conv.surface.capabilities.has('actions.capability.SCREEN_OUTPUT')) {
        conv.close('Sorry, this device does not support Interactive Canvas!');
        return;
    }
    conv.ask(`Welcome! Let's start the game`);
    conv.ask(new HtmlResponse({
       url: '<url of my website having interactive canvas support>',
    }));
});

Here is the action that I am facing error.


Solution

  • The action seems to be working ok for me.

    The most common reason I've seen for it not working is that the category wasn't set to "Games & Fun" (or was cleared for some reason) or the Interactive Canvas checkbox wasn't set.

    To make sure you are still in the "Games & Fun" category, go to the Actions Console, the "Deploy" tab, and the "Directory" information.

    Setting category

    Then, towards the bottom of that same page, make sure you have the Interactive Canvas checkbox set.

    enter image description here