0

I've hosted my fulfillment on AWS Lambda and when I test my Google Smart Home project and I try to EXEC a command StackDriver always logs: "Agent responded empty JSON" and Google Assistant says that my device is not available.

But running project locally, using ngrok, all works fine.

This is the command:

[
   {
      "devices":[
         {
            "id":"2272"
         }
      ],
      "execution":[
         {
            "command":"action.devices.commands.OnOff",
            "params":{
               "on":true
            }
         }
      ]
   }
]

And this is my response:

{
    "requestId": "11434449941327491819",
    "payload": {
        "commands": [
            {
                "ids": [
                    "2272"
                ],
                "status": "SUCCESS"
            }
        ]
    }
}

Based on CloudWatch logs, my function takes about 400 ms to answer, that is much less than 5 seconds of supposed timeout. So what I'm doing wrong?

ims
  • 135
  • 3
  • 10
  • Does this only occur for execute, or QUERY and SYNC? Is there something in AWS that causes the response to not be correctly translated to JSON? – Nick Felker Dec 10 '18 at 19:29

1 Answers1

0

Solved, I'm sorry, I was missing return statement before to call my promise chain!

ims
  • 135
  • 3
  • 10