Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pausing causes song to restart from beginning #3274

Open
1 task done
ToastySefac opened this issue Dec 7, 2024 · 9 comments
Open
1 task done

Pausing causes song to restart from beginning #3274

ToastySefac opened this issue Dec 7, 2024 · 9 comments
Labels
bug Something isn't working Sonos

Comments

@ToastySefac
Copy link

What version of Music Assistant has the issue?

2.4.0b7

What version of the Home Assistant Integration have you got installed?

2024.12.1

Have you tried everything in the Troubleshooting FAQ and reviewed the Open and Closed Issues and Discussions to resolve this yourself?

  • Yes

The problem

My issue is when I pause a song, then resume the song, it will play for a while and then restart the song from the start. The play bar still thinks it's playing as normal, so it loses track of where it's up to.

How to reproduce

Play any song on my Sonos speakers.
Press pause.
Wait several seconds.
Press play.
Wait several seconds.
The song restarts.

Music Providers

File System (local disk)
YouTube Music

Player Providers

Sonos

Full log output

info.log
The debug log shows this when I pause the song:
[36m2024-12-07 14:56:20.566 DEBUG (MainThread) [music_assistant.audio.media_stream] stream aborted (with code 255) for filesystem_local--bTeEoNEa://track/Area 7/Bitter & Twisted/Bitter Words.mp3 - seconds streamed: 2.0

Additional information

I am using Music Assistant as an addon to HAOS on a Intel NUC. I only have Sonos speakers (several 1's and a 3), so I have no other players to try. The players are not grouped. One Sonos is hardwired, the rest are wireless.

I have removed everything todo with Music Assistant and reinstalled. Issue occurs on both stable and beta servers.

Playing the files through HA via the original HA Sonos entities works fine. Playing it through HA via the MA Sonos entities has the restart issue.

I originally noticed this on YouTube Music, but have ruled that out by replicating the issue with an album that is directly uploaded into HA's /config/media/music folder and using the "File System (local disk)" music provider.

Players work fine in all other respects, except when I hit pause at any stage during a song.

What version of Home Assistant Core are your running

2024.12.1

What type of installation are you running?

Home Assistant OS

On what type of hardware are you running?

Generic x86-64 (e.g. Intel NUC)

@OzGav OzGav added bug Something isn't working Sonos and removed triage labels Dec 8, 2024
@OzGav
Copy link
Contributor

OzGav commented Dec 8, 2024

Nice report, thanks. This will be looked at in due course.

@OzGav
Copy link
Contributor

OzGav commented Dec 9, 2024

I cannot replicate this with a Sonos Provider player but I can with a Sonos S1 Provider player. Please confirm which player provider you are using.

@ToastySefac
Copy link
Author

Appreciate you investigating the issue.

Currently I am using the "SONOS" player, not "SONOS S1". However, I've tried both and they have the same issue for me.
All my devices are supported by the latest Sonos app, so I assume SONOS is the correct player to use.

I have a few older devices, but the one I've been doing the testing on is one of the newer One SL speakers.
Play:1 x3
Play:3 x1
One SL x2

I've also removed the SONOS integration and reinstalled MA after that, in case there was some conflict or older setting from the SONOS integration.

@sradagan
Copy link

Running into a very similar issue with my Google speakers (Hub Max and Nest Audio). Does not need a pause to trigger. Just every couple of tracks in my Plex playlist, it will randomly restart the track. According the progress bar, all is playing and progressing fine, even though the audio has restarted.

(Running HAOS, Core 2024.12.3, MA 2.3.3)

@ToastySefac
Copy link
Author

I've installed MA on a fresh HA install (separate pc) and I'm not encountering the issue at all on that installation, with the same speakers.

Any tips for completely removing MA, and any remaining files in the backend to do a clean install?
I've tried removing the addon and using the "Also permanently delete this addon's data", but after reinstalling MA the issue persists.

@OzGav
Copy link
Contributor

OzGav commented Dec 15, 2024

MA runs in its own container. When you remove the add on that container and all info within it is destroyed.

@ToastySefac
Copy link
Author

Thanks for clarifying.

@nicdjb
Copy link

nicdjb commented Dec 16, 2024

Running into a very similar issue with my Google speakers (Hub Max and Nest Audio). Does not need a pause to trigger. Just every couple of tracks in my Plex playlist, it will randomly restart the track. According the progress bar, all is playing and progressing fine, even though the audio has restarted.

(Running HAOS, Core 2024.12.3, MA 2.3.3)

Just FYI, I have this ‘track restarting’ issue as well when streaming to a Sonos One speaker. I haven’t set aside any time to troubleshoot yet, that sounds like a fun xmas project :-)

If it continues I’ll likely open a new ticket if not related to OP’s issue.

@Darksecond
Copy link

I'm running into the same issue with airplay; the source doesn't seem to matter (tried local, apple music and subsonic). Seems to behave the same on just one homepod (mini) vs a group.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Sonos
Projects
Status: NEXT
Development

No branches or pull requests

5 participants