Skip to content
This repository has been archived by the owner on Jan 16, 2024. It is now read-only.

Play reminder failed when the time is reached #400

Closed
boyce-xx opened this issue Dec 18, 2017 · 12 comments
Closed

Play reminder failed when the time is reached #400

boyce-xx opened this issue Dec 18, 2017 · 12 comments

Comments

@boyce-xx
Copy link

Hi ,
I'm using SDK V1.1.0 to program, for reminder, I get an issue about it cannot be played when the time is reached, Here is a test code how to reproduce the case, I sent a audio (content is "remind me to wash the car after 10 seconds.") to AVS when starting the test.

I got the following error message during the test:

2017-12-18 11:16:30.037 [ 2] 0 MediaPlayer:doStopSuccess:reason=alreadyStopped
2017-12-18 11:16:30.044 [ e] 0 MediaPlayer:handleSetSourceForUrlCalled
2017-12-18 11:16:30.047 [ e] E UrlSource:createFailed:reason=nullPlaylistParser
2017-12-18 11:16:30.049 [ e] E MediaPlayer:handleSetSourceForUrlFailed:reason=sourceIsNullptr
2017-12-18 11:16:30.050 [ f] E MediaPlayer:playFailed:reason=sourceNotSet

please advise.
Thanks.

@kjkh
Copy link

kjkh commented Dec 19, 2017

Hi @boyce-xx,

I attempted to reproduce the issue through voice commands on v1.1.0, but was unable to. The reminder correctly played for me. Can you send the full logs? Also is it possible to update to the newest SDK version, v1.3.0? We have made stability improvements to MediaPlayer which could address your problem.

@boyce-xx
Copy link
Author

boyce-xx commented Dec 19, 2017

Hi @kjkh,
Thanks for your reply.

The full log is here,
The test source code which based on SDK v1.3.0 is here.
My test platform is:

#uname -a
Linux apq8009 3.18.44 #1 SMP PREEMPT Fri Dec 15 20:34:20 CST 2017 armv7l GNU/Linux

Still can't hear reminder playing when the time is reached.

Thanks.

@kjkh
Copy link

kjkh commented Dec 20, 2017

Hi @boyce-xx,

Can you try TZ=UTC ./WisAlertsIntegrationTest when running the integration tests? Our SDK currently requires this for Alerts to correctly render. In your logs, it looks like the Alerts agent isn't attempting to render anything at all. By setting the timezone, I was able to get the Alerts agent to attempt to render the reminder. However, I saw a failure related to MediaPlayer that I am investigating. Out of curiosity, do reminders work when you run your application?

@kjkh
Copy link

kjkh commented Dec 20, 2017

Fixed the MediaPlayer failures by replacing:

m_rendererMediaPlayer = MediaPlayer::create(nullptr);

with

m_rendererMediaPlayer = MediaPlayer::create(std::make_sharedavsCommon::utils::libcurlUtils::HTTPContentFetcherFactory());

Hope this helps.

@boyce-xx
Copy link
Author

Hi @kjkh ,
Thank you.
Followed your suggestions, I can hear the voice now, but it's a default timer sound, not a reminder sound which should be "here is your reminder....", the log below looks like there have some errors when rendering the voice URL. would you please help to analyze it?

My GStreamer version is: libgstreamer-1.0.so.0.1004.0

2017-12-23 07:15:04.174 [ 11] 0 ContextManager:updateStateLocked:action=updatedState,state={"allAlerts":[{"token":"amzn1.as-ct.v1.Domain:Application:NotificationsV4#DNID#70c1f0d9-c333-3d9b-aa48-3c6fe7857a7a","type":"REMINDER","scheduledTime":"2017-12-23T07:15:23+0000"}],"activeAlerts":[]},namespace=Alerts,name=AlertsState
2017-12-23 07:15:04.176 [ 11] 0 EventBuilder:buildJsonEventString:messageId=845757af-d281-46c7-8fe2-30637421b9fe,namespace=Alerts,name=SetAlertSucceeded
AVSConnectionManager::sendMessage {"event":{"header":{"namespace":"Alerts","name":"SetAlertSucceeded","messageId":"845757af-d281-46c7-8fe2-30637421b9fe"},"payload":{"token":"amzn1.as-ct.v1.Domain:Application:NotificationsV4#DNID#70c1f0d9-c333-3d9b-aa48-3c6fe7857a7a"}}}
2017-12-23 07:15:04.273 [ b] 0 HTTP2Transport:processNextOutgoingMessage
2017-12-23 07:15:04.274 [ b] 0 HTTP2StreamPool:getStream:streamId=39,numAcquiredStreams=2
2017-12-23 07:15:04.276 [ b] I HTTP2Transport:insertActiveStream:handle=0xaabfb000
2017-12-23 07:15:04.738 [ b] 0 HTTP2Stream:receivedRequestId:value=x-amzn-requestid: 0e3abdfffe5dc312-00001ce6-00079479-df3501a9821c5cca-4c3d1986-35
2017-12-23 07:15:04.738 [ b] 0 HTTP2Transport:cleanupFinishedStream:streamId=39,result=204
2017-12-23 07:15:04.740 [ b] 0 HTTP2StreamPool:releaseStream:streamId=39,numAcquiredStreams=1
2017-12-23 07:15:04.740 [ b] 0 CurlEasyHandleWrapper:reset:responseCode=HTTP_RESPONSE_SUCCESS_NO_CONTENT
URL https://s3.amazonaws.com/deeappservice.prod.usamazon.reminder.earcons/echo_system_alerts_reminder_start_v01.mp3
2017-12-23 07:15:23.184 [ 2] 0 MediaPlayer:handleSetSourceForUrlCalled
2017-12-23 07:15:23.208 [ 2] 0 MediaPlayer:handleSetSourceCalled
2017-12-23 07:15:23.217 [ 12] I Renderer:executeStart:m_currentSourceId=7
2017-12-23 07:15:23.218 [ 2] 0 MediaPlayer:handlePlayCalled:idPassed=7,currentId=7
2017-12-23 07:15:23.231 [ 2] 0 MediaPlayer:handlePlay:startingState=PLAYING,stateReturn=ASYNC
2017-12-23 07:15:23.305 [ 13] E LibCurlHttpContentFetcher:curlEasyPerformFailed:error=Couldn't connect to server
2017-12-23 07:15:23.313 [ 13] E LibCurlHttpContentFetcher:curlEasyGetInfoFailed:error=No error
2017-12-23 07:15:23.317 [ 13] E LibCurlHttpContentFetcher:getContent:contentType=failedToGetContentType
2017-12-23 07:15:23.315 [ 14] E PlaylistParser:getHTTPContent:reason=badHTTPContentReceived
2017-12-23 07:15:23.324 [ 2] I InProcessAttachmentReader:readFailed:reason=SDS is closed
2017-12-23 07:15:23.326 [ 2] 0 MediaPlayer:callingOnPlaybackError:type=MEDIA_ERROR_INTERNAL_DEVICE_ERROR,error=streamingError,currentId=7
2017-12-23 07:15:23.326 [ 2] E MediaPlayer:saveOffsetBeforeTeardown - gst_element_query_position failed
2017-12-23 07:15:23.327 [ 12] E Alert:onRendererStateChangeFailed:reason=streamingError:Renderer failed to handle a url. Retrying with local background audio sound.
2017-12-23 07:15:23.327 [ 2] E MediaPlayer:handleStopFailed:reason=gstElementGetStateFailure
(Nut2AVS:8215): GStreamer-WARNING **: Element 'source' is not in bin 'playbin0'
2017-12-23 07:15:23.406 [ 2] E MediaPlayer:handleBusMessageError:source=typefind,error=Stream doesn't contain enough data.,debug=/home/peter/workspace/src/db2.1-le/apss/poky/build/tmp-glibc/work/armv7a-vfp-neon-oe-linux-gnueabi/gstreamer1.0/1.10.4-r0/gstreamer-1.10.4/plugins/elements/gsttypefindelement.c(985): gst_type_find_element_chain_do_typefinding (): /GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin0/GstDecodeBin:decodebin0/GstTypeFindElement:typefind:
Can't typefind stream
2017-12-23 07:15:23.408 [ 2] 0 MediaPlayer:handleSetSourceCalled
2017-12-23 07:15:23.416 [ 12] I Renderer:executeStart:m_currentSourceId=8
2017-12-23 07:15:23.418 [ 2] 0 MediaPlayer:handlePlayCalled:idPassed=8,currentId=8
2017-12-23 07:15:23.422 [ 2] 0 MediaPlayer:handlePlay:startingState=PLAYING,stateReturn=ASYNC
2017-12-23 07:15:23.461 [ 2] 0 MediaPlayer:callingOnTags
2017-12-23 07:15:23.461 [ 2] 0 MediaPlayer:callingOnTags
2017-12-23 07:15:23.475 [ 2] 0 MediaPlayer:callingOnPlaybackStarted:currentId=8
2017-12-23 07:15:23.503 [ 11] 0 EventBuilder:buildJsonEventString:messageId=b88cd85a-81c3-47f7-88fa-76154806a461,namespace=Alerts,name=AlertStarted
2017-12-23 07:15:23.505 [ 11] 0 ContextManager:updateStateLocked:action=updatedState,state={"allAlerts":[{"token":"amzn1.as-ct.v1.Domain:Application:NotificationsV4#DNID#70c1f0d9-c333-3d9b-aa48-3c6fe7857a7a","type":"REMINDER","scheduledTime":"2017-12-23T07:15:23+0000"}],"activeAlerts":[{"token":"amzn1.as-ct.v1.Domain:Application:NotificationsV4#DNID#70c1f0d9-c333-3d9b-aa48-3c6fe7857a7a","type":"REMINDER","scheduledTime":"2017-12-23T07:15:23+0000"}]},namespace=Alerts,name=AlertsState
AVSConnectionManager::sendMessage {"event":{"header":{"namespace":"Alerts","name":"AlertStarted","messageId":"b88cd85a-81c3-47f7-88fa-76154806a461"},"payload":{"token":"amzn1.as-ct.v1.Domain:Application:NotificationsV4#DNID#70c1f0d9-c333-3d9b-aa48-3c6fe7857a7a"}}}

@mradulan
Copy link
Contributor

@boyce-xx , we have not been able to reproduce the issue. What platform are you seeing this issue on?

@boyce-xx
Copy link
Author

boyce-xx commented Jan 3, 2018

Hi @mradulan ,
My test platform is:

#uname -a
Linux apq8009 3.18.44 #1 SMP PREEMPT Fri Dec 15 20:34:20 CST 2017 armv7l GNU/Linux

and still can't hear the reminder sound, but can hear the default timer sound, I can see the line from log:

2018-01-03 09:02:05.494 [ 1a] E Alert:onRendererStateChangeFailed:reason=streamingError:Renderer failed to handle a url. Retrying with local background audio sound.

@kclchan
Copy link
Contributor

kclchan commented Jan 4, 2018

Hi @boyce-xx, the logs suggest there's a problem opening the url to play the reminder TTS. Would you be able to enable sensitive logs with the flag -DACSDK_EMIT_SENSITIVE_LOGS=ON and recompile, this way you can see the url that's failing. Maybe you can try to open that url with your browser and see if you can open it.

Also, can you double check if Named Timers and Reminders are enabled?
https://developer.amazon.com/docs/alexa-voice-service/enable-named-timers-and-reminders.html

@boyce-xx
Copy link
Author

boyce-xx commented Jan 6, 2018

Hi @kclchan ,
Thank you for your response.

First:
We have enabled DEBUG9 level in our test APP. so we can see the URL when the reminder is trigger.

Second:
We're failed to download the reminder URL in China, below are the failed URL link:
prompt & reminder_content
copy the address to browser, we can't download it in China, but we send those links to our colleague who is in U.S.A, he can download and hear it. so maybe it's a network issue.

Third:
I have enabled the "Named Timers and Reminders" item in my product settings page.

But I have got some other questions about this:
(1) When the reminder is triggered, it will repeat three times for "here is your reminder...." sentence. it just only repeat two times on Echo or Echo dot. is it a normal behavior for SDK V1.3.0?
(2) when the reminder is finished after three times, when I say "alexa, what time is it", the reminder will be ring again and still will repeat three times.

Thanks.

@boyce-xx
Copy link
Author

boyce-xx commented Jan 8, 2018

Hi @kclchan ,
For my question below:

(2) when the reminder is finished after three times, when I say "alexa, what time is it", the reminder will be ring again and still will repeat three times.

I did a integration test app based on SDK version 1.3.0, you can duplicate the issue, here is the source code.
The procedure as this:
1> Send the audio file "remind me to shopping after ten seconds" to AVS.
2> Sleep 50 seconds to ensure reminder finish when reminder is ringing.
3> Send another audio file "Tell me a joke" to AVS.
4> Then you will hear the reminder again. but it should not be ring now.

please have a try, thanks.

@BennyAvramson
Copy link
Contributor

BennyAvramson commented Jan 9, 2018

Hi @boyce-xx, We're able to reproduce the issue and will investigate it internally on the team.

@kclchan
Copy link
Contributor

kclchan commented Jan 13, 2018

Hi @boyce-xx, this issue is fixed in v1.4.0. Thanks for bringing this to our attention.

@kclchan kclchan closed this as completed Jan 13, 2018
sanjayrd added a commit that referenced this issue Mar 9, 2018
Changes in this update:

