question

Paul A. Whitelock avatar image
Paul A. Whitelock asked

EXCEEDED_MAX_REPROMPTS

Quite often I will get an EXCEEDED_MAX_REPROMPTS in response to a valid query. When this happens the light ring on the Echo spins for a while and then Echo closes the session. I'm assuming that something went wrong on the Amazon side because other times this problem does not occur for the same exact query. The problem is that my application has no way or knowing what went wrong and no way to recover. In fact, when this happens Echo will finally say "the application took too long to respond" when in actuality Echo has not given the application anything to respond to or even a chance to respond (because the session is immediately closed). Obviously this would be very confusing for a user. My question is, what's going on here? Is there anything that the app can do to prevent immediate session terminations like this? If Echo would return a response that tells the app that something went wrong when processing the request on the Amazon side then the app could at least attempt to recover and ask the user to repeat the last command.
alexa skills kitsubmission testing certification
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

memo@amazon avatar image
memo@amazon answered
Hey Paul, The EXCEEDED_MAX_REPROMPTS reason indicates that the user either did not respond or responded with an utterance that did not match any of your app’s intents. To see what Alexa thought you said for a particular query you can look at your device history in your Echo companion application. You can find your history under Settings->History. This may help you discover why two seemingly identical queries yield different results. There is an optional response parameter that allows your app to re-prompt the user when their first attempt does not produce a valid intent. You can find more information about re-prompting here: https://developer.amazon.com/public/solutions/devices/echo/alexa-app-kit/do...
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Paul A. Whitelock avatar image
Paul A. Whitelock answered
What is happening is the following: 1) During a session instead of replying or asking something the user does not say anything 2) After a delay, the Echo responds with "The requested application took too long to respond" The problem is that there was no request made and Echo responds as if a request was made and the application did not respond to the request. In the Echo history it shows that the Echo interpreted the silence as "Unknown". I played back the captured audio and it sounds like white noise. What I think might be happening is that when the session is active and the user does not say anything the Echo hardware boosts the audio input gain in case the user has moved some distance away from the Echo. It might be that the server is attempting to interpret this noise (or amplified silence) as a user response which it cannot understand. Does the software on the Amazon side run the audio through a noise filtering algorithm? If all that is there is noise (or silence) then it seems more logical for the session to close without saying "The requested application took too long to respond" (unless there is re-prompt text). I did try specifying re-prompt text, but it did not seem to work.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Paul A. Whitelock avatar image
Paul A. Whitelock answered
I found an error in my data structure for the re-prompt text, but the problem with "The requested application took too long to respond" still occurs. The only difference is that Echo speaks the re-prompt text, waits, and then says "The requested application took too long to respond". So, there appears to be no way to get around the problem. By the way, I've been testing on two different Echo devices so it doesn't seem like the device hardware is part of the problem.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Paul A. Whitelock avatar image
Paul A. Whitelock answered
One more odd thing -- if I close the session (as opposed to Amazon closing the session) I get a reason of "USER_INITIATED" (which is correct and expected); however, after a pause the Echo says "The requested application took too long to respond". This is AFTER the session has been closed. Something is not right somewhere ....
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Ross@Amazon avatar image
Ross@Amazon answered
When the user fails to respond to a question and the max number of re-prompts have occurred, the Alexa Cloud Service makes a call to the service to notify that the session ended. Since the Echo responds "The requested application took too long to respond," this indicates that the SessionEndedRequest made to your service resulted in a socket timeout exception, meaning that the service failed to respond back to the Alexa Cloud Service.
4 comments
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

If you have a custom HTTPS service I found that you need to return an empty JSON response (i.e. "{}") to a SessionEndedRequest for Alexa to be happy even though the documentation says you cannot return a response.

3 Likes 3 ·

@GadgetChannelThx, thats it !!

0 Likes 0 ·

I am having the same problem as Paul. What do you mean by "SessionEndedRequest made to your service resulted in a socket timeout exception, meaning that the service failed to respond back" ? From Alexa docs, it says that "Your service cannot send back a response to a SessionEndedRequest".

And my server receives the SessionEndedRequest because I can see it on the logs.

0 Likes 0 ·

I have the same problem. The user is just not answering. I just can not get rid of Alexa saying that there is a problem "with communicating with the skill" (in german). Still, I see other skills seem to know how to handle that. ?! Is there any undocumented secret formula in the json response?

0 Likes 0 ·