0

I am trying to run BrowseCarousel on a smart display but I am getting the following error

MalformedResponse expected_inputs[0].input_prompt.rich_initial_prompt: 'carousel_browse' is only supported for clients that support a web browser..

My device is a Google Home Hub which supports a web browsers plus the same code works on my phone

conv.ask(fakeColorCarousel());



const fakeColorCarousel = () => {
  const carousel = new BrowseCarousel({
   items: {
     'indigo taco': {
       title: 'Indigo Taco',
       synonyms: ['indigo', 'taco'],
       image: new Image({
         url: 'https://storage.googleapis.com/material-design/publish/material_v_12/assets/0BxFyKV4eeNjDN1JRbF9ZMHZsa1k/style-color-uiapplication-palette1.png',
         alt: 'Indigo Taco Color',
       }),
     },
     'pink unicorn': {
       title: 'Pink Unicorn',
       synonyms: ['pink', 'unicorn'],
       image: new Image({
         url: 'https://storage.googleapis.com/material-design/publish/material_v_12/assets/0BxFyKV4eeNjDbFVfTXpoaEE5Vzg/style-color-uiapplication-palette2.png',
         alt: 'Pink Unicorn Color',
       }),
     },
     'blue grey coffee': {
       title: 'Blue Grey Coffee',
       synonyms: ['blue', 'grey', 'coffee'],
       image: new Image({
         url: 'https://storage.googleapis.com/material-design/publish/material_v_12/assets/0BxFyKV4eeNjDZUdpeURtaTUwLUk/style-color-colorsystem-gray-secondary-161116.png',
         alt: 'Blue Grey Coffee Color',
       }),
     },
 }});
 return carousel;
};
Chris
  • 1,641
  • 1
  • 16
  • 17

1 Answers1

3

Technically a smart display does not support the web browsing capability in Actions on Google. You should check the existence of the a web browser on the device, or require that your action uses a web browser.

const hasWebBrowser = conv.surface.capabilities.has('actions.capability.WEB_BROWSER');

Read more: Surface capabilities guide

Nick Felker
  • 11,536
  • 1
  • 21
  • 35