Music Assistant - MediaNotFoundError: Unable to retrieve streamdetails

I recently installed Music Assistant, and configured it to use my Jellyfin and Navidrome severs as sources. I have Cast devices and Home Assistant medi players as players. Everything appeared to sync correctly, and I can see all the metadata of the artists, albums, and tracks, but I’m getting this error for every track I try to play on any player. In addition, the tracks look grayed out when I view them in Music Assistant (I’m assuming this is related to the error…).

music-assistant-1  | 2025-04-11 13:17:03.467 INFO (MainThread) [music_assistant.player_queues] Fetching tracks to play for album When Your Heart Stops Beating
music-assistant-1  | 2025-04-11 13:17:03.529 WARNING (MainThread) [music_assistant.player_queues] Skipping unplayable item +44 - Lycanthrope (library://track/1121)
music-assistant-1  | 2025-04-11 13:17:03.531 ERROR (MainThread) [music_assistant] Error doing task: Task exception was never retrieved
music-assistant-1  | Traceback (most recent call last):
music-assistant-1  |   File "/app/venv/lib/python3.12/site-packages/music_assistant/controllers/player_queues.py", line 835, in play_media
music-assistant-1  |     await self._load_item(
music-assistant-1  |   File "/app/venv/lib/python3.12/site-packages/music_assistant/controllers/player_queues.py", line 1134, in _load_item
music-assistant-1  |     queue_item.streamdetails = await get_stream_details(
music-assistant-1  |                                ^^^^^^^^^^^^^^^^^^^^^^^^^
music-assistant-1  |   File "/app/venv/lib/python3.12/site-packages/music_assistant/helpers/audio.py", line 575, in get_stream_details
music-assistant-1  |     raise MediaNotFoundError(msg)
music-assistant-1  | music_assistant_models.errors.MediaNotFoundError: Unable to retrieve streamdetails for +44 - Lycanthrope (library://track/1121)


I see the following two requests to the Jellyfin server when I try to play something:

GET /Items?includeItemTypes=Audio&recursive=true&parentId=30bb2ca64cbb2fa4ad8b1bd18ae58ab5&enableUserData=true&fields=ProviderIds,CanDownload,SortName,MediaSources,MediaStreams HTTP/1.1 200 4063 "" "Music Assistant/2.5.1"
GET /Items/30bb2ca64cbb2fa4ad8b1bd18ae58ab5/Images/Primary?api_key=[REDACTED API KEY] HTTP/1.1 200 368322 "" "Python/3.12 aiohttp/3.11.16"

I didn’t see a specific error that would indicate why the tracks are grayed out, but I see similar errors when atempting to play tracks from my Navidrome server as I do with Jellyfin. All of my music is either in MP3 or FLAC format, and from the docs, those should both be supported. Obviously, everything works when using the respective services directly.

Has anyone seen anything like this before?

Also, just a side question: Is there a reason why MusicAssistant wants to sync everything from my self-hosted music services? I would have expected that it would just ask the music source for metadata, images, or whatever it needs whenever it was necessary. I mean, surely it doesn’t try to sync all of Spotify, right? Is there a way to stop this “sync” that I just didn’t notice?

Hello SteveDinn,

You might want to ask here…
Music assistant
The people that are watching that thread are all either interested. users of, or authors of Music Assistant.
They are likely your best resource.
Also there is a Discord: Music Assistant

Ok let’s start by trying a radio station. Install the radio browser provider and confirm that all the players work ok

1 Like

Ok. This is working. I can play radio stations.

Incidentally, the radio browser plugin is really cool. I initially didn’t look beyond my self-hosted services. I really can’t stand Tune-In or I Heart Radio.

To be clear, I still can’t play music from my self-hosted services, but I can play radio stations. It does’t appear to be an issue with the media_players.

Can you share the media directly via the Local Filesystem Provider and see if that works?

Playing music tracks local to the Music-Assistant container also works. I added a single album to a folder mounted by the container, and the local tracks are in full colour, while the ones from Jellyfin that are listed right alongside them look disabled.

OK we are narrowing it down then. It is very unusual that both Navidrome and Jellyfin exhibit the same problem as they are different providers. Have you got some sort of permission problem happening. Can you restart MA so the log is clean and then look in the logs for any errors. If nothing obvious then change the debug level for Jellyfin to DEBUG and then select SYNCHRONISE NOW and then look in the log again

1 Like

No permission issues that I’m aware of. Jellyfin and Navidrome can access the files (this is how I normally play music), but the MA user would not normally be able to read them directly, I mean, this is the reason for external providers – I want MA to use the music services that I have.

MA has an access token the same as any other user on my Jellyfin instance (or Navidrome). If I use the “musicassistant” user to login directly to either service, I can play music.

I’ll get to that test ASAP. I’m very motivated to have this work :slight_smile:

The were no errors on start up, only a handful of warnings involving my two Onkyo receivers which have “Chromecast Built-in”. That feature has never worked well on those devices, and have CCwGTV devices hooked up to them anyway, so that is not a problem for me. All of my players are Cast devices, with the exception of one Home Assistant Voice PE. The full list of Cast devices and groups takes a minute or two to fully populate, but that’s not specific to Music Assistant.

In any case, the Jellyfin sync operation seemed to have no problems.

2025-04-14 13:18:33.047 INFO (MainThread) [music_assistant] Starting Music Assistant Server (01dd85dc6ca74ca7ad24d79b1f80b450) version 2.5.1 - HA add-on: False - Safe mode: False
2025-04-14 13:18:33.066 INFO (MainThread) [music_assistant.cache] Initializing cache controller...
2025-04-14 13:18:33.791 INFO (MainThread) [ffmpeg] Detected ffmpeg version 7.1 with libsoxr support
2025-04-14 13:18:33.828 INFO (MainThread) [music_assistant.streams] Starting server on  0.0.0.0:8097 - base url: http://10.1.1.9:8097
2025-04-14 13:18:35.869 INFO (MainThread) [music_assistant.music] Using a sync interval of 720 minutes.
2025-04-14 13:18:36.074 INFO (MainThread) [music_assistant.webserver] Starting server on  0.0.0.0:8095 - base url: http://10.1.1.9
2025-04-14 13:18:36.860 INFO (MainThread) [music_assistant] Loaded metadata provider MusicBrainz
2025-04-14 13:18:36.861 INFO (MainThread) [music_assistant] Loaded music provider Music Assistant
2025-04-14 13:18:36.863 INFO (MainThread) [music_assistant] Loaded player provider Playergroup
2025-04-14 13:18:36.864 INFO (MainThread) [music_assistant] Loaded metadata provider fanart.tv
2025-04-14 13:18:36.869 INFO (MainThread) [music_assistant] Loaded metadata provider The Audio DB
2025-04-14 13:18:36.871 INFO (MainThread) [music_assistant] Loaded player provider Music Assistant
2025-04-14 13:18:36.884 INFO (MainThread) [music_assistant] Loaded music provider Filesystem (local disk)
2025-04-14 13:18:36.903 INFO (MainThread) [music_assistant] Loaded player provider Chromecast
2025-04-14 13:18:36.922 DEBUG (MainThread) [music_assistant.jellyfin] Log level configured to DEBUG
2025-04-14 13:18:36.931 INFO (MainThread) [music_assistant] Loaded plugin provider Home Assistant
2025-04-14 13:18:37.131 INFO (MainThread) [music_assistant] Loaded player provider Home Assistant MediaPlayers
2025-04-14 13:18:37.188 INFO (MainThread) [music_assistant.players] Player registered: media_player.kitchen_voice_assistant_media_player/Kitchen Voice Assistant Media Player
2025-04-14 13:18:37.332 INFO (MainThread) [music_assistant] Loaded music provider RadioBrowser
2025-04-14 13:18:37.855 INFO (MainThread) [music_assistant] Loaded music provider Jellyfin Media Server Library
2025-04-14 13:18:37.858 INFO (MainThread) [music_assistant.players] Player registered: 7b081979-ed75-ec12-53bd-263f8ebd9391/Living Room TV
2025-04-14 13:18:37.928 INFO (MainThread) [music_assistant.players] Player registered: 842783d9-773b-c586-5b78-0e1b4d5a81b8/Rec room Home
2025-04-14 13:18:40.511 INFO (MainThread) [music_assistant.players] Player registered: ma_p6fqntpygm/This Device
2025-04-14 13:18:43.530 INFO (MainThread) [music_assistant.players] Player registered: ma_m5f9nrdwc8/This Device
2025-04-14 13:19:07.956 WARNING (zeroconf-ServiceBrowser-_googlecast._tcp-29) [pychromecast.dial] Failed to determine cast type for host <unknown> (<urlopen error _ssl.c:983: The handshake operation timed out>) (services:{MDNSServiceInfo(name='Pioneer-VSX-LX301-597e0f5f36fe8127107ff0e974d8dba4._googlecast._tcp.local.')})
2025-04-14 13:20:08.022 WARNING (zeroconf-ServiceBrowser-_googlecast._tcp-29) [pychromecast.dial] Failed to determine cast type for host <unknown> (<urlopen error _ssl.c:983: The handshake operation timed out>) (services:{MDNSServiceInfo(name='Pioneer-VSX-LX301-597e0f5f36fe8127107ff0e974d8dba4._googlecast._tcp.local.')})
2025-04-14 13:20:08.027 INFO (MainThread) [music_assistant.players] Player registered: 597e0f5f-36fe-8127-107f-f0e974d8dba4/Livingroom amp
2025-04-14 13:20:38.042 WARNING (zeroconf-ServiceBrowser-_googlecast._tcp-29) [pychromecast.dial] Failed to determine cast type for host <unknown> (<urlopen error _ssl.c:983: The handshake operation timed out>) (services:{MDNSServiceInfo(name='Pioneer-VSX-832-cd6d060e684be93a96a2b453cfa3b223._googlecast._tcp.local.')})
2025-04-14 13:21:38.110 WARNING (zeroconf-ServiceBrowser-_googlecast._tcp-29) [pychromecast.dial] Failed to determine cast type for host <unknown> (<urlopen error _ssl.c:983: The handshake operation timed out>) (services:{MDNSServiceInfo(name='Pioneer-VSX-832-cd6d060e684be93a96a2b453cfa3b223._googlecast._tcp.local.')})
2025-04-14 13:21:38.117 INFO (MainThread) [music_assistant.players] Player registered: cd6d060e-684b-e93a-96a2-b453cfa3b223/RecRoom amp
2025-04-14 13:21:38.236 INFO (MainThread) [music_assistant.players] Player registered: d6fe7019-0f9e-68ba-a09b-d28a153eb9aa/Recroom TV
2025-04-14 13:21:38.313 INFO (MainThread) [music_assistant.players] Player registered: 314ece11-c42f-4f38-8c94-32ed9b179acb/Whole House
2025-04-14 13:21:38.388 INFO (MainThread) [music_assistant.players] Player registered: 7a719a2f-65ff-46df-a0fe-7fba94029c63/Multi room
2025-04-14 13:21:39.146 INFO (MainThread) [music_assistant.players] Player registered: 00ce76e1-914d-b6d4-b854-c7c0ed4a3c77/Office Home
2025-04-14 13:21:39.228 INFO (MainThread) [music_assistant.players] Player registered: cca184d8-ad1a-0e78-22cc-01dd96df7070/Kitchen Home
2025-04-14 13:21:39.300 INFO (MainThread) [music_assistant.players] Player registered: 1c538469-37c9-8610-a8ba-8e4df0dfd293/Garage Speaker
2025-04-14 13:21:39.440 INFO (MainThread) [music_assistant.players] Player registered: e917af73-ca4e-811a-e818-c81e4c57357e/Bedroom Home
2025-04-14 13:21:39.538 INFO (MainThread) [music_assistant.players] Player registered: 85a6c8d8-e464-aa69-ea6e-19b582dc2996/Garage Home
2025-04-14 13:21:39.609 INFO (MainThread) [music_assistant.players] Player registered: 80ac793e-a056-42e6-9582-683f1e9c83e8/Deck speakers
2025-04-14 13:21:39.686 INFO (MainThread) [music_assistant.players] Player registered: beee617c-1c4a-4ab2-aae3-fededbb61495/BBQ Group
2025-04-14 13:21:39.775 INFO (MainThread) [music_assistant.players] Player registered: aebc65f4-45f8-3d92-5e19-689db1a03b37/Dining Room speaker
2025-04-14 13:21:39.934 INFO (MainThread) [music_assistant.players] Player registered: c3373bd1-bedc-3cb9-0bc8-46406f908d97/Bedroom TV
2025-04-14 13:22:10.303 DEBUG (MainThread) [music_assistant.jellyfin] Start sync of artist items.
2025-04-14 13:22:18.847 DEBUG (MainThread) [music_assistant.jellyfin] Start sync of album items.
2025-04-14 13:22:18.848 INFO (MainThread) [music_assistant.music] Sync task for Jellyfin Media Server Library completed
2025-04-14 13:22:22.248 DEBUG (MainThread) [music_assistant.jellyfin] Start sync of track items.
2025-04-14 13:22:22.249 INFO (MainThread) [music_assistant.music] Sync task for Jellyfin Media Server Library completed
2025-04-14 13:23:26.639 DEBUG (MainThread) [music_assistant.jellyfin] Start sync of playlist items.
2025-04-14 13:23:26.640 INFO (MainThread) [music_assistant.music] Sync task for Jellyfin Media Server Library completed
2025-04-14 13:23:26.845 INFO (MainThread) [music_assistant.music] Sync task for Jellyfin Media Server Library completed

On a whim, I removed, re-added, and re-synced my Navidrome server, and it worked! I can play music through that provider. I don’t know why it didn’t work before. Maybe it had to do with the order that I had added the two providers (Jellyfin and Subsonic) because now it is the last provider, where previously, Jellyfin would have been the last provider added.

Regardless, I have removed the Jellyfin and local file providers, and it still works, so I’m happy about that.

It looks like it might have been a weird fluke or something to do with the order of adding the Jellyfin provider last. I kind of think it may have been because I had the same music shared through both providers, and it was not deterministic as to which provider it went to for tracks that had multiple versions, but which were otherwise identical

Thanks for your help!

Hey. @OzGav, This is a totally separate question, but since you’ll probably come back to read this, I figure I’ll ask it while I have your attention:

Is there a reliable way to map the media_player entities created by MA back to their original HA counterparts? In my HA instance, I already have several media_player entities that end in ‘_2’ so I can’t rely on that.

This was the best I could come up with, just to match up the friendly_name attributes. Is this reliable? I mean, conceivably, multiple media_player entities could have the same friendly_name attribute, but that’s unlikely, I guess.

{%- set media_player = 'the original HA media_player entity_id' %}

{%- if config_entry_attr(config_entry_id(media_player), 'domain') == 'music_assistant' %}
{{ media_player }}
{%- else %}
{{ integration_entities('music_assistant') 
    | select('is_state_attr', 'friendly_name', state_attr(media_player, 'friendly_name')) 
    | first }}
{%- endif %}

It might not be because I have some players that have a different friendly names but if you make sure they do then yes it would work?

Bigger question is what are you trying to do with this?

I was thinking about having to translate back & forth to get the “right kind” of media player, but in retrospect, I think you’re right. I should just think about what I’m trying to do.

Though, I would rather only use one set of these players. The friendly names are the same, so they’re impossible to distinguish in the entity picker for automations or scripts. Maybe I should just rename the entities of the MA ones to be the original’s IDs and then hide the originals? MA’s media players are supersets of the originals, correct?

We recommend you just use the MA players and hide all the others

1 Like