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

Spotify authentication in MA addon #2788

Closed omriasta closed 3 weeks ago

omriasta commented 3 weeks ago

What version of Music Assistant has the issue?

2.2.1

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

2024.8.2

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

The problem

When authenticating with spotify, the callback times out. The issue is caused because the callback is trying to use the internal IP address of homeassistant even when trying to authenticate remotely. Not sure if there is a way to fix this by using the homeassistant public url?

How to reproduce

Try to access Music Assistant from a different network using the public url of your homeassistant, then try to authenticate with spotify, it will fail after a while with a timeout. The only thing that gave me a clue was the browser window that opened to authenticate spotify eventually timed out stating it got no response from https://192.168.XX.XX....... Then tried to authenticate locally on the same network as my homeassistant install and it completed successfully.

Music Providers

Spotify

Player Providers

No players are affected

Full log output

No response

Additional information

No response

What version of Home Assistant Core are your running

2024.8.2

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 3 weeks ago

No sorry. We are in the process of updating the docs. You must do this locally and not be behind a VPN