[Sonos-Card] Error calling SonosSpeaker.join on Keuken: UPnP Error 501 received: Action Failed from

Core 2024.5.3
Supervisor 2024.05.1
Operating System 12.3
Frontend 20240501.1

I am facing issues with my Sonos integration it seems. This issue occurred after my recent upgrade of HA core. I am wondering if this is a bug or purely a coincidence? Perhaps there is something I can do to assist with debugging of fix it myself?

The issue is reproducible when I use the sonon-card interface to add rooms. The browser debug show sthe following message:

Uncaught (in promise) 
Object { code: "home_assistant_error", message: "Error calling SonosSpeaker.join on Keuken: UPnP Error 501 received: Action Failed from 192.168.0.217" }
​
code: "home_assistant_error"
​
message: "Error calling SonosSpeaker.join on Keuken: UPnP Error 501 received: Action Failed from 192.168.0.217"
​
<prototype>: Object { … }
custom-sonos-card.js:773:643
    applyGrouping custom-sonos-card.js:773
    AsyncFunctionThrow self-hosted:856
    (Async: async)
    render custom-sonos-card.js:665
    update custom-sonos-card.js:24
    performUpdate custom-sonos-card.js:12
    scheduleUpdate custom-sonos-card.js:12
    _$ET custom-sonos-card.js:12
    AsyncFunctionNext self-hosted:852
    (Async: async)
    requestUpdate custom-sonos-card.js:12
    set custom-sonos-card.js:12
    j custom-sonos-card.js:18
    _$AI custom-sonos-card.js:18
    p custom-sonos-card.js:18
    $ custom-sonos-card.js:18
    _$AI custom-sonos-card.js:18
    p custom-sonos-card.js:18
    $ custom-sonos-card.js:18
    _$AI custom-sonos-card.js:18
    Do custom-sonos-card.js:24
    update custom-sonos-card.js:24
    performUpdate custom-sonos-card.js:12
    scheduleUpdate custom-sonos-card.js:12
    _$ET custom-sonos-card.js:12
    AsyncFunctionNext self-hosted:852
    (Async: async)
    requestUpdate custom-sonos-card.js:12
    set custom-sonos-card.js:12
    value hui-view.ts:195
    forEach self-hosted:203
    value hui-view.ts:193
    performUpdate reactive-element.ts:1329
    scheduleUpdate reactive-element.ts:1261
    _$Ej reactive-element.ts:1233
    AsyncFunctionNext self-hosted:852
    (Async: async)
    requestUpdate reactive-element.ts:1208
    set reactive-element.ts:726
    value hui-root.ts:513
    _$AE reactive-element.ts:1378
    performUpdate reactive-element.ts:1343
    scheduleUpdate reactive-element.ts:1261
    _$Ej reactive-element.ts:1233
    AsyncFunctionNext self-hosted:852
    (Async: async)
    requestUpdate reactive-element.ts:1208
    set reactive-element.ts:726
    j lit-html.ts:1883
    _$AI lit-html.ts:1825
    v lit-html.ts:1192
    g lit-html.ts:1540
    _$AI lit-html.ts:1384
    z lit-html.ts:2183
    update lit-element.ts:165
    performUpdate reactive-element.ts:1329
    scheduleUpdate reactive-element.ts:1261
    _$Ej reactive-element.ts:1233
    AsyncFunctionNext self-hosted:852

Home Assistant LOG:

Logger: homeassistant.components.websocket_api.http.connection
Source: components/websocket_api/commands.py:239
integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 11:29:42 (4320 occurrences)
Last logged: 11:42:34

[546983045056] Unexpected exception
[546853507264] Unexpected exception
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/sonos/helpers.py", line 63, in wrapper
    result = funct(self, *args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/sonos/speaker.py", line 942, in join
    speaker.soco.join(self.soco)
  File "/usr/local/lib/python3.12/site-packages/soco/core.py", line 1675, in join
    self.avTransport.SetAVTransportURI(
  File "/usr/local/lib/python3.12/site-packages/soco/services.py", line 207, in _dispatcher
    return self.send_command(action, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/soco/services.py", line 515, in send_command
    self.handle_upnp_error(response.text)
  File "/usr/local/lib/python3.12/site-packages/soco/services.py", line 571, in handle_upnp_error
    raise SoCoUPnPException(
soco.exceptions.SoCoUPnPException: UPnP Error 501 received: Action Failed from 192.168.0.217

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 239, in handle_call_service
    response = await hass.services.async_call(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2738, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2779, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 975, in entity_service_call
    single_response = await _handle_entity_call(
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1047, in _handle_entity_call
    result = await task
             ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/sonos/media_player.py", line 794, in async_join_players
    await SonosSpeaker.join_multi(self.hass, self.speaker, speakers)
  File "/usr/src/homeassistant/homeassistant/components/sonos/speaker.py", line 956, in join_multi
    group: list[SonosSpeaker] = await hass.async_add_executor_job(
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/sonos/helpers.py", line 77, in wrapper
    raise SonosUpdateError(message) from err
homeassistant.components.sonos.exception.SonosUpdateError: Error calling SonosSpeaker.join on Keuken: UPnP Error 501 received: Action Failed from 192.168.0.217

Are you using some ikea symfonisk speakers in your sonos environment? I get similar errors (UPnP Error 501) by trying to join an ikea speaker to a sonos group. Without the ikea, i get no error.

Error calling SonosSpeaker.join on SchlafzimmerSonos: UPnP Error 501 received: Action Failed from 192.168.100.178

I use symfonisk speakers only and have the same problem.

I cannot join any of them whith Music assistant or the sonos integration.

Hello,

I have the same issue with three Sonos AMPs in my system and it is good to know that there is nothing wrong with my automation. Thanks for posting this!

I am facing more troubles with Sonos: Since that update the Sonos AMP driven speakers run regularly out of sync with air play speakers in the house, so I have to restart the Sonos AMP almost every hour.
I would not be surprised if those changes are coming from the SONOS side of things.
The latest software “developments” is a mess… Many upset customers all around