Closed sprtm closed 3 years ago
You're a little backwards on how it works, but that's ok. There's some room for improvement in those error messages.
Anytime you authenticate to the server with a user, it will give you an authentication token. You don't need a separate API token from the server outside of that. What the error is saying that mopidy has failed to reach the server for some reason, so it hasn't been able to receive that authentication token.
What does your config file for mopidy look like? As an example, this is mine right now:
[jellyfin]
hostname = http://192.168.0.200:8096
username = Matt
password = mysuperawesomepassword
libraries = Music
watched_status = True
Aha, I understand. This is how my Mopidy conf looks:
[jellyfin]
hostname = http://10.0.1.4:8096
username = myusername
password = mypassword
I tried with and without http, and also changed the password, to no avail.
Maybe I should add this, this is what's displayed before the error messages:
INFO 2020-09-03 18:47:10,675 [53990:MainThread] mopidy_jellyfin.http
Jellyfin connection on try 0 with problem: Expecting value: line 1 column 1 (char 0)
INFO 2020-09-03 18:47:10,678 [53990:MainThread] mopidy_jellyfin.http
Jellyfin connection on try 1 with problem: Expecting value: line 1 column 1 (char 0)
INFO 2020-09-03 18:47:10,681 [53990:MainThread] mopidy_jellyfin.http
Jellyfin connection on try 2 with problem: Expecting value: line 1 column 1 (char 0)
INFO 2020-09-03 18:47:10,684 [53990:MainThread] mopidy_jellyfin.http
Jellyfin connection on try 3 with problem: Expecting value: line 1 column 1 (char 0)
INFO 2020-09-03 18:47:10,688 [53990:MainThread] mopidy_jellyfin.http
Jellyfin connection on try 4 with problem: Expecting value: line 1 column 1 (char 0)
INFO 2020-09-03 18:47:10,691 [53990:MainThread] mopidy_jellyfin.http
Jellyfin connection on try 5 with problem: Expecting value: line 1 column 1 (char 0)
And right now I discovered several of these in the Jellyfin log:
[2020-09-03 18:55:39.456 +02:00] [ERR] [32] Emby.Server.Implementations.HttpServer.HttpListenerHost: Could not find handler for "/jellyfin/web/index.html/Users/AuthenticateByName"
[2020-09-03 18:55:39.456 +02:00] [ERR] [32] Emby.Server.Implementations.HttpServer.HttpListenerHost: Error processing request: "Unable to find the specified file". URL: "http://10.0.1.4:8096/jellyfin/web/index.html/Users/AuthenticateByName?format=json"
That's expected. If it fails to make an api call, it repeats the call a few times to try for a successful response.
You have a baseurl set on your server, don't you? Try hostname = http://10.0.1.4:8096/jellyfin
Yes, progress after I added the baseurl to the hostname. To make things simple I removed the baseurl from Jellyfin, restarted the server, and removed it from the Mopidy conf. It still fails though. Now with this error:
AssertionError: Cannot add URI scheme 'jellyfin' for JellyfinBackend, it is already handled by JellyfinBackend
For some reason the [jellyfin] part showed up twice when running "mopidy config", even though it wasn't double in the conf file itself. Even when the part was removed from the conf file, it showed up when running "mopidy config". After a clean install of Mopidy and mopidy-jellyfin, it now works. Thanks for pointing me in the right direction!
Hello, I don't know if this is bug/issue, or if I'm doing things wrong. When I launch Mopidy it can't connect to Jellyfin. According to the error message no authentication token is found. I know how to generate an API key in Jellyfin, but I don't understand how to provide the key to Mopidy?