Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'Please call connect first' error requires reauthification with home assistant systematically #3512

Open
1 task done
gribouk opened this issue Jan 28, 2025 · 4 comments
Open
1 task done
Labels

Comments

@gribouk
Copy link

gribouk commented Jan 28, 2025

What version of Music Assistant has the issue?

2.3.6

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

  • Yes

The problem

I can use music assistant for some time after reauthification with home assistant. At some point, sometimes after docker restarted, I discover that I cannot play music through HA players and the error from the title returned. It takes me to reauthificate with HA again and save for MA to restart working again. It creates long lived tokens each time, which is suppossed to provide access for years, not days! And in a few weeks it repeats all over again...

How to reproduce

Reproducing is cumbersome as it is not clear why exactly it looses access to the HA. Most frequently, but not always, it was in the vicinity of containers manual restart or rebuild, which is common practice on container update...

Music Providers

Local Storage, Radio Sttions ...

Player Providers

Home Assistant

Full log output

musicassistant.log

Additional information

none

What version of Home Assistant Core are your running

2024.1.2

What type of installation are you running?

Home Assistant Container

On what type of hardware are you running?

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

@gribouk gribouk added the triage label Jan 28, 2025
@OzGav
Copy link
Contributor

OzGav commented Jan 28, 2025

Can you provide more detail about exactly how you have installed HA and MA

@gribouk
Copy link
Author

gribouk commented Jan 28, 2025

They are both running docker containers on same machine.

docker run -d --name music_assistant_zajas --restart=unless-stopped -v music_assistant_zajas:/data --network host --cap-add=DAC_READ_SEARCH --cap-add=SYS_ADMIN --security-opt apparmor:unconfined ghcr.io/music-assistant/server

docker run -d --name homeassistant5 --restart=unless-stopped -v /var/lib/mpd/music:/music -v /homeassistant5:/config -v /etc/localtime:/etc/localtime:ro --network=host homeassistant/home-assistant:stable

home assistant is on port 8127 as it is 5th instance of HA on this machine.

Then I have changed the ports for streaming and http servers of MA in the settings as I run several MA for each member of the
family individually.

And I have started nginx proxy manager to access instances of HA and MA by domains recently, but this definetely has nothing to do with the issue, since the problem was there since December, before I have done this.

@gribouk
Copy link
Author

gribouk commented Jan 28, 2025

P.S. I have been removing and re running the containers for HA for some time today to see if it is really related, but at the moment it had no effect on the connectivity. It is somehow related to the time - if the auth is a week or so old, then I see that error which can only be resolved through the reauthification... Just by the age of the long lived tokens I can assess the frequency: I have todays, few from last week, and another set from 3 weeks ago - these are that I have not removed yet. So I guess, it is ~10 days interval

@OzGav
Copy link
Contributor

OzGav commented Jan 29, 2025

We have never seen this type of report before so continue to investigate your end until this can be looked at further.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants