alexa / avs-device-sdk

An SDK for commercial device makers to integrate Alexa directly into connected products.
https://developer.amazon.com/alexa/alexa-voice-service
Apache License 2.0
1.26k stars 604 forks source link

EventProcessed-Directive - TIMEDOUT #1986

Closed apavslx closed 3 years ago

apavslx commented 3 years ago

Briefly summarize your issue:

After initialization of the Alexa AVS SDK i get Errors or a Time-Out when receiving an EventProcessed-Directive. The program is able to start and register Endpoint-Controllers. but after some time in the App some Devices get unresponsive.

What is the expected behavior?

Devices should not get in unresponsive State

What behavior are you observing?

When receiving EventProcessed-Directives, a Timeout occurs on the AVS SDK Client.

Provide the steps to reproduce the issue, if applicable:

Not applicable, because it is a custom Implementation of the AVS SDK.

Tell us about your environment:

What version of the AVS Device SDK are you using?

  <1.25.0>

Tell us what hardware you're using:

Tell us about your OS (Type & version):

Debug_Log_TimedOut.txt

kclchan commented 3 years ago

Hi @apavslx, you mentioned it's a custom implementation of the AVS SDK. I think in your logs, it's missing the log of where the EventProcessed directived is processed:

https://github.com/alexa/avs-device-sdk/blob/master/CapabilityAgents/Alexa/src/AlexaInterfaceCapabilityAgent.cpp#L257

I think you will need to look into why the directive is not being routed to the Alexa CA in your appliaction.

apavslx commented 3 years ago

Thank you for your response. I added this to my logs, but i cant explain myself why the directive is not being routed to the Alexa CA. Is it because of this line?
17: 2021-10-18 11:50:10:392 10 DirectiveProcessor:onHandlingCompeted:messageId=cca46d87-ea74-46f5-a792-98cb093e51c6,directiveBeingPreHandled=(nullptr)

New Logs when EventProcessed Directives are processed. The EventProcessed Timedout Constant is for testing purpose 10seconds.

Debug_Log_Timedout_2.txt

womw commented 3 years ago

From your logs I see that the AlexaInterfaceCapabilityAgent is receiving the event Processed Directive, however when it alerts the Notifier, the DiscoveryEventSender is not receiving the observer call. Can you check to make sure that the DiscoveryEventSender is registered as an observer to AlexaInterfaceCapabilityAgent?

17: 2021-10-18 11:50:10:391 10 AlexaInterfaceCapabilityAgent:executeHandleEventProcessed

https://github.com/alexa/avs-device-sdk/blob/master/CapabilityAgents/Alexa/src/AlexaInterfaceCapabilityAgent.cpp#L270 https://github.com/alexa/avs-device-sdk/blob/master/CapabilitiesDelegate/src/DiscoveryEventSender.cpp#L348

apavslx commented 3 years ago

Thanks. That was the case, the DiscoveryEventSender was not registered right.