music-assistant / hass-music-assistant

Turn your Home Assistant instance into a jukebox, hassle free streaming of your favorite media to Home Assistant media players.
Apache License 2.0
1.31k stars 48 forks source link

Snapcast: Music Assistant thought it was playing but no sound #2905

Open JeffersonBledsoe opened 6 days ago

JeffersonBledsoe commented 6 days ago

What version of Music Assistant has the issue?

2.3.0b20

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

2024.8.1

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

The problem

After pressing play from the albums view, Music Assistant thought it was playing, but no sound was coming out the speakers. Going into the album and pressing play on the first track seemed to reset the stream status and it is working again now, just wanted to report the issue incase there is something you can glean from it.

How to reproduce

Only has occurred once so far.

  1. Selected the player provided by the Snapcast provider
  2. Go to "Albums" view
  3. Press play directly from

Music Providers

Local

Player Providers

Snapcast

Full log output

music-assistant.log

Additional information

Notable exception from the attached log:

2024-09-12 12:25:45.948 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 362, in data_received
    messages, upgraded, tail = self._request_parser.feed_data(data)
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "aiohttp/_http_parser.pyx", line 563, in aiohttp._http_parser.HttpParser.feed_data
aiohttp.http_exceptions.BadStatusLine: 400, message:
  Invalid method encountered:

    b'\x16\x03\x01\x07\x1c\x01'
      ^
2024-09-12 12:25:45.960 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 362, in data_received
    messages, upgraded, tail = self._request_parser.feed_data(data)
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "aiohttp/_http_parser.pyx", line 563, in aiohttp._http_parser.HttpParser.feed_data
aiohttp.http_exceptions.BadStatusLine: 400, message:
  Invalid method encountered:

    b'\x16\x03\x01\x06\xfc\x01'
      ^
2024-09-12 12:26:17.938 INFO (MainThread) [music_assistant.streams] Start Queue Flow stream for Queue Minas-Morgul.local - crossfade: False
2024-09-12 12:26:18.357 INFO (MainThread) [snapcast.control.server] stream MusicAssistant--5135 not found, synchronize
2024-09-12 12:26:34.598 INFO (MainThread) [music_assistant.streams] Start Queue Flow stream for Queue Minas-Morgul - crossfade: False
2024-09-12 12:26:34.967 INFO (MainThread) [snapcast.control.server] stream MusicAssistant--5043 not found, synchronize
2024-09-12 12:26:36.047 INFO (MainThread) [music_assistant.streams] Start Queue Flow stream for Queue Minas-Morgul - crossfade: False
2024-09-12 12:26:36.452 INFO (MainThread) [snapcast.control.server] stream MusicAssistant--5026 not found, synchronize

I will attach the Snapcast client logs as soon as I find out where they are stored on macOS.....

What version of Home Assistant Core are your running

2024.9.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 commented 6 days ago

We just yesterday added this to the docs

Occasionally after a stream change (pause, skip or seek) Snapweb can go silent. This can be fixed by selecting stop then play in the Snapweb UI

Did you do something to make the stream change? Normally it works ok from the initial play...at least in my experience. @SantiagoSotoC ?

OzGav commented 6 days ago

Oh but you were using the client by the looks of it?

JeffersonBledsoe commented 6 days ago

Thanks for the quick response as always! I have snapclient setup on my mac and use that as the player. I will look for the logs from the client later today incase it was a client issue, but the exception makes me think there's at least something we could guard against. I don't normally have any issues, this was a one off