**Enhancements**
* `rapidJson` is now included with "make install".
* Updated the `TemplateRuntimeObserverInterface` to support clearing of `displayCards`.
* Added Windows SDK support, along with an installation script (MinGW-w64).
* Updated `ContextManager` to ignore context reported by a state provider.
* The `SharedDataStream` object is now associated by playlist, rather than by URL.
* Added the `RegistrationManager` component. Now, when a user logs out all persistent user-specific data is cleared from the SDK. The log out functionality can be exercised in the sample app with the new command: `k`.

**Bug Fixes**
* [Issue 400](#400) Fixed a bug where the alert reminder did not iterate as intended after loss of network connection.
* [Issue 477](#477) Fixed a bug in which Alexa's weather response was being truncated.
* Fixed an issue in which there were reports of instability related to the Sensory engine. To correct this, the `portAudio` [`suggestedLatency`](https://github.com/alexa/avs-device-sdk/blob/master/Integration/AlexaClientSDKConfig.json#L62) value can now be configured.

**Known Issues**
* The `ACL` may encounter issues if audio attachments are received but not consumed.
* `SpeechSynthesizerState` currently uses `GAINING_FOCUS` and `LOSING_FOCUS` as a workaround for handling intermediate state. These states may be removed in a future release.
* Music playback doesn't immediately stop when a user barges-in on iHeartRadio.
* The Windows sample app sometimes hangs on exit.
* GDP receives a `SIGPIPE` when troubleshooting the Windows sample app.
padillag pushed a commit to padillag/avs-device-sdk-intel-speech-enabling-kit that referenced this issue May 11, 2018
Changes in this update:

**Enhancements**
* `rapidJson` is now included with "make install".
* Updated the `TemplateRuntimeObserverInterface` to support clearing of `displayCards`.
* Added Windows SDK support, along with an installation script (MinGW-w64).
* Updated `ContextManager` to ignore context reported by a state provider.
* The `SharedDataStream` object is now associated by playlist, rather than by URL.
* Added the `RegistrationManager` component. Now, when a user logs out all persistent user-specific data is cleared from the SDK. The log out functionality can be exercised in the sample app with the new command: `k`.

**Bug Fixes**
* [Issue 400](alexa/avs-device-sdk#400) Fixed a bug where the alert reminder did not iterate as intended after loss of network connection.
* [Issue 477](alexa/avs-device-sdk#477) Fixed a bug in which Alexa's weather response was being truncated.
* Fixed an issue in which there were reports of instability related to the Sensory engine. To correct this, the `portAudio` [`suggestedLatency`](https://github.com/alexa/avs-device-sdk/blob/master/Integration/AlexaClientSDKConfig.json#L62) value can now be configured.

**Known Issues**
* The `ACL` may encounter issues if audio attachments are received but not consumed.
* `SpeechSynthesizerState` currently uses `GAINING_FOCUS` and `LOSING_FOCUS` as a workaround for handling intermediate state. These states may be removed in a future release.
* Music playback doesn't immediately stop when a user barges-in on iHeartRadio.
* The Windows sample app sometimes hangs on exit.
* GDP receives a `SIGPIPE` when troubleshooting the Windows sample app.
padillag pushed a commit to padillag/avs-device-sdk-intel-speech-enabling-kit that referenced this issue May 11, 2018
Changes in this update:

**Enhancements**
* `rapidJson` is now included with "make install".
* Updated the `TemplateRuntimeObserverInterface` to support clearing of `displayCards`.
* Added Windows SDK support, along with an installation script (MinGW-w64).
* Updated `ContextManager` to ignore context reported by a state provider.
* The `SharedDataStream` object is now associated by playlist, rather than by URL.
* Added the `RegistrationManager` component. Now, when a user logs out all persistent user-specific data is cleared from the SDK. The log out functionality can be exercised in the sample app with the new command: `k`.

**Bug Fixes**
* [Issue 400](alexa/avs-device-sdk#400) Fixed a bug where the alert reminder did not iterate as intended after loss of network connection.
* [Issue 477](alexa/avs-device-sdk#477) Fixed a bug in which Alexa's weather response was being truncated.
* Fixed an issue in which there were reports of instability related to the Sensory engine. To correct this, the `portAudio` [`suggestedLatency`](https://github.com/alexa/avs-device-sdk/blob/master/Integration/AlexaClientSDKConfig.json#L62) value can now be configured.

**Known Issues**
* The `ACL` may encounter issues if audio attachments are received but not consumed.
* `SpeechSynthesizerState` currently uses `GAINING_FOCUS` and `LOSING_FOCUS` as a workaround for handling intermediate state. These states may be removed in a future release.
* Music playback doesn't immediately stop when a user barges-in on iHeartRadio.
* The Windows sample app sometimes hangs on exit.
* GDP receives a `SIGPIPE` when troubleshooting the Windows sample app.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants