0xf4b1 / traktor-streaming-proxy

Allow Traktor DJ to stream music from YouTube, Spotify, and Tidal by faking Beatport's API
Other
37 stars 2 forks source link

Error relating to Tidal when trying to use with Spotify #12

Closed radusuciu closed 1 year ago

radusuciu commented 1 year ago

Hi, great project!

I'm having some trouble getting it running, potentially due to this error:

Exception in thread "main" java.lang.NullPointerException: prop.getProperty("tidal.clientId") must not be null
   at sources.Tidal.<init>(Tidal.kt:15)
   at MainKt.main(Main.kt:74)
   at MainKt.main(Main.kt)

Do I have to have a Tidal account even if I don't intend to use it as a source? Spotify auth seems to go work once spotify.username and spotify.password are added to config.properties but when I attempt to curl the server nginx returns a 502 Bad Gateway as if the reverse proxied endpoint isn't accepting requests at port 8000.

I'm running this with docker compose, after generating certs with the provided script. Here is my compose file:

services:
  traktor:
    image: ghcr.io/0xf4b1/traktor-streaming-proxy:v0.3-amd64
    volumes:
      - ./server.crt:/app/cert/server.crt
      - ./server.key:/app/cert/server.key
      - ./config.properties:/app/config.properties
    ports:
      - "443:443"
    init: true

Note that the tag is necessary because latest points to the arm release.

0xf4b1 commented 1 year ago

Hey, thank you! No, you don't need a Tidal account if you don't want to use it as source. You are right, in the recent docker containers , the server gets stuck when any source cannot load an expected property value. I've added a skip for sources that cannot be initialized in the server but should probably also add an option to enable and disable sources.

For now, without rebuilding you can set some dummy values in the config.properties but you shouldn't try to use tidal and the search will be also broken because it also tries to use tidal.

tidal.countryCode=foo
tidal.userId=1337
tidal.clientId=foo
tidal.accessToken=foo
tidal.refreshToken=foo
radusuciu commented 1 year ago

Awesome, thank you! I'll give it a shot later this evening

radusuciu commented 1 year ago

I can confirm that the server starts up fine with the dummy config values. Thanks!