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.35k stars 52 forks source link

squeeze players stop playing #2009

Closed H30lth closed 7 months ago

H30lth commented 7 months ago

What version of Music Assistant has the issue?

2.0.0b111

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

2.0.0b111

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

The problem

A track will loop 4 seconds of play the. Restart the track or play for a while then stop.

How to reproduce

Play audio from plex spotify and YouTube services to slimproto devices

Music Providers

Plex spotify youtube

Player Providers

Players with issues. Picoreplayer and squeezelite windows. Playing separately and in group produces same issue.

Relevant log output

2024-03-16 15:09:03.970 ERROR (ThreadPoolExecutor-0_24) [music_assistant] Error doing task: Task was destroyed but it is pending!

Additional information

No response

What version of Home Assistant Core are your running

2024.3.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 7 months ago

You haven't listed the correct integration version. I use a picoreplayer with Spotify and it works fine. Have you rolled back to see if this behaviour is still present? You haven't advised what does work correctly. Please follow the instructions in the template and provide a LOT of information explaining what you have tried from the troubleshooting pages, what has worked, and what hasn't worked. Attempt to narrow down the problem yourself and let us know what you have tried.

OzGav commented 7 months ago

And supply the full log. A single line is not useful at all.And I assume you are thumbs downing your disappointment with your initial post.

WJ4IoT commented 7 months ago

More or less same problems. Because I run both HA and MA in a Docker container I was able to tackle my problems to pull the latest MA image. For me the "problems" started with HACS asking to refresh the MA integration (twice or so, which I did). My MA integration was only a few days old and after all refresh my first impression is it works flawlessly (again).

OzGav commented 7 months ago

@H30lth we need some more followup or we will have to close this

WJ4IoT commented 7 months ago

I do not want to hijack this issue but after I installed Spotify I also experience that my music stops. This is however after some time. When I look at the log (now 60+ k lines) I see a lot of errors due to Spotify it starts with:

2024-03-16 20:42:46.075 INFO (MainThread) [music_assistant.music] Sync task for Tune-In Radio completed
2024-03-16 20:45:26.539 INFO (MainThread) [music_assistant.providers.spotify] Successfully logged in to Spotify as 1126007149
2024-03-16 20:45:26.539 INFO (MainThread) [music_assistant] Loaded music provider Spotify
2024-03-16 20:46:20.488 ERROR (MainThread) [music_assistant] Error doing task: Task exception was never retrieved
Traceback (most recent call last):
  File "<string>", line 39, in __mashumaro_from_dict__
  File "<string>", line 39, in <listcomp>
  File "<string>", line 31, in __mashumaro_from_dict__
ValueError: Argument for music_assistant.common.models.media_items.ProviderMapping.__mashumaro_from_dict__ method should be a dict instance

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/music_assistant/server/controllers/media/artists.py", line 68, in add_item_to_library
    item = Artist.from_item_mapping(item)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/music_assistant/common/models/media_items.py", line 301, in from_item_mapping
    return cls.from_dict(
           ^^^^^^^^^^^^^^
  File "<string>", line 41, in __mashumaro_from_dict__
mashumaro.exceptions.InvalidFieldValue: Field "provider_mappings" of type set[ProviderMapping] in Artist has invalid value {'item_id': '252', 'provider_domain': 'library', 'provider_instance': 'library', 'available': True}
2024-03-16 20:46:25.485 ERROR (MainThread) [music_assistant] Error doing task: Task exception was never retrieved
Traceback (most recent call last):
  File "<string>", line 39, in __mashumaro_from_dict__
  File "<string>", line 39, in <listcomp>
  File "<string>", line 31, in __mashumaro_from_dict__
ValueError: Argument for music_assistant.common.models.media_items.ProviderMapping.__mashumaro_from_dict__ method should be a dict instance

During handling of the above exception, another exception occurred:

I will remove Spotify for the moment to see if this works better (will hear that 4 sure tomorrow morning when girlfriend does not have music). I will leave the PiCorePlayer running .

Some detail: Hardware: NUC7i7BNH (Ubuntu 22.04.4 LTS 12Gb) HA version: 2024.3.1 (contaIner) MA Version: 2.0.0b111 (container) MA integration: 2024.3.1 (installed with HACS) Providers: Tune-In Radio, Spotify Players: Slimproto (PiCorePlayer on Pi2), UPnP/DNLA (Audio Pro C5A) both on Ethernet How to reproduce: Clueless, music just stops after x minutes no specific errors in MA log

Update:

In my case the music from Tune-In stops on the PiCorePlayer after roundish (but pretty consistent) 26 minutes. Cannot see anything in the logs of HA or MA why this happens (not sure were to look in logs of picoreplayer itself) For argument sake this could be still a hardware issue but have no previous experience because just started with MA,

Also the Audio Pro C5A seems to suffers from silence from time to time. Not timed yet, If a preset key on device was used then the music plays on. Due to dual use of this device (also line/aux and preset) some errors related to this can be found in the log.

WJ4IoT commented 7 months ago

Another update:

What did I try so far?

MA

For the moment (to remain peace in the house) I will revert back to LMS but I am willing to test things again.

Some detail: Hardware: NUC7i7BNH (Ubuntu 22.04.4 LTS 12Gb) Router: UDM (minion) HA version: 2024.3.1 (container) MA Version: 2.0.0b116 (container) MA integration: 2024.3.3 (installed with HACS) Providers: Tune-In Radio, Spotify Players: Slimproto (piCorePlayer v8.2.0 on Pi2), UPnP/DNLA (Audio Pro C5A) both on Ethernet

melwinek commented 7 months ago

I have the same problem when playing the radio via SlimProto. The PiCorePlayer logs show "error reading from socket: Connection reset by peer". So MA disconnects the connection. In MA and HA it looks like it's still playing.

OzGav commented 7 months ago

@WJ4IoT Your issue seems to be repeatable. Please restart MA then do whatever you do to make the playback stop at the 29min mark and then DOWNLOAD AND ATTACH the FULL log from MA SETTINGS>>CORE

edit: I am playing on my picoreplayer and it is has been going strong for 90mins so far...So could be hardware for you in this case. For the DLNA player have you tried with queue flow mode ON?

OzGav commented 7 months ago

@melwinek What you are describing is NOT the same. Your error is different to that reported here. Please go through the troubleshooting page CAREFULLY and if you get to the end without resolution open a new issue with all the required info. Yours sounds like a network or player problem.

OzGav commented 7 months ago

@WJ4IoT Please try again with b118

marcelveldt commented 7 months ago

these issues are resolved in b124 and confirmed fixed by others