Sonos & Spotify - Media browsing error

Hi,

Unable to figure out why I can’t browse my Spotify-account at all from my Sonos integration.
The spotify integration is working and I’m able to see what’s playing and browse media from other sources.
Also works with SpotifyPlus integration.

Anyone knows why this is a happening to the Sonos integration?

Logger: homeassistant.components.websocket_api.http.connection
Source: components/spotify/browse_media.py:181
integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 12:14:15 PM (13 occurrences)
Last logged: 12:38:58 PM

[140196931218176] Error handling message: Unknown error (unknown_error) Robin Anderberg from 80.217.56.179 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36)
[140196822515376] Error handling message: Unknown error (unknown_error) Robin Anderberg from 80.217.56.179 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36)
[140196913341216] Error handling message: Unknown error (unknown_error) Robin Anderberg from 80.217.56.179 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36)
[140196822514512] Error handling message: Unknown error (unknown_error) Robin Anderberg from 192.168.10.5 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36)
[140196913346112] Error handling message: Unknown error (unknown_error) Robin Anderberg from 80.217.56.179 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36)
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py”, line 27, in _handle_async_response
await func(hass, connection, msg)
File “/usr/src/homeassistant/homeassistant/components/media_player/init.py”, line 1308, in websocket_browse_media
payload = await player.async_browse_media(media_content_type, media_content_id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/components/sonos/media_player.py”, line 776, in async_browse_media
return await media_browser.async_browse_media(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/components/sonos/media_browser.py”, line 115, in async_browse_media
return await spotify.async_browse_media(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/components/spotify/browse_media.py”, line 181, in async_browse_media
or not isinstance(entry.runtime_data, HomeAssistantSpotifyData)
^^^^^^^^^^^^^^^^^^^^^^^^
NameError: name ‘HomeAssistantSpotifyData’ is not defined

1 Like

Having the same error. Still figuring it out what could be the cause.

1 Like

Same issue here. Reloaded Spotify integration, no luck.

I also have the problem with Core update 2024.6.0, 2024.6.1, 2024.6.2
When I downgrade to Core 2024.5.3 everything works again. In all cases OS 12.3

There’s an issue for this on GitHub with 9 upvotes:
Unable to browse spotify · Issue #119192 · home-assistant/core (github.com)

After the last Core update this issue has been resolved. :slight_smile:

1 Like

Still having the same issue in 2024.7.1. Please help. I’ve reloaded Spotify integration and still not working.

No issues since 2024.7.1