Alexa home skill request not reaching lambda function after a while

306 Views Asked by At

We have an Alexa home skill developed and is under testing. For the Home devices control

ENVIRONMENT DETAILS:

Alexa Home skill

Lambda functions for the execution

Account linking has been enabled

Once I enable the skill, the skill is getting enabled successfully. Starting discovery of devices and finding the devices. Post that I was able to control the devices as well

But say after an hour. When I come back to the app or the echo devices. If I start controlling the device. it displays server is unresponsive and says something went wrong. Try disabling and enabling your skill. If I do that it works fine for an hour. Again it goes to unresponsiveness.

Did anyone experienced such behavior?

2

There are 2 best solutions below

3
On

Does your skill implement EnpointHealth?

If not, it may affect the connectivity status in the app.

0
On

I had the exact same symptoms and the root cause was because we weren't properly providing a refresh token, and our access token had a 1 hour TTL.

From the Alexa Account Linking Debugging Tips page:

Problem: Account linking succeeds, but after some time the customer has to link accounts again Solution: This usually indicates that Alexa was unable to use the provided refresh token to grab a new access/refresh token pair.

  1. Ensure that the access token time to live (TTL) is more than 5 minutes.
  2. Ensure that your authorization server can successfully refresh the access/refresh token pair when presented with a refresh token by Alexa.
  3. Ensure that you are not invalidating refresh tokens too early - Alexa may take some time after the access token has expired to refresh the token, and if your authorization server has already invalidated the refresh token, Alexa will not be able to refresh the access/refresh token pair and your customer will have their account linking disabled.