1

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?

kingemerald
  • 156
  • 9

2 Answers2

1

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.
Geoff Armstrong
  • 863
  • 1
  • 8
  • 12
0

Does your skill implement EnpointHealth?

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

Tarlog
  • 10,024
  • 2
  • 43
  • 67
  • I had the exact same problem that this question describes and tried implementing EndpointHeath for my Alexa Smart Home skill, however that didn't help in my case. – Geoff Armstrong Dec 15 '21 at 21:52
  • Make sure that you include EndpointHealth in the discovery AND that you include it in the StateReports when ReportState directives are received. – Tarlog Dec 16 '21 at 01:09
  • Yeah, our Discovery and StateReports include device health (connectivity and radio diagnostics). Right now we're pursuing the possibility that the oauth bearer token isn't being properly/successfully refreshed, since those tokens were set to be valid for 1 hour - which is the same time cadence of the skill breaking. – Geoff Armstrong Dec 16 '21 at 19:48