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.32k stars 48 forks source link

Nothing will play #2044

Closed fin05 closed 6 months ago

fin05 commented 6 months ago

What version of Music Assistant has the issue?

2.0.0b118

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

2024.3.4

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

The problem

I cannot play music from Plex, Radio, or Youtube (only sources I have) to any player I have - I have tried Airplay - Home assistant players - DLNA - This started after the last updates - I have tried reverting back to previous version that worked and it still has the same issue. I completely uninstalled the add-on and integration - rebooted and reinstalled

How to reproduce

Open Music Assistant - Go to playlist - select list - press play - select player - nothing happens - after an extended delay the player bar at the bottom populates with the track name but the counter never starts and the track does not play.

Music Providers

Plex, Youtube, Radio all do not work - These are the only players I have

Player Providers

DLNA - Airplay _ Home Assistant - Chrome cast - all do not work

Full log output

2024-03-21 20:40:18.394 INFO (MainThread) [music_assistant] Starting Music Assistant Server (df37611cecc24f7084443d5b82f5517a) version 2.0.0b118 - uvloop: False
2024-03-21 20:40:18.399 INFO (MainThread) [music_assistant.cache] Initializing cache controller...
2024-03-21 20:40:18.409 INFO (MainThread) [music_assistant.webserver] Starting server on  172.30.32.1:8095 - base url: http://172.30.32.1:8095
2024-03-21 20:40:18.441 INFO (MainThread) [music_assistant.music] Using a sync interval of 180 minutes.
2024-03-21 20:40:18.532 INFO (MainThread) [music_assistant.streams] Detected ffmpeg version 5.1.4 with libsoxr support
2024-03-21 20:40:18.532 INFO (MainThread) [music_assistant.streams] Starting server on  0.0.0.0:8097 - base url: http://192.168.1.147:8097
2024-03-21 20:40:19.068 INFO (MainThread) [music_assistant] Loaded music provider URL
2024-03-21 20:40:19.069 INFO (MainThread) [music_assistant] Loaded metadata provider MusicBrainz Metadata provider
2024-03-21 20:40:19.069 INFO (MainThread) [music_assistant] Loaded metadata provider TheAudioDB Metadata provider
2024-03-21 20:40:19.069 INFO (MainThread) [music_assistant] Loaded metadata provider fanart.tv Metadata provider
2024-03-21 20:40:19.069 INFO (MainThread) [music_assistant] Loaded player provider UPnP/DLNA Player provider
2024-03-21 20:40:19.133 INFO (MainThread) [music_assistant] Loaded music provider Tune-In Radio
2024-03-21 20:40:19.134 INFO (MainThread) [music_assistant.music] Sync task for URL completed
2024-03-21 20:40:19.144 INFO (MainThread) [music_assistant] Loaded plugin provider Home Assistant
2024-03-21 20:40:19.258 INFO (MainThread) [music_assistant.music] Sync task for Tune-In Radio completed
2024-03-21 20:40:19.494 INFO (MainThread) [music_assistant] Loaded player provider Airplay
2024-03-21 20:40:19.743 INFO (MainThread) [music_assistant] Loaded music provider YouTube Music
2024-03-21 20:40:20.071 INFO (MainThread) [music_assistant] Loaded player provider Home Assistant MediaPlayers
2024-03-21 20:40:20.089 INFO (MainThread) [music_assistant.players] Player registered: media_player.lg_webos_smart_tv/Living Room LG TV
2024-03-21 20:40:20.112 INFO (MainThread) [music_assistant] Loaded music provider Plex Media Server Library
2024-03-21 20:40:20.761 INFO (MainThread) [music_assistant.players] Player registered: uuid:5f9ec1b3-ff59-19bb-8530-0005cd904099/Denon AVR-X1300W
2024-03-21 20:40:20.806 INFO (MainThread) [music_assistant.music] Sync task for YouTube Music completed
2024-03-21 20:40:21.630 WARNING (MainThread) [music_assistant.music] Sync task for Plex Media Server Library completed with errors
2024-03-21 20:40:22.680 INFO (MainThread) [music_assistant.players] Player registered: ap0005cd904099/Denon AVR-X1300W
2024-03-21 20:40:35.638 INFO (MainThread) [music_assistant.streams] Start Queue Flow stream for Queue Living Room - crossfade: True
2024-03-21 20:40:59.159 INFO (MainThread) [music_assistant.streams] Start Queue Flow stream for Queue Living Room - crossfade: True
2024-03-21 20:42:10.673 ERROR (MainThread) [music_assistant.providers.dlna] Error during call play_media: '("UpnpConnectionTimeoutError(\'TimeoutError()\', None)", None)'
2024-03-21 20:42:41.674 ERROR (MainThread) [music_assistant.providers.dlna] Error during call play_media: '("UpnpConnectionTimeoutError(\'TimeoutError()\', None)", None)'
2024-03-21 20:44:07.390 INFO (MainThread) [music_assistant.streams] Start Queue Flow stream for Queue Living Room - crossfade: True
2024-03-21 20:45:26.357 INFO (MainThread) [music_assistant.players] Player registered: uuid:cd0d3456-e74c-0f3e-b3ae-d9963b2d50b2/[LG] webOS TV OLED65B2PUA

Additional information

No response

What version of Home Assistant Core are your running

2024.3.1

What type of installation are you running?

Home Assistant OS

On what type of hardware are you running?

Generic x86-64 (e.g. Intel NUC)

OzGav commented 6 months ago

Please follow the template instructions Please DOWNLOAD then DRAG and DROP the full log output from MA SETTINGS>>CORE

edit: You are doing the opposite to what we need. DOWNLOAD the log and DRAG and DROP it so it becomes an attachment. Please do this in your original post

OzGav commented 6 months ago

What is your network configuration?

fin05 commented 6 months ago

Static IP 192.168.1.XXX

OzGav commented 6 months ago

No I am trying to ascertain what your network configuration is as you haven't specified it in your post. Per the troubleshooting docs

Probably the most common issue is people trying to run MA with complicated network setups. Running behind VPNs, across subnets or VLANs, behind firewalls, local SSL, using reverse proxies or inside containers is not supported

fin05 commented 6 months ago

Oh no sorry nothing special - standard shared network - Home assistant installed alone on a nuc - no VM no VPN no extra firewall - it worked fine up until now

OzGav commented 6 months ago

Add the snapcast provider and then go to your borwser and type in :1780

fin05 commented 6 months ago

image

image

OzGav commented 6 months ago

Don't select the top option (unless you already have a snapsever)

fin05 commented 6 months ago

It doesnt allow me to input ip address if I do not select that

OzGav commented 6 months ago

You dont need to

fin05 commented 6 months ago

ok it started once I unselected that

fin05 commented 6 months ago

Issue still there

OzGav commented 6 months ago

Can you navigate to port 1780 press the PLAY icon and then play to the browser?

edit: a player will appear in MA, play to that

fin05 commented 6 months ago

Sorry misread your original message image

fin05 commented 6 months ago

that works

OzGav commented 6 months ago

OK so the server is working fine then. I think you need to look at your network to see if something has changed. firmware updates, settings changed by someone...?

fin05 commented 6 months ago

I'm the only one who would alter anything and I havent - I will reboot everything and check and report back

OzGav commented 6 months ago

Do a full host reboot then

fin05 commented 6 months ago

Did a Full reboot - also turned off firewall on router - rebooted router and same issue I keep seeing this error in log when I try to play to a player

2024-03-21 21:23:38.824 ERROR (MainThread) [music_assistant.webserver] Error handling message: music/item_by_uri: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))

OzGav commented 6 months ago

Yeah which is why I am thinking network problem... but I do see mention of flow mode in your logs. Can you turn that off if you have it on>

fin05 commented 6 months ago

Ok so it does seem to be a network error - but not sure what - I have multiple PCs that file share with a plex server and plex is working fine everywhere - except on music assistant - so it is a network error - but nothing has changed on the network so I'm confused

OzGav commented 6 months ago

Did you have flow mode on out of interest?

fin05 commented 6 months ago

2024-03-21 21:45:28.365 INFO (MainThread) [music_assistant.streams] Start Queue Flow stream for Queue Living Room - crossfade: False 2024-03-21 21:45:45.902 ERROR (MainThread) [music_assistant.webserver] Error handling message: music/artists/get_artist: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')) 2024-03-21 21:46:04.669 ERROR (MainThread) [music_assistant.webserver] Error handling message: music/browse: 'NoneType' object has no attribute 'lower' 2024-03-21 21:48:03.266 ERROR (MainThread) [aiohttp.server] Error handling request Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 452, in _handle_request resp = await request_handler(request) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp/web_app.py", line 543, in _handle resp = await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/music_assistant/server/controllers/metadata.py", line 382, in handle_imageproxy image_data = await self.get_thumbnail( ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/music_assistant/server/controllers/metadata.py", line 362, in get_thumbnail thumbnail = await get_image_thumb( ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/music_assistant/server/helpers/images.py", line 55, in get_image_thumb return await asyncio.to_thread(_create_image) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/asyncio/threads.py", line 25, in to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/music_assistant/server/helpers/images.py", line 49, in _create_image img = Image.open(BytesIO(img_data)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/PIL/Image.py", line 3309, in open raise UnidentifiedImageError(msg) PIL.UnidentifiedImageError: cannot identify image file <_io.BytesIO object at 0x7fb9181addf0> 2024-03-21 21:48:07.966 ERROR (MainThread) [music_assistant.webserver] Error handling message: music/browse: 'NoneType' object has no attribute 'lower' 2024-03-21 21:48:29.613 INFO (MainThread) [music_assistant.streams] Start Queue Flow stream for Queue Living Room - crossfade: False

fin05 commented 6 months ago

Im not sure what flow mode is? Are you referring to crossfade?

OzGav commented 6 months ago

Yes look in the player settings. Most have a queue flow mode option but one or two simply call it crossfade. Just make sure both of those are off.

fin05 commented 6 months ago

yes they are off

OzGav commented 6 months ago

Are you instigatng playback through the MA UI or browsing in HA?

fin05 commented 6 months ago

Thru MA UI

OzGav commented 6 months ago

That error you posted above is that just a one off?

fin05 commented 6 months ago

I get that if i use the MA UI to browse tracks from the plex server

OzGav commented 6 months ago

OK don't confuse things with that then. Find a YouTube track that plays OK to the Snapweb player. Then restart the MA addon. Then in sequence try and play that known working track to your DLNA player, then Airplay player, then Home Assistant and then Chrome cast. Wait five minutes. DOWNLOAD AND ATTACH the logs from MA SETTINGS>>CORE

edit: attach it by dragging and dropping the file into the text entry box here on GH

fin05 commented 6 months ago

