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

Spotify Playlist timing out #3222

Open
1 task done
itkama opened this issue Nov 24, 2024 · 8 comments
Open
1 task done

Spotify Playlist timing out #3222

itkama opened this issue Nov 24, 2024 · 8 comments

Comments

@itkama
Copy link

itkama commented Nov 24, 2024

What version of Music Assistant has the issue?

2.3.3

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

2024.11.5

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

  • Yes

The problem

I'm playing a 5 hour long spotify playlist (Rock Rotation). After a while (in the logs below after around 1 hour) the music just stops.
I can start another playlist or the same one right away and music is playing again.

How to reproduce

Since the time it takes to time out varies, it's hard to give clear steps on how to reproduce this.

Music Providers

Spotify, I currently don't have other music providers available

Player Providers

Snapcast on a Raspberry Pi with a Hifiberry Hat

Full log output

music-assistant.log
Not sure how many times it is in the logs, but around 16:33:12 was when it stopped playing music.

Additional information

Playback is being instigated via service call from HA that has a playlist URI in it ("spotify://playlist/37i9dQZF1DWZJhOVGWqUKF"). Selecting a playlist manually via the UI usually results in the same problem.

What version of Home Assistant Core are your running

2024.11.3

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)

@itkama itkama added the triage label Nov 24, 2024
@OzGav
Copy link
Contributor

OzGav commented Nov 24, 2024

The issue template says this

Please do NOT use debug logging unless asked to do so.

and you have used verbose which is worse? Having verbose on can cause timing issues.

@itkama
Copy link
Author

itkama commented Nov 25, 2024

Well, I was trying to debug a problem - usually more information is better than less. I can deactivate it and see if it helps.

@relianteng
Copy link

My Spotify playlists also stop after a while; usually less then 30 minutes. This is what I see in the logs before my streams end. Any solutions?

2024-11-27 14:03:48.214 WARNING (MainThread) [music_assistant.webserver] Disconnected: Received non-Text message. 2024-11-27 14:15:52.472 ERROR (MainThread) [ffmpeg.614] Stream error: TimeoutError

@jojo141185
Copy link

I have the same problem and get the exactly the same warning in debug log.
After the Song "Mariah Carey - All I Want for Christmas Is You" the playback stopped although more songs are queued on the player.

2024-11-30 12:03:19.930 DEBUG (MainThread) [snapcast.control.server
] stream MusicAssistant--5001 updated
2024-11-30 12:06:46.770 DEBUG (MainThread) [music_assistant.audio.m
edia_stream] stream finished (with code 0) for spotify--SsGzbM76://
track/2TE4xW3ImvpltVU0cPcKUn - seconds streamed: 220.16
2024-11-30 12:06:48.210 DEBUG (MainThread) [music_assistant.streams
] Finished Streaming queue track: spotify--SsGzbM76://track/2TE4xW3
ImvpltVU0cPcKUn (Shakin' Stevens - Merry Christmas Everyone) on que
ue Wohnzimmer
2024-11-30 12:06:48.210 DEBUG (MainThread) [music_assistant.audio]
Getting streamdetails for spotify://track/0bYg9bo50gSsH3LtXe2SQn
2024-11-30 12:06:48.219 DEBUG (MainThread) [music_assistant.audio]
retrieved streamdetails for spotify://track/0bYg9bo50gSsH3LtXe2SQn
in 8 milliseconds
2024-11-30 12:06:48.219 DEBUG (MainThread) [music_assistant.streams
] Start Streaming queue track: spotify--SsGzbM76://track/0bYg9bo50g
SsH3LtXe2SQn (Mariah Carey - All I Want for Christmas Is You) for q
ueue Wohnzimmer
2024-11-30 12:06:48.219 DEBUG (MainThread) [music_assistant.audio.m
edia_stream] start media stream for: spotify--SsGzbM76://track/0bYg
9bo50gSsH3LtXe2SQn
2024-11-30 12:09:21.766 WARNING (MainThread) [music_assistant.webse
rver] Disconnected: Received non-Text message.
2024-11-30 12:09:21.767 DEBUG (MainThread) [aiohttp.server] Ignored
premature client disconnection.
2024-11-30 12:11:54.089 DEBUG (MainThread) [snapcast.control.server
] stream MusicAssistant--5001 updated
2024-11-30 12:12:03.033 DEBUG (MainThread) [aiohttp.server] Ignored
premature client disconnection 2

@OzGav
Copy link
Contributor

OzGav commented Dec 5, 2024

These seem to be client problems as two of the reporters are using Snapcast and the log indicates a client disconnection. Thoughts @SantiagoSotoC

@OzGav
Copy link
Contributor

OzGav commented Dec 5, 2024

In the meantime reporters using Spotify please add radiobrowser if you don’t have any other music providers and find a radio station you like and start streaming that and see if you have any issues.

@OzGav
Copy link
Contributor

OzGav commented Dec 5, 2024

Might also be related to #3257

@SantiagoSotoC
Copy link
Member

I had not seen that error before.
I'm going to have to find another way to send the audio to the snapserver, ffmpeg is not intended as a player. And it's used that way, plus it doesn't support snapcast's 24 bit format.
Having a client disconnect shouldn't cause a problem. The audio is not sent to each client, but a stream received by the snapserver.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants