[Solved!] Media Browser Unknown Error

Hi all,

During my morning routine, I’d like to integrate movement more consistently. Therefore I have used the “Confirmable Notification” blueprint to integrate a choice into my morining routine. But upon selecting media to play after that choice is offered, I get an “Unknown Error”, and am unable to browse the media on my LibreELEC raspberry pi. It doesn’t matter if I select the entity, or the device, same error.

This worked previously, as I have a similar evening routine already working, although it doesn’t offer me the choice (which was something still on my to-do list). When I try to select different media in this script, i get the following error:

Before I remove LibreELEC and add it again to only stumble upon the same problem and have my currently working routines stop functioning, is there anywhere I can look to find the cause of this “Unknown” (un-helpful) error?

This seems to be a Home assistant issue, since both Plex and LibreELEC play the same media just fine off of my NAS. Communication with the LibreELEC pi (playback control) also works.

Logs:

Source: components/kodi/browse_media.py:224
integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 11:28:47 (6 occurrences)
Last logged: 11:50:10

[140710812472864] Error handling message: Unknown error (unknown_error) Rutger Daalman from 10.0.0.202 (Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36)
[140710678469728] Error handling message: Unknown error (unknown_error) Rutger Daalman from 10.0.0.202 (Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36)
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 28, in _handle_async_response
    await func(hass, connection, msg)
  File "/usr/src/homeassistant/homeassistant/components/media_player/__init__.py", line 1386, in websocket_browse_media
    payload = await player.async_browse_media(media_content_type, media_content_id)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/kodi/media_player.py", line 845, in async_browse_media
    return await library_payload(self.hass)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/kodi/browse_media.py", line 224, in library_payload
    with contextlib.suppress(media_source.BrowseError):
                             ^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'homeassistant.components.media_source' has no attribute 'BrowseError'
2 Likes

This happened to me after updating the core to 25.10.0 (and still present in the .2 release). For my Yamaha receiver amplifier I was able to select which radiochannel when clicking the “browse media” button on the default media card from home assistant. After the update i get:

Media browsing error

Unknown error

When I click “Browse media” on a e.g. Google speaker it all still works. So what broke in the update?

This is a line in my logs:
module ‘homeassistant.components.media_source’ has no attribute ‘BrowseError’

Its not you, it’s a among the problems caused by the 25.10.0 update. So far nothing but crickets.

This has been happening since ha core 2025.10 - Now we’re on 2025.10.3 and it has still yet to be fixed which is a bit disappointing.

The fix is a simple one line fix of the kodi browse_media.py file on line 224

Looking at the imports BrowseError is imported from homeassistant.components.media_player not from media_source

So the code incorrectly references media_source.BrowseError when it should be just BrowseError

If anyone wants to DIY the fix here’s how to do it (I’m on HA OS, I recon there are better solutions if you’re running it on full linux with docker):

grab the entire kodi folder from Home Assistant Github

put the folder inside your custom_components folder, that way it will override the default kodi integration

now inside /custom_components/kodi open the file browse_media.py and edit line 224 from with contextlib.suppress(media_source.BrowseError): to with contextlib.suppress(BrowseError): and save it

Also in manifest.json you just have to add a version at the end otherwise HA won’t load the new kodi custom component

{
  "domain": "kodi",
  "name": "Kodi",
  "after_dependencies": ["media_source"],
  "codeowners": ["@OnFreund"],
  "config_flow": true,
  "documentation": "https://www.home-assistant.io/integrations/kodi",
  "iot_class": "local_push",
  "loggers": ["jsonrpc_async", "jsonrpc_base", "jsonrpc_websocket", "pykodi"],
  "requirements": ["pykodi==0.2.7"],
  "zeroconf": ["_xbmc-jsonrpc-h._tcp.local."],
  "version": "1.0.0"
}

After that browsing media on kodi should work on core 2025.10 and up

2 Likes

Can confirm this works. Indeed an easy fix. I suspected something like this when I read the error message, I’m just not smart enough to figure out what to remove. (or we can blame a lack of experience with HA’s inner workings).

Easy enough to achieve with the file editor available in the add-on store.

A reboot is required, as I found out.

Still seeing this issue on the latest update of 2025.11.1 sad to see they’re not implementing such a simple fix :frowning:

@christheradioguy Hopefully it’ll be in the 2025.11.2 release.

I saw no one had done a PR, so when I came across this fix, I did the rest: Fix wrong BrowseError module in Kodi by charrus · Pull Request #155971 · home-assistant/core · GitHub. It’s all approved and merged.

It needed a polite reminder. It’s going into the 2025.11.3 release.