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.36k stars 52 forks source link

Tracks not updated in media player/errors #2751

Closed awmr2023 closed 1 month ago

awmr2023 commented 2 months ago

What version of Music Assistant has the issue?

2.2.0b5

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

2024.6.2

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

The problem

I have Music assistant installed with Apple Music, and HS media player, playing to my Lenovo tablet as my output device. When I play music through media player on the dashboard, I sometimes get an error saying “web address invalid” then when it dose play it will finish a track and the information don’t update. For the next song same if I skip a track it fails to update the information

How to reproduce

HA dash board running media player with out put set to that tablet.

Music Providers

Apple Music has the issue I haven’t tried any other services as I don’t have any to try

Player Providers

HA media play not tied any others as I don’t have any others

Full log output

Sorry I keep getting a 401 error when trying to download

Additional information

No response

What version of Home Assistant Core are your running

2024.8.1

What type of installation are you running?

Home Assistant OS

On what type of hardware are you running?

Raspberry Pi

OzGav commented 2 months ago

You have something wrong with your setup if the log 401s. Have you tried a different browser? You can try clearing the cache MA SETTINGS>>CORE>>CACHE CONTROLLER. If that fails try a complete reinstall.

awmr2023 commented 2 months ago

@OzGav thanks for the quick reply, this time it seem to work. I have copied it in to a text document and attached it of you want it in a different format let me know

Data log.txt

OzGav commented 2 months ago

@MarvinSchenkel Another log full of Apple Music errors?

MarvinSchenkel commented 2 months ago

There are indeed Apple Music warnings in the log, but does not seem to be related to this issue as far as I can tell. Do you have this issue when you remove Apple Music and just leave the Radio provider?

awmr2023 commented 2 months ago

@MarvinSchenkel i will take a look when I get home and let you know, not sure if it will replicate as you can’t skip tracks but I can see if the information updates.

awmr2023 commented 2 months ago

@MarvinSchenkel , The plot thickens. I uninstalled Apple music as a provider and run the media player on the dashboard using the radio browser. This seems to work fine, it updates the display on the dashboard with the correct song when the song changes. I reinstalled Apple Music and tired again. now i still get the "failed loading sound: wrong URL or Unsupported format" error a few times and it took a good 30 sec to 1 min to start playing. I then tried to skip song and the song information updated for the first skip then after that it just stayed showing the same song but the audio changed. then the wired part i pressed pause and the off switch on the media player. after a few seconds music stared playing. I logged in from another device to look at MA back end and no track was showing as playing. I initiated a track in he back end and the paused it with the hopes this would solve the issue it dint again after a few seconds the music which wasn't my selected track stared playing through the tablet. i removed the player from the dashboard and still the music played in then removed apple music from MA and still the music played in the end i had to reboot the tablet to get it to shut up.

It seems like the Back end is fighting the Media player on the dash board. as it stands for my application its not usable, to put you in the picture of my set up. My HA is in My motor home so a very small system in which we use a Tablet to form a control panel for the whole van. this table is in Kiosk mode so i want a front end dashboard solution to select music and play it through the speakers linked to the tablet. unfortunately i am down the line with apple and don't really want to change to another provider. i thought this may be the solution but i will stick to our current solution and use my phone. however if we can get this to work smoothly it would be a awesome addition to my system, i have added the logs from this evening for your viewing pleasure. Data File.txt

MarvinSchenkel commented 2 months ago

A few more more questions to help me figure this out:

More than happy to help you automate your motor home :-).

OzGav commented 2 months ago

@awmr2023 please see questions above

awmr2023 commented 2 months ago

@MarvinSchenkel Sorry I have been away for a few days.

MarvinSchenkel commented 2 months ago

A home pod mini should be discoverable in MA via Airplay. Make sure the home pod is connected to the wifi and add the 'Airplay provider' in MA under 'Player providers'. Curious to see if the issue also happens there.

awmr2023 commented 2 months ago

Hi Marvin, I had a play last night and was unsuccessful in getting the air play to work It kept saying i needed to have some bit configured in the home app which i cant work out but i will try again tonight. and screen shot if i need to. however i did update MA and it may have solved the issue i seem to be able to play tracks and the payer did keep up and update its self. I am still getting the library error. i will carry on testing over the next few days and report back if playback is resolved. i have attached the latest logs for your information 2024-08-20 082011.070 INFO (MainThr.txt

MarvinSchenkel commented 2 months ago

At least that is great news :-). Assuming you are on the latest beta, also try to reset your library. It seems some inconsistencies have slipped in regarding artists. You can do it via settings > core (engine icon) > music controller > expand advanced settings > hit 'reset library database'

github-actions[bot] commented 2 months ago

This issue is stale because it has been open 21 days with no activity. Comment or this will be closed in 7 days.

awmr2023 commented 2 months ago

Hi @MarvinSchenkel so I carried on testing over the weekend and had mixed results. i think the issue might be when a track hits a "failed to load" track it then fails to update the media player. i have reset the library data base and i will report back

MarvinSchenkel commented 2 months ago

Alrighty, let me know if you find anything interesting. I'm currently away for the holidays so no rush 😉

github-actions[bot] commented 1 month ago

This issue is stale because it has been open 7 days with no activity after asking for more info. Comment or this will be closed in 3 days.

github-actions[bot] commented 1 month ago

This issue was closed because it has been stalled for 10 days with no activity. This can be reopened if additional information is provided.