Authentication failure with Jellyfin server

Issue description:

Whenever I try to login to my Jellyfin server with Yatse, I get an authentication error. The app says I have an incorrect password. However I’m pretty sure that’s not the case because (1) I’m pasting the password in from the OS clipboard and it works from the Jellyfin app itself, and (2) Jellyfin’s logs show an error server side.

One conjecture is that either Jellyfin changed their authentication protocol and Yatse is using an older one.

While I originally thought that this might be a bug in Jellyfin, the fact that it works on multiple other apps (the website, the official app, and the Gelli 3rd party app), I’m pretty sure it ‘should’ work if the correct auth message is given.

Logs:

Yatse when attempting to authenticate:

2021-03-25 01:21:50.557 Verbose/MainInstance: initialize: enchilada/OnePlus6/29/10/ONEPLUS A6003/OnePlus/0/true/false/110/126/3
2021-03-25 01:21:50.559 Verbose/MainInstance: initialize: 10.7.1 (71108180[arm64-v8a,armeabi-v7a,armeabi]) false cf23e97179054b3a
2021-03-25 01:21:50.560 Verbose/MainInstance: Registering screen events!
2021-03-25 01:21:50.560 Verbose/NetworkManager: Network status: Init
2021-03-25 01:21:50.560 Verbose/NetworkManager: Not Wifi Only: Status[true/WIFI/false]
2021-03-25 01:21:50.560 Verbose/DynamicShortcutUtils: Update shortcuts: true / [movies, search, voice_command]
2021-03-25 01:21:50.574 Verbose/NetworkManager: Network status: Resume(0)
2021-03-25 01:21:50.576 Verbose/StatusObserver: UI status changed to true from false
2021-03-25 01:21:50.577 Verbose/NetworkManager: Not Wifi Only: Status[true/WIFI/false]
2021-03-25 01:21:50.594 Verbose/StatusObserver: UI status changed to false from true
2021-03-25 01:21:50.634 Verbose/StartActivity: Handling #Intent;launchFlags=0x14000000;component=org.leetzone.android.yatsewidgetfree/org.leetzone.android.yatsewidget.ui.activity.StartActivity;end RemoteNavigationDestination true
2021-03-25 01:21:50.691 Verbose/StatusObserver: UI status changed to true from false
2021-03-25 01:21:50.692 Verbose/NetworkManager: Network status: Resume(0)
2021-03-25 01:21:50.692 Verbose/NetworkManager: Not Wifi Only: Status[true/WIFI/false]
2021-03-25 01:21:50.735 Verbose/MenuFragment: Remote hidden: false/true
2021-03-25 01:22:06.016 Verbose/StatusObserver: UI status changed to false from true
2021-03-25 01:22:06.035 Verbose/QueryBuilder: Query: SELECT hosts._id,hosts.type,hosts.name,hosts.color,hosts.description,hosts.api,hosts.ip,hosts.port_1,hosts.port_2,hosts.port_3,hosts.port_4,hosts.port_5,hosts.login,hosts.password,hosts.mac_address,hosts.wifi_only,hosts.wifi_ssid,hosts.info_1,hosts.info_2,hosts.info_3,hosts.int_param_1,hosts.int_param_2,hosts.int_param_3,hosts.int_param_4,hosts.int_param_5,hosts.string_param_1,hosts.string_param_2,hosts.string_param_3,hosts.string_param_4,hosts.string_param_5,hosts.unique_id,hosts.display_order FROM hosts ORDER BY hosts.display_order ASC, hosts._id ASC ('') [1 in 1.49ms]
2021-03-25 01:22:06.069 Verbose/MenuFragment: Remote hidden: false/true
2021-03-25 01:22:07.711 Verbose/QueryBuilder: Query: COUNT on hosts, count=1 | (hosts.api=?) - 'localandroiddevice' [1.38ms]
2021-03-25 01:22:10.869 Verbose/JellyfinServerLocator: Searching on broadcast /192.168.0.255
2021-03-25 01:22:40.900 Verbose/JellyfinServerLocator: Server discovery timed out waiting for response.
2021-03-25 01:22:55.848 Error/NetworkUtils: Error mac not found for: jelly.leif.pl
2021-03-25 01:22:55.872 Verbose/JellyfinLogger: Caching http://jelly.leif.pl:80/System/Info as http://jelly.leif.pl/System/Info
2021-03-25 01:22:55.876 Verbose/JellyfinLogger: --> [507] GET http://jelly.leif.pl/System/Info
2021-03-25 01:22:56.024 Verbose/JellyfinLogger: Caching http://jelly.leif.pl:80/Users/AuthenticateByName as http://jelly.leif.pl/Users/AuthenticateByName
2021-03-25 01:22:56.112 Error/JellyfinLogger: Error during request: 500 / Error processing request.
2021-03-25 01:22:56.114 Verbose/JellyfinLogger: <-- [507] 401  https://jelly.leif.pl/System/Info (235ms, 25-byte body)
2021-03-25 01:22:56.115 Verbose/JellyfinLogger: <-- [507] Error processing request.
2021-03-25 01:22:56.117 Error/JellyfinLogger: Request Error: 401 [Error processing request.]
2021-03-25 01:23:03.749 Verbose/StartActivity: Unsupported screen: Remote-false-true changing to MediaPagerNavigationDestination(mediaType=Music)
2021-03-25 01:23:03.751 Verbose/StatusObserver: UI status changed to true from false
2021-03-25 01:23:03.752 Verbose/FirebaseManager: Result: T888
2021-03-25 01:23:03.752 Verbose/NetworkManager: Network status: Resume(0)
2021-03-25 01:23:03.752 Verbose/NetworkManager: Not Wifi Only: Status[true/WIFI/false]
2021-03-25 01:23:03.792 Verbose/SyncManager: Checking media sync need: Music (1)
2021-03-25 01:23:03.794 Verbose/QueryBuilder: Query: COUNT on songs, count=0 | (songs.host_id=?) - '1' [1.26ms]
2021-03-25 01:23:03.803 Verbose/QueryBuilder: Query: SELECT albums._id,albums.updated_at,albums.host_id,albums.external_id,albums.external_data,albums.album_label,albums.compilation,albums.date_added,albums.description,albums.display_artist,albums.fanart,albums.genres,albums.offline_status,albums.play_count,albums.rating,albums.sort_title,albums.styles,albums.thumbnail,albums.title,albums.year,albums.last_played,albums.user_rating,albums.is_favorite,albums.source_library,albums.resume_file,albums.duration FROM albums WHERE (albums.host_id=?) ORDER BY albums.date_added DESC, albums.external_id DESC LIMIT 10 ('1') [0 in 2.09ms]
2021-03-25 01:23:03.804 Verbose/QueryBuilder: Query: SELECT albums._id, albums.updated_at, albums.host_id, albums.external_id, albums.external_data, albums.album_label, albums.compilation, albums.date_added, albums.description, albums.display_artist, albums.fanart, albums.genres, albums.offline_status, albums.play_count, albums.rating, albums.sort_title, albums.styles, albums.thumbnail, albums.title, albums.year, albums.last_played, albums.user_rating, albums.is_favorite, albums.source_library, albums.resume_file, albums.duration, albums._id AS _id FROM (SELECT * FROM albums WHERE host_id = 1 ORDER BY play_count ASC LIMIT (SELECT CASE WHEN COUNT(1) > 1 THEN MAX(10, COUNT(1)/4, SUM(CASE WHEN play_count = 0 THEN 1 ELSE 0 END)) ELSE 0 END FROM albums)) AS albums ORDER BY (SUBSTR(albums._id * 13648348558152419269345, LENGTH(albums._id) + 2)) LIMIT 10 ('') [0 in 2.72ms (RAW)]
2021-03-25 01:23:03.804 Verbose/QueryBuilder: Query: SELECT artists._id,artists.updated_at,artists.host_id,artists.external_id,artists.external_data,artists.compilation_only,artists.date_added,artists.date_born,artists.date_died,artists.date_disband,artists.date_formed,artists.description,artists.fanart,artists.genres,artists.instruments,artists.offline_status,artists.play_count,artists.sort_title,artists.styles,artists.thumbnail,artists.title,artists.user_rating,artists.is_favorite,artists.source_library,artists.type,artists.gender FROM artists WHERE (artists.host_id=?) ORDER BY (SUBSTR(artists._id * 54396291425185584384631, LENGTH(artists._id) + 2)) ASC LIMIT 10 ('1') [0 in 2.40ms]
2021-03-25 01:23:03.805 Verbose/QueryBuilder: Query: SELECT albums._id,albums.updated_at,albums.host_id,albums.external_id,albums.external_data,albums.album_label,albums.compilation,albums.date_added,albums.description,albums.display_artist,albums.fanart,albums.genres,albums.offline_status,albums.play_count,albums.rating,albums.sort_title,albums.styles,albums.thumbnail,albums.title,albums.year,albums.last_played,albums.user_rating,albums.is_favorite,albums.source_library,albums.resume_file,albums.duration FROM albums WHERE (albums.host_id=?) ORDER BY (SUBSTR(albums._id * 54396291425185584384631, LENGTH(albums._id) + 2)) ASC LIMIT 10 ('1') [0 in 2.74ms]
2021-03-25 01:23:03.805 Verbose/QueryBuilder: Query: SELECT albums._id,albums.updated_at,albums.host_id,albums.external_id,albums.external_data,albums.album_label,albums.compilation,albums.date_added,albums.description,albums.display_artist,albums.fanart,albums.genres,albums.offline_status,albums.play_count,albums.rating,albums.sort_title,albums.styles,albums.thumbnail,albums.title,albums.year,albums.last_played,albums.user_rating,albums.is_favorite,albums.source_library,albums.resume_file,albums.duration FROM albums WHERE (albums.host_id=?) AND (albums.play_count> 0 OR albums.last_played NOT NULL) ORDER BY albums.last_played DESC, albums.date_added DESC, albums.external_id DESC LIMIT 10 ('1') [0 in 1.77ms]
2021-03-25 01:23:03.835 Verbose/MenuFragment: Remote hidden: false/true
2021-03-25 01:23:03.845 Verbose/QueryBuilder: Query: SELECT albums._id,albums.title,albums.external_id,albums.is_favorite,albums.play_count,albums.last_played,albums.year,albums.rating,albums.user_rating,albums.sort_title,albums.resume_file,albums.offline_status,albums.display_artist,albums.thumbnail,albums.genres FROM albums WHERE (albums.host_id=?) ORDER BY albums.is_favorite DESC, CASE WHEN CAST(albums.sort_title AS INTEGER) = 0 THEN 100000000 ELSE CAST(albums.sort_title AS INTEGER) END ASC, albums.sort_title ASC ('1') [0 in 0.53ms]

