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.39k stars 51 forks source link

No session on the sonos player #2946

Open joostlek opened 1 month ago

joostlek commented 1 month ago

What version of Music Assistant has the issue?

2.3.0b24

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

None

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

The problem

I played some music via Music Assistant on wednesday evening. After that I started some streams via the Home Assistant native play media action to the device (yesterday during the day) or even via Spotify connect. When I open Music Assistant today, the application is still in the state from wednesday. But I can't play any music on it, because the session is over according to the logs.

I would expect that Music Assistant would take care of this and create a new session if the old one is invalid.

How to reproduce

Start a session on a sonos device, leave it be, and come back

Music Providers

Sonos

Player Providers

Local file

Full log output

2024-09-20 11:01:31.943 ERROR (MainThread) [music_assistant] Error doing task: Task exception was never retrieved Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/music_assistant/server/controllers/players.py", line 676, in play_media await player_prov.play_media( File "/usr/local/lib/python3.12/site-packages/music_assistant/server/providers/sonos/init.py", line 654, in play_media await sonos_player.client.player.group.play_cloud_queue( File "/usr/local/lib/python3.12/site-packages/aiosonos/group.py", line 367, in play_cloud_queue await self.client.api.playback_session.load_cloud_queue( File "/usr/local/lib/python3.12/site-packages/aiosonos/api/namespaces/playback_session.py", line 90, in load_cloud_queue await self.api.send_command( File "/usr/local/lib/python3.12/site-packages/aiosonos/api/websockets.py", line 93, in send_command return await future ^^^^^^^^^^^^ aiosonos.exceptions.FailedCommand: Command failed: There is no session on this player.

Additional information

No response

What version of Home Assistant Core are your running

2024.9.2

What type of installation are you running?

Home Assistant OS

On what type of hardware are you running?

Raspberry Pi

OzGav commented 1 month ago

With the volume of requests for assistance on here, Discord and the HA forums we need people to provide the information requested in a concise manner. You are getting this standard response because you have not supplied the information requested in the troubleshooting docs or in the issue report template and we are unable to quickly pinpoint the problem. Please review and supply the requested information for a more timely response to your problem. Thanks for your understanding.

OzGav commented 1 month ago

@joostlek can you attach the full log from the MA settings and are you able to try any other player providers to see if this is a Sonos issue or broader?

joostlek commented 1 month ago

I don't have the full log anymore. But this is a sonos issue as it happens within the Sonos library. For me the issue is quite clear so at this point I just need to find time and I will dive into music assistant myself.

OzGav commented 1 month ago

Marcel will appreciate the help

jcmleng commented 1 month ago

I have just encountered the same issue. I have been unable to start a session on my Sonos One media player. I played a playlist to the Sonos One last night, and paused after 30 mins. Just tried to open a new playlist and I get the error messages in the log. Pressing the Play button in MA has no response other than the Info messages "Start Queue Flow Stream ..."

What version of Music Assistant has the issue? 2.27 What version of the Home Assistant Integration have you got installed? 2024.9.1 Have you tried everything in the Troubleshooting FAQ and reviewed the Open and Closed Issues and Discussions to resolve this yourself? Yes - same characteristics as the original report of this issue, with roughly the same error message Music Providers: Spotify Player Providers: Home Assistant Media Player, Sonos One What version of Home Assistant Core are your running: 2024.10.1 What type of installation are you running? Home Assistant OS On what type of hardware are you running? RPi 4B, 4Mb RAM

music-assistant.log

marcelveldt commented 3 weeks ago

@jcmleng please create your own issue report instead of hijacking another one. You can refer to an existing report if it may look similar but adding a somewhat related issue is only adding confusion.

jcmleng commented 3 weeks ago

Apologies @marcelveldt , will do. Please let me know if you wanted me to delete my comment to remove the confusion.