2024-03-21 22:08:39.784 ERROR (MainThread) [music_assistant.server.controllers.config] Error while reading persistent storage file /data/settings.json Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/music_assistant/server/controllers/config.py", line 673, in _load self._data = json_loads(await _file.read()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ orjson.JSONDecodeError: Input is a zero-length, empty document: line 1 column 1 (char 0) 2024-03-21 22:08:39.787 INFO (MainThread) [music_assistant] Starting Music Assistant Server (df37611cecc24f7084443d5b82f5517a) version 2.0.0b118 - uvloop: False 2024-03-21 22:08:39.791 INFO (MainThread) [music_assistant.cache] Initializing cache controller... 2024-03-21 22:08:39.800 INFO (MainThread) [music_assistant.webserver] Starting server on 172.30.32.1:8095 - base url: http://172.30.32.1:8095 2024-03-21 22:08:39.817 INFO (MainThread) [music_assistant.music] Using a sync interval of 180 minutes. 2024-03-21 22:08:39.893 INFO (MainThread) [music_assistant.streams] Detected ffmpeg version 5.1.4 with libsoxr support 2024-03-21 22:08:39.893 INFO (MainThread) [music_assistant.streams] Starting server on 0.0.0.0:8097 - base url: http://192.168.1.147:8097 2024-03-21 22:08:40.423 INFO (MainThread) [music_assistant] Loaded music provider URL 2024-03-21 22:08:40.423 INFO (MainThread) [music_assistant] Loaded metadata provider MusicBrainz Metadata provider 2024-03-21 22:08:40.424 INFO (MainThread) [music_assistant] Loaded metadata provider TheAudioDB Metadata provider 2024-03-21 22:08:40.424 INFO (MainThread) [music_assistant] Loaded metadata provider fanart.tv Metadata provider 2024-03-21 22:08:40.424 INFO (MainThread) [music_assistant] Loaded player provider UPnP/DLNA Player provider 2024-03-21 22:08:40.424 INFO (MainThread) [music_assistant] Loaded player provider Chromecast 2024-03-21 22:08:40.486 INFO (MainThread) [music_assistant] Loaded music provider Tune-In Radio 2024-03-21 22:08:40.489 INFO (MainThread) [music_assistant.music] Sync task for URL completed 2024-03-21 22:08:40.489 INFO (MainThread) [music_assistant.providers.snapcast.snapserver] Starting builtin Snapserver... 2024-03-21 22:08:40.497 INFO (MainThread) [music_assistant] Loaded plugin provider Home Assistant 2024-03-21 22:08:40.640 INFO (MainThread) [music_assistant.music] Sync task for Tune-In Radio completed 2024-03-21 22:08:40.848 INFO (MainThread) [music_assistant] Loaded player provider Airplay 2024-03-21 22:08:41.240 INFO (MainThread) [music_assistant] Loaded music provider YouTube Music 2024-03-21 22:08:41.425 INFO (MainThread) [music_assistant] Loaded player provider Home Assistant MediaPlayers 2024-03-21 22:08:41.463 INFO (MainThread) [music_assistant.players] Player registered: media_player.lg_webos_smart_tv/Living Room LG TV 2024-03-21 22:08:41.539 INFO (MainThread) [music_assistant] Loaded music provider Plex Media Server Library 2024-03-21 22:08:42.108 INFO (MainThread) [music_assistant.music] Sync task for YouTube Music completed 2024-03-21 22:08:42.460 INFO (MainThread) [music_assistant.players] Player registered: 4c445bb1-912c-0195-334f-e25390b581f3/VIZIOCastDisplay6093 2024-03-21 22:08:42.553 INFO (MainThread) [music_assistant.players] Player registered: 89a51bb3-f387-5690-1753-e34d4647d85a/Theater Room speaker 2024-03-21 22:08:42.727 INFO (MainThread) [music_assistant.players] Player registered: uuid:cd0d3456-e74c-0f3e-b3ae-d9963b2d50b2/[LG] webOS TV OLED65B2PUA 2024-03-21 22:08:42.828 WARNING (MainThread) [music_assistant.music] Sync task for Plex Media Server Library completed with errors 2024-03-21 22:08:43.049 INFO (MainThread) [music_assistant.players] Player registered: uuid:5f9ec1b3-ff59-19bb-8530-0005cd904099/Denon AVR-X1300W 2024-03-21 22:08:44.328 INFO (MainThread) [music_assistant.providers.snapcast] Started connection to Snapserver 127.0.0.1:1705 2024-03-21 22:08:44.328 INFO (MainThread) [music_assistant] Loaded player provider Snapcast 2024-03-21 22:08:44.329 INFO (MainThread) [music_assistant.players] Player registered: 7708654e-df36-49cb-9031-62887942fdaf/Snapweb client 2024-03-21 22:08:46.591 INFO (MainThread) [music_assistant.players] Player registered: ap0005cd904099/Denon AVR-X1300W 2024-03-21 22:09:07.219 ERROR (MainThread) [music_assistant.providers.dlna] Error during call cmd_stop: 'Error during async_call(), action: Stop, status: 500, upnp error: 701 (Transition not available)' 2024-03-21 22:09:24.672 ERROR (MainThread) [music_assistant.providers.dlna] Error during call play_media: '("UpnpConnectionTimeoutError(\'TimeoutError()\', None)", None)' 2024-03-21 22:09:27.674 INFO (MainThread) [music_assistant.streams] Start Queue Flow stream for Queue Living Room - crossfade: False 2024-03-21 22:10:22.761 INFO (MainThread) [music_assistant] Loaded player provider Chromecast

fin05 commented 6 months ago

So oddly enough Chromecast worked - I rebooted all my receivers and speakers and router again then flushed my cache again and now it seems to be working ? Ill test it some more and let you know if there are any more issues? I appreciate the time

OzGav commented 6 months ago

Ok great. In the future if you are asked to supply logs please ATTACH them you are pasting them and that is no good for us.