Relevant Jellyfin logs:

Mar 25 14:50:47 nixos jellyfin[23604]: [14:50:47] [ERR] [28] Emby.Server.Implementations.HttpServer.HttpListenerHost: Could not find handler for /emby
Mar 25 14:50:47 nixos jellyfin[23604]: [14:50:47] [ERR] [28] Emby.Server.Implementations.HttpServer.HttpListenerHost: Error processing request: Unable to find the specified file. URL: http://jelly.leif.pl/emby
Mar 25 14:50:47 nixos jellyfin[23604]: [14:50:47] [ERR] [43] Emby.Server.Implementations.HttpServer.HttpListenerHost: Error processing request: Access token is required. URL: http://jelly.leif.pl/System/Info
Mar 25 14:50:47 nixos jellyfin[23604]: [14:50:47] [ERR] [43] Emby.Server.Implementations.HttpServer.HttpListenerHost: Error processing request. URL: http://jelly.leif.pl/Users/AuthenticateByName
Mar 25 14:50:47 nixos jellyfin[23604]: System.FormatException: Input string was not in a correct format.
Mar 25 14:50:47 nixos jellyfin[23604]:    at ServiceStack.Text.DefaultMemory.ParseGeneralStyleGuid(ReadOnlySpan`1 value, Int32& len) in C:\BuildAgent\work\912418dcce86a188\src\ServiceStack.Text\DefaultMemory.cs:line 629
Mar 25 14:50:47 nixos jellyfin[23604]:    at ServiceStack.Text.DefaultMemory.ParseGuid(ReadOnlySpan`1 value) in C:\BuildAgent\work\912418dcce86a188\src\ServiceStack.Text\DefaultMemory.cs:line 414
Mar 25 14:50:47 nixos jellyfin[23604]:    at ServiceStack.Text.Common.DeserializeBuiltin`1.<>c.<GetParseStringSpanFn>b__7_6(ReadOnlySpan`1 value) in C:\BuildAgent\work\912418dcce86a188\src\ServiceStack.Text\Common\DeserializeBuiltin.cs:line 72
Mar 25 14:50:47 nixos jellyfin[23604]:    at ServiceStack.Text.Jsv.JsvReader.<>c__DisplayClass2_0.<GetParseFn>b__0(String v) in C:\BuildAgent\work\912418dcce86a188\src\ServiceStack.Text\Jsv\JsvReader.Generic.cs:line 18
Mar 25 14:50:47 nixos jellyfin[23604]:    at Emby.Server.Implementations.Services.StringMapTypeDeserializer.PopulateFromMap(Object instance, IDictionary`2 keyValuePairs)
Mar 25 14:50:47 nixos jellyfin[23604]:    at Emby.Server.Implementations.Services.RestPath.CreateRequest(String pathInfo, Dictionary`2 queryStringAndFormData, Object fromInstance)
Mar 25 14:50:47 nixos jellyfin[23604]:    at Emby.Server.Implementations.Services.ServiceHandler.CreateRequest(IRequest httpReq, RestPath restPath, Dictionary`2 requestParams, Object requestDto)
Mar 25 14:50:47 nixos jellyfin[23604]:    at Emby.Server.Implementations.Services.ServiceHandler.CreateRequest(HttpListenerHost host, IRequest httpReq, RestPath restPath, ILogger logger)
Mar 25 14:50:47 nixos jellyfin[23604]:    at Emby.Server.Implementations.Services.ServiceHandler.ProcessRequestAsync(HttpListenerHost httpHost, IRequest httpReq, HttpResponse httpRes, ILogger logger, CancellationToken cancellationToken)
Mar 25 14:50:47 nixos jellyfin[23604]:    at Emby.Server.Implementations.HttpServer.HttpListenerHost.RequestHandler(IHttpRequest httpReq, String urlString, String host, String localPath, CancellationToken cancellationToken)
Mar 25 14:50:47 nixos jellyfin[23604]: [14:50:47] [DBG] [43] Emby.Server.Implementations.HttpServer.HttpListenerHost: Sending HTTP Response 500 in response to http://jelly.leif.pl/Users/AuthenticateByName

Additional information:

I am using the latest version of Yatse on the google play store (10.7.1), and Jellyfin 10.6.4.

Not aware of any change on Jellyfin side and still works for many many users.

Only possibility is your password that contains some special character that should be encoded even if it’s not documented.

Can you share your exact password in private so I can try to reproduce?

I’d be willing to sure. Although I still get the error with pure alphanumeric passwords.

Anyway, sending account credentials now.

Okay sent. Let me know if you didn’t get it.

Answered by PM, but you enter the wrong port for Jellyfin your server is https only so the port is 443 not 80.

Post data is lost on redirect for security reasons, so authentication never reaches your server.