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

Failed to load config #2

Open
Paloik opened this issue Dec 1, 2024 · 8 comments
Open

Failed to load config #2

Paloik opened this issue Dec 1, 2024 · 8 comments

Comments

@Paloik
Copy link

Paloik commented Dec 1, 2024

Hej, i just tried to get startzet with your app, but straight after the beginning i get the error that some required values are missing,...

`$ sudo docker run --rm ghcr.io/zibbp/spotify-playlist-sync tidal --save-missing-tracks --save-tidal-playlist

$$= FTL Failed to load config error="failed to load config: SpotifyClientId: missing required value: SPOTIFY_CLIENT_ID"`

I already filled the _CLIENT_ID and _CLIENT_SECRET into compose.yml

`. . .

environment:
- TZ=Germany/Berlin
- DEBUG=true
- SPOTIFY_CLIENT_ID=43c36aXXXXXXXXXXXXXXXXa8dbca7dd2
- SPOTIFY_CLIENT_SECRET=9a9438eXXXXXXXXXXXXXXXXb171ec2af
- SPOTIFY_CLIENT_REDIRECT_URI=http://localhost:28542/callback
- TIDAL_CLIENT_ID=nwE4XXXXXXXX4hE0
- TIDAL_CLIENT_SECRET=SmuclY7TeujXXXXXXXXXXXXXXXXXbmIjTErsYqMbtqg=

(...)`

Did i do something wrong?

I tried to hard code it in /config/config.go for testing but still get the same error message

@Zibbp
Copy link
Owner

Zibbp commented Dec 3, 2024

I see you're using docker run... but you say you have the environment variables populated in a compose file. You'll need to use the compose version of run then like docker compose run spotify-playlist-convert --save-missing-tracks --save-tidal-playlist

@Paloik
Copy link
Author

Paloik commented Dec 3, 2024

I see you're using docker run... but you say you have the environment variables populated in a compose file. You'll need to use the compose version of run then like docker compose run spotify-playlist-convert --save-missing-tracks --save-tidal-playlist

ah, thanks. I'm completely new with docker :-)

SO, i was running it now with your mentioned commands. Now i get an error by the "spotify-playlist-convert"

sudo docker compose run spotify-playlist-convert --save-missing-tracks --save-tidal-playlist
[+] Creating 1/1
✔ Network spotify-playlist-sync-100_default Created 0.1s
[+] Running 1/1
✘ spotify-playlist-convert Error Head "https://ghcr.io/v2/zibbp/spotify-playlist-convert/manifests/latest": denied 0.5s
Error response from daemon: Head "https://ghcr.io/v2/zibbp/spotify-playlist-convert/manifests/latest": denied user@notebook:~/Musik/spotify-playlist-sync-1.0.0$

the squirrel feeds itself arduously :-D

Any suggestion?

@Zibbp
Copy link
Owner

Zibbp commented Dec 3, 2024

Strange that the image is being denied, it's a public image so it should just work. You don't have any networking issues on your host? Are you using the compose.yml I provided in the repository? If you are, try a docker compose up.

@Paloik
Copy link
Author

Paloik commented Dec 3, 2024

Yes, i used your compose.yml. This is the file content

services:
spotify-playlist-convert:
image: ghcr.io/zibbp/spotify-playlist-convert:latest
volumes:
- ./data:/data
ports:
- 28542:28542 # required for oauth callback
environment:
- TZ=Germany/Berlin
- DEBUG=true
- SPOTIFY_CLIENT_ID=43c36aXXXXXXXXXXXXXXXXa8dbca7dd2
- SPOTIFY_CLIENT_SECRET=9a9438eXXXXXXXXXXXXXXXXb171ec2af
- SPOTIFY_CLIENT_REDIRECT_URI=http://localhost:28542/callback
- TIDAL_CLIENT_ID=nwE4XXXXXXXX4hE0
- TIDAL_CLIENT_SECRET==SmuclY7TeujXXXXXXXXXXXXXXXXXbmIjTErsYqMbtqg=
command: tidal --save-missing-tracks --save-tidal-playlist

With docker compose up i get the same error message.
I will try it on a second device and over an hotspot of my mobile phone.

@Paloik
Copy link
Author

Paloik commented Dec 4, 2024

hm, i tried several configurations, but no success. Second device with a fresh installation of Ubuntu 24.04.1. Connected to the same network with Automatic DNS and manual DNS (Cloudflare). Then connected to my phone-hotspot.

When I'm running docker compose up everytime it ends up with the same error like before :/

✘ spotify-playlist-convert Error Head "https://ghcr.io/v2/zibbp/spotify-playlist-convert/manifests/latest": denied 0.7s
Error response from daemon: Head "https://ghcr.io/v2/zibbp/spotify-playlist-convert/manifests/latest": denied

Is something wrong with my compose.yml? I thought maybe i wrote something wrong for the timezone and changed it back to original ( America/Chicago) but that doen't matter. Is the double equal for TIDAL_CLIENT_SECRET right?

@Zibbp
Copy link
Owner

Zibbp commented Dec 4, 2024

Oh the image is incorrect, try ghcr.io/zibbp/spotify-playlist-sync:latest

@Paloik
Copy link
Author

Paloik commented Dec 4, 2024

Aah, damn. Sorry, my fault! I was handling with the content of the outdated Initial Release ZIP-file.

ok, now the command was working.
Next issue is with the SPOTIFY_REDIRECT_URl.

When I use http://localhost:28542/callback and follow the offered link then i get "INVALID_CLIENT: Invalid redirect URI" from my browser, when I trying it with http://localhost/ then I get "Unable to connect" message.

@Zibbp
Copy link
Owner

Zibbp commented Dec 4, 2024

Is the redirect URI added to the Spotify application?

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

No branches or pull requests

2 participants