alexa / alexa-skills-kit-sdk-for-nodejs

The Alexa Skills Kit SDK for Node.js helps you get a skill up and running quickly, letting you focus on skill logic instead of boilerplate code.
Apache License 2.0
3.12k stars 736 forks source link

Audio player on Echo devices interrupts playing an audio: possiblly a memory leak. #682

Closed voiceactivity closed 3 years ago

voiceactivity commented 3 years ago

I'm submitting a bug


[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[x ] Other... Please describe: Sorry, the issue should have been raised with the Amazon Service team but it looks 
like there is no easy way to do that.

Expected Behavior

The Audio Player installed on Echo devices plays audio without interruption.

Current Behavior

Echo devices suddenly interrupt playing audio.

You have to unplug Echo from the power and then plug it in back. It seems that it fixes the issue and the audio could be played again. After a few days the problem resurfaces again.

The current behavior emerged ~12 months ago. All services affected: Amazon Music, Apple Music, Spotify,... and all Alexa skills that use the Audio Player. It observed by many people (few posts on Reddit almost every single day) with different kinds of Echo devices. Looks like the most affected devices are Echo Dots 2nd gen.

One of my skill that use Audio Player affected as well. This is the only log I have for that kind of behavior: { "type": "AudioPlayer.PlaybackFailed", "requestId": "amzn1.echo-api.request.5d0d7e4c-56c2-42bc-a581-b0211122a71a", "timestamp": "2021-02-19T20:50:09Z", "locale": "en-US", "currentPlaybackState": { "offsetInMilliseconds": 5664992, "token": "0", "playerActivity": "PLAYING" }, "error": { "message": "Device playback error", "type": "MEDIA_ERROR_UNKNOWN" }, "token": "0" }

The error description "MEDIA_ERROR_UNKNOWN" is pretty vague: https://developer.android.com/reference/android/media/MediaPlayer#MEDIA_ERROR_UNKNOWN

Possible Solution

Difficult to say. It could be that one of the Alexa services is hitting hard a device RAM. It could be a software update with a library having a memory leak. It could be a bug introduced in the Echo Audio Player

Steps to Reproduce (for bugs)

Your Echo should be running a few days without reboot. Play any of available music streaming services. Try to do it during a few days.

Context

Your Environment

All Echo devices.

Node.js and NPM Info

NA

ShenChen93 commented 3 years ago

Hi @voiceactivity,

As you mentioned, it should not be an issue logged at SDK side. Could you please log this issue at the alxea forum ? I could help reach out to service team with the forum link, and it would be easier for you to directly communicate with service team members.

Thanks, Shen

voiceactivity commented 3 years ago

Sure. Sorry for that. I'm going to close that one out. The reference: https://forums.developer.amazon.com/questions/203641/audio-player-error.html?childToView=237210#answer-237210

voiceactivity commented 3 years ago

Will be raised with the Alexa service team