Google App not responding, logs show correct response?

google-assistant

#1

My test app is not responding in the Actions simulator or the Google Home Hub. When invoke the action, I get an error message saying ‘My test app isn’t responding at the moment. Try again soon.’

I’ve checked the logs and it seems as though the response I’ve built (shows a basic card with button to watch video) doesn’t work. I’ve used this.$googleAction.hasScreenInterface() to check for screen.

Logs (edited for sensitive data):

{
    "fulfillmentText": "Tap the button below to watch a video on how to xxxxxxxxx",
    "outputContexts": [
        {
            "name": "xxxxxxxxxxx/contexts/actions_capability_screen_output",
            "parameters": {
                "flooringType": "",
                "stainType": "xxx",
                "stainType.original": "xxxxxxxxx",
                "productType.original": "",
                "productType": "",
                "flooringType.original": ""
            }
        },
        {
            "name": "xxxxxxxxxx/contexts/actions_capability_audio_output",
            "parameters": {
                "flooringType": "",
                "stainType": "xxxxxxxx",
                "stainType.original": "xxxxxxxx",
                "productType.original": "",
                "productType": "",
                "flooringType.original": ""
            }
        },
        {
            "name": "xxxxxxxxxx/contexts/actions_capability_account_linking",
            "parameters": {
                "flooringType": "",
                "stainType": "xxxxxxxx",
                "stainType.original": "xxxxxxxx",
                "productType.original": "",
                "productType": "",
                "flooringType.original": ""
            }
        },
        {
            "name": "xxxxxxxxxx/contexts/google_assistant_input_type_voice",
            "parameters": {
                "flooringType": "",
                "stainType": "xxxxxxxx",
                "stainType.original": "xxxxxxxx",
                "productType.original": "",
                "productType": "",
                "flooringType.original": ""
            }
        },
        {
            "name": "xxxxxxxxxx/contexts/actions_capability_media_response_audio",
            "parameters": {
                "flooringType": "",
                "stainType": "xxxxxxxx",
                "stainType.original": "xxxxxxxx",
                "productType.original": "",
                "productType": "",
                "flooringType.original": ""
            }
        }
    ],
    "payload": {
        "google": {
            "expectUserResponse": false,
            "richResponse": {
                "items": [
                    {
                        "simpleResponse": {
                            "ssml": "<speak>Tap the button below to watch a video on xxxxxxxxxxxxxx</speak>"
                        }
                    },
                    {
                        "basicCard": {
                            "title": "xxxxxxxxxxxxx",
                            "subtitle": "xxxxxxxxxxxxxxxxx",
                            "formattedText": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
                            "image": "xxxxxxxxxxxxxxxx",
                            "buttons": [
                                {
                                    "title": "WATCH VIDEO",
                                    "openUrlAction": {
                                        "url": "xxxxxxxxxxxxxxxxxxxxxxx"
                                    }
                                }
                            ]
                        }
                    }
                ]
            },
            "userStorage": "{\"userId\":\"15553249719291505892940\"}"
        }
    }
}

There’s no error message in the logs. Any ideas? Maybe this is Dialog flow, it seems a bit buggy anyway, maybe I’m wrong?

Many thanks,
Simon


#2

Hey!
Can you post your code snippet? The basicCard.image property looks wrong to me.

This example worked for me:

const basicCard = new BasicCard()
            .setTitle('Title')
            .setImage({
                url: 'http://via.placeholder.com/450x350?text=Basic+Card',
                accessibilityText: 'accessibilityText'})
            .setFormattedText('Formatted Text')
            .addButton('test', 'https://www.any.url');

        this.$googleAction.showBasicCard(basicCard);
        this.$googleAction.showSuggestionChips(['List', 'Carousel', 'Basic card', 'Table']);

        this.ask('Response with basic card', '?');

Result:

...
 "richResponse": {
                                "items": [
    {
        "simpleResponse": {
            "ssml": "<speak>Response with basic card</speak>"
        }
    },
    {
        "basicCard": {
            "title": "Title",
            "image": {
                "url": "http://via.placeholder.com/450x350?text=Basic+Card",
                "accessibilityText": "accessibilityText"
            },
            "formattedText": "Formatted Text",
            "buttons": [
                {
                    "title": "test",
                    "openUrlAction": {
                        "url": "https://www.any.url"
                    }
                }
            ]
        }
    }
],
    "suggestions": [
    {
        "title": "List"
    },
    {
...

#3

Hi @AlexSwe,

This is the code snippet:

if (this.$googleAction.hasScreenInterface()) {
            let videoTitle = "Example Title";
            const videoSubtitle = "Example Subtitle";

            let basicCard = new BasicCard()
                .setTitle(videoTitle)
                .setSubtitle(videoSubtitle)
                .setFormattedText(productDescription)
                .setImage(productImageUrl, productType, "522", "522")
                .addButton("WATCH VIDEO", videoSourceUrl);

            this.$googleAction.showBasicCard(basicCard);

Some of the arguments are just variables from an earlier section of the code.

I’ll try out your example, and let you know what happens.