Yooooomi / your_spotify

Self hosted Spotify tracking dashboard
GNU General Public License v3.0
2.86k stars 113 forks source link

UncaughtException on login callback when not hosting on localhost #115

Open Lucas-HGB opened 2 years ago

Lucas-HGB commented 2 years ago

Bug: When trying to make a request to /oauth/spotify, an exception is raised. I've attached both the stacktrace and my compose file.

And the allowed address in my spotify spotify dashboard is indeed "http://truenas.local:9080/oauth/spotify/callback".| I have also tried switching to https (both on the yaml uri and also spotify dashboard, same exception occurs)

error.txt docker-compose.txt

Yooooomi commented 2 years ago

Hello! The error you're getting (EAI_AGAIN) is a timeout on a dns request to Spotify.com. If often means connectivity issues or a badly configured proxy. You may want to check this in your device hosting the project. Maybe curl Spotify from within the device. A person had this issue a year ago and it went away few hours later.

PS: I love the way you took time to redact your client secret in the error file but still present in the 20 lines long docker compose file 😄

Lucas-HGB commented 2 years ago

Well that's a little oof, guess i'm recreating the spotify app 😅. Anyways, i'll take a look on the network config of the machine i'm running it on and try again later, Thanks 🙂

Yooooomi commented 2 years ago

Hello, do you have any news on this?

Lucas-HGB commented 2 years ago

Hi there! Actually, yes. I recently tried messing with the configs and got it working with the following setup (on k8s-at-home cluster): MongoDB service running with port 27017 exposed; your_spotify server running on port 9080(cluster):8080(server), API_ENDPOINT=http://truenas.local:9080, CLIENT_ENDPOINT=http://truenas.local:9030; MONGO_ENDPOINT=mongodb://mongo-ix-chart.ix-mongo:27017/your_spotify

Web with ENV API_ENDPOINT=http://truenas.local:9080

In the end, it was a matter of routing all the ports as well as the Mongo instance to the correct namescape on the cluster.

App's awesome, nice work, and thanks for the help! 😁