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

API endpoint Issue #93

Open
ForsakenTwilight opened this issue Dec 15, 2023 · 9 comments
Open

API endpoint Issue #93

ForsakenTwilight opened this issue Dec 15, 2023 · 9 comments

Comments

@ForsakenTwilight
Copy link

ForsakenTwilight commented Dec 15, 2023

I was following the guide to setup API endpoint, but it seems to have an issue for some reason, Please see this screenshot of my jellyfin server API endpoint: https://i.imgur.com/XP7lK73.png

I believe I set it up correct, now what happens is if i try to test it as the guide suggests using (http://172.17.0.3:8096)
I'll get the usual "can't reach this page" error when testing with http://172.17.0.3:8096/AniSync/apiUrlTest
I have also created MAL api ID and secret, but when i try to test the authentication it also fails, which is how i know my API endpoint is not working.

Any help would be appreciated

Logs

Please let me know if these logs are enough or if i should recreate the issue again

text  error  warn  system  array  login  

   at Swashbuckle.AspNetCore.ReDoc.ReDocMiddleware.Invoke(HttpContext httpContext)
   at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext)
   at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at Jellyfin.Server.Middleware.RobotsRedirectionMiddleware.Invoke(HttpContext httpContext)
   at Jellyfin.Server.Middleware.LegacyEmbyRouteRewriteMiddleware.Invoke(HttpContext httpContext)
   at Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMiddleware.InvokeCore(HttpContext context)
   at Jellyfin.Server.Middleware.ResponseTimeMiddleware.Invoke(HttpContext context, IServerConfigurationManager serverConfigurationManager)
   at Jellyfin.Server.Middleware.ExceptionMiddleware.Invoke(HttpContext context)
[03:42:41] [ERR] [54] Jellyfin.Server.Middleware.ExceptionMiddleware: Error processing request. URL GET /AniSync/user.
System.ArgumentNullException: Value cannot be null. (Parameter 'source')
   at System.Linq.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
   at System.Linq.Enumerable.TryGetFirst[TSource](IEnumerable`1 source, Func`2 predicate, Boolean& found)
   at jellyfin_ani_sync.Api.AuthApiCall.AuthenticatedApiCall(ApiName provider, CallType callType, String url, FormUrlEncodedContent formUrlEncodedContent, StringContent stringContent)
   at jellyfin_ani_sync.Api.MalApiCalls.GetUserInformation()
   at jellyfin_ani_sync.Api.AniSyncController.GetUser(ApiName apiName, String userId)
   at lambda_method1125(Closure , Object )
   at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
   at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
   at Jellyfin.Server.Middleware.ServerStartupMessageMiddleware.Invoke(HttpContext httpContext, IServerApplicationHost serverApplicationHost, ILocalizationManager localizationManager)
   at Jellyfin.Server.Middleware.WebSocketHandlerMiddleware.Invoke(HttpContext httpContext, IWebSocketManager webSocketManager)
   at Jellyfin.Server.Middleware.IpBasedAccessValidationMiddleware.Invoke(HttpContext httpContext, INetworkManager networkManager)
   at Jellyfin.Server.Middleware.LanFilteringMiddleware.Invoke(HttpContext httpContext, INetworkManager networkManager, IServerConfigurationManager serverConfigurationManager)
   at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
   at Jellyfin.Server.Middleware.QueryStringDecodingMiddleware.Invoke(HttpContext httpContext)
   at Swashbuckle.AspNetCore.ReDoc.ReDocMiddleware.Invoke(HttpContext httpContext)
   at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext)
   at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at Jellyfin.Server.Middleware.RobotsRedirectionMiddleware.Invoke(HttpContext httpContext)
   at Jellyfin.Server.Middleware.LegacyEmbyRouteRewriteMiddleware.Invoke(HttpContext httpContext)
   at Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMiddleware.InvokeCore(HttpContext context)
   at Jellyfin.Server.Middleware.ResponseTimeMiddleware.Invoke(HttpContext context, IServerConfigurationManager serverConfigurationManager)
   at Jellyfin.Server.Middleware.ExceptionMiddleware.Invoke(HttpContext context)
[03:43:29] [INF] [56] jellyfin_ani_sync.Api.MalApiCalls: Getting user anime list (GET https://api.myanimelist.net/v2/users/@me/animelist?fields=list_status%2Cnum_episodes&status=watching)...
[03:43:29] [ERR] [56] Jellyfin.Server.Middleware.ExceptionMiddleware: Error processing request. URL POST /AniSync/sync.
System.ArgumentNullException: Value cannot be null. (Parameter 'source')
   at System.Linq.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
   at System.Linq.Enumerable.TryGetFirst[TSource](IEnumerable`1 source, Func`2 predicate, Boolean& found)
   at jellyfin_ani_sync.Api.AuthApiCall.AuthenticatedApiCall(ApiName provider, CallType callType, String url, FormUrlEncodedContent formUrlEncodedContent, StringContent stringContent)
   at jellyfin_ani_sync.Api.MalApiCalls.GetUserAnimeList(Nullable`1 status, Nullable`1 sort, Nullable`1 idSearch)
   at jellyfin_ani_sync.Helpers.ApiCallHelpers.GetAnimeList(Status status, Nullable`1 userId)
   at jellyfin_ani_sync.Sync.GetAnimeList(String userId)
   at jellyfin_ani_sync.Sync.SyncFromProvider(String userId)
   at lambda_method1133(Closure , Object )
   at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
   at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
   at Jellyfin.Server.Middleware.ServerStartupMessageMiddleware.Invoke(HttpContext httpContext, IServerApplicationHost serverApplicationHost, ILocalizationManager localizationManager)
   at Jellyfin.Server.Middleware.WebSocketHandlerMiddleware.Invoke(HttpContext httpContext, IWebSocketManager webSocketManager)
   at Jellyfin.Server.Middleware.IpBasedAccessValidationMiddleware.Invoke(HttpContext httpContext, INetworkManager networkManager)
   at Jellyfin.Server.Middleware.LanFilteringMiddleware.Invoke(HttpContext httpContext, INetworkManager networkManager, IServerConfigurationManager serverConfigurationManager)
   at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
   at Jellyfin.Server.Middleware.QueryStringDecodingMiddleware.Invoke(HttpContext httpContext)
   at Swashbuckle.AspNetCore.ReDoc.ReDocMiddleware.Invoke(HttpContext httpContext)
   at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext)
   at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at Jellyfin.Server.Middleware.RobotsRedirectionMiddleware.Invoke(HttpContext httpContext)
   at Jellyfin.Server.Middleware.LegacyEmbyRouteRewriteMiddleware.Invoke(HttpContext httpContext)
   at Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMiddleware.InvokeCore(HttpContext context)
   at Jellyfin.Server.Middleware.ResponseTimeMiddleware.Invoke(HttpContext context, IServerConfigurationManager serverConfigurationManager)
   at Jellyfin.Server.Middleware.ExceptionMiddleware.Invoke(HttpContext context)
[03:44:57] [INF] [73] Emby.Server.Implementations.Session.SessionWebSocketListener: Sending ForceKeepAlive message to 1 inactive WebSockets.
[03:45:09] [INF] [72] Emby.Server.Implementations.Session.SessionWebSocketListener: Lost 1 WebSockets.`

To Reproduce
Steps to reproduce the behavior:
-use api endpoint http://172.17.0.3:8096
-test with "url/AniSync/apiUrlTest"

Expected behavior
it should show a message as the guide suggests

Screenshots
https://i.imgur.com/ZOfKaLd.png
https://i.imgur.com/XP7lK73.png

Desktop (please complete the following information):

  • Edge/Firefox/OperaGX
  • Jellyfin version 10.8.13
  • Plugin version 2.9

Additional context
I am using this in my UnraidOS server

@ForsakenTwilight
Copy link
Author

new logs that i think shows more stuff

[15:16:28] [ERR] [184] Jellyfin.Server.Middleware.ExceptionMiddleware: Error processing request: Token is required. URL GET /socket. [15:16:29] [ERR] [62] Jellyfin.Server.Middleware.ExceptionMiddleware: Error processing request: Token is required. URL GET /socket. [15:16:30] [ERR] [62] Jellyfin.Server.Middleware.ExceptionMiddleware: Error processing request: Token is required. URL GET /socket. [15:16:31] [ERR] [188] Jellyfin.Server.Middleware.ExceptionMiddleware: Error processing request: Token is required. URL GET /socket. [15:17:10] [ERR] [189] Jellyfin.Server.Middleware.ExceptionMiddleware: Error processing request: Token is required. URL GET /socket. [15:17:12] [ERR] [88] Jellyfin.Server.Middleware.ExceptionMiddleware: Error processing request: Token is required. URL GET /socket. [15:17:12] [INF] [186] Jellyfin.Api.Helpers.MediaInfoHelper: User policy for asmodeus2. EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True [15:17:12] [INF] [186] Jellyfin.Api.Helpers.MediaInfoHelper: StreamBuilder.BuildVideoItem( Profile=Anonymous Profile, Path=/Media/M+/Scat/Pornolab/FilthySkye/FilthySkye_93.mp4, AudioStreamIndex=1, SubtitleStreamIndex=-1 ) => ( PlayMethod=DirectPlay, TranscodeReason=0 ) media:/videos/fbbe1f2c-8400-7e2c-9444-cbab623ce31b/stream.mp4?MediaSourceId=fbbe1f2c84007e2c9444cbab623ce31b&Static=true&VideoCodec=h264&AudioCodec=mp3&AudioStreamIndex=1&api_key=<token>&SubtitleMethod=Encode&Tag=231b2e22f8dc3283b4283779001e1a8a [15:17:13] [ERR] [103] Jellyfin.Server.Middleware.ExceptionMiddleware: Error processing request: Token is required. URL GET /socket. [15:17:15] [ERR] [20] Jellyfin.Server.Middleware.ExceptionMiddleware: Error processing request: Token is required. URL GET /socket. [15:17:16] [ERR] [43] Jellyfin.Server.Middleware.ExceptionMiddleware: Error processing request: Token is required. URL GET /socket. [15:17:17] [ERR] [36] Jellyfin.Server.Middleware.ExceptionMiddleware: Error processing request: Token is required. URL GET /socket. [15:17:18] [ERR] [36] Jellyfin.Server.Middleware.ExceptionMiddleware: Error processing request: Token is required. URL GET /socket. [15:17:28] [ERR] [36] Jellyfin.Server.Middleware.ExceptionMiddleware: Error processing request: Token is required. URL GET /socket. [15:17:29] [INF] [88] Jellyfin.Api.Helpers.MediaInfoHelper: User policy for asmodeus2. EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True [15:17:29] [INF] [88] Jellyfin.Api.Helpers.MediaInfoHelper: StreamBuilder.BuildVideoItem( Profile=Anonymous Profile, Path=/Media/M+/Scat/Pornolab/FilthySkye/FilthySkye_94.mp4, AudioStreamIndex=1, SubtitleStreamIndex=-1 ) => ( PlayMethod=DirectPlay, TranscodeReason=0 ) media:/videos/5b779c0a-647b-0b27-45c4-c2f709ee1b91/stream.mp4?MediaSourceId=5b779c0a647b0b2745c4c2f709ee1b91&Static=true&VideoCodec=h264&AudioCodec=mp3&AudioStreamIndex=1&api_key=<token>&SubtitleMethod=Encode&Tag=864ad0d12860e49c7f1090c61f3f438f [15:17:29] [ERR] [20] Jellyfin.Server.Middleware.ExceptionMiddleware: Error processing request: Token is required. URL GET /socket. [15:17:30] [ERR] [62] Jellyfin.Server.Middleware.ExceptionMiddleware: Error processing request: Token is required. URL GET /socket. [15:17:31] [ERR] [62] Jellyfin.Server.Middleware.ExceptionMiddleware: Error processing request: Token is required. URL GET /socket. [15:17:32] [ERR] [123] Jellyfin.Server.Middleware.ExceptionMiddleware: Error processing request: Token is required. URL GET /socket. [15:17:33] [ERR] [103] Jellyfin.Server.Middleware.ExceptionMiddleware: Error processing request: Token is required. URL GET /socket. [15:17:34] [ERR] [64] Jellyfin.Server.Middleware.ExceptionMiddleware: Error processing request: Token is required. URL GET /socket. [15:18:01] [ERR] [189] Jellyfin.Server.Middleware.ExceptionMiddleware: Error processing request: Token is required. URL GET /socket. [15:18:02] [INF] [62] Jellyfin.Api.Helpers.MediaInfoHelper: User policy for asmodeus2. EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True [15:18:02] [INF] [62] Jellyfin.Api.Helpers.MediaInfoHelper: StreamBuilder.BuildVideoItem( Profile=Anonymous Profile, Path=/Media/M+/Scat/Pornolab/FilthySkye/FilthySkye_105.mp4, AudioStreamIndex=1, SubtitleStreamIndex=-1 ) => ( PlayMethod=DirectPlay, TranscodeReason=0 ) media:/videos/16d34dd3-cf98-a812-1e70-65930ca10368/stream.mp4?MediaSourceId=16d34dd3cf98a8121e7065930ca10368&Static=true&VideoCodec=h264&AudioCodec=mp3&AudioStreamIndex=1&api_key=<token>&SubtitleMethod=Encode&Tag=27cc541ca336f3849d5a974e6f4464da [15:18:02] [ERR] [64] Jellyfin.Server.Middleware.ExceptionMiddleware: Error processing request: Token is required. URL GET /socket. [15:18:03] [ERR] [186] Jellyfin.Server.Middleware.ExceptionMiddleware: Error processing request: Token is required. URL GET /socket. [15:18:04] [ERR] [62] Jellyfin.Server.Middleware.ExceptionMiddleware: Error processing request: Token is required. URL GET /socket. [15:18:05] [ERR] [186] Jellyfin.Server.Middleware.ExceptionMiddleware: Error processing request: Token is required. URL GET /socket. [15:18:06] [ERR] [123] Jellyfin.Server.Middleware.ExceptionMiddleware: Error processing request: Token is required. URL GET /socket. [15:18:07] [ERR] [123] Jellyfin.Server.Middleware.ExceptionMiddleware: Error processing request: Token is required. URL GET /socket. [15:19:27] [ERR] [36] Jellyfin.Server.Middleware.ExceptionMiddleware: Error processing request: Token is required. URL GET /socket. [15:19:29] [INF] [88] Jellyfin.Api.Helpers.MediaInfoHelper: User policy for asmodeus2. EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True [15:19:29] [INF] [88] Jellyfin.Api.Helpers.MediaInfoHelper: StreamBuilder.BuildVideoItem( Profile=Anonymous Profile, Path=/Media/M+/Scat/Pornolab/FilthySkye/FilthySkye_124.mp4, AudioStreamIndex=1, SubtitleStreamIndex=-1 ) => ( PlayMethod=DirectPlay, TranscodeReason=0 ) media:/videos/908b9c8b-937b-7152-757a-2736a5f6c1c1/stream.mp4?MediaSourceId=908b9c8b937b7152757a2736a5f6c1c1&Static=true&VideoCodec=h264&AudioCodec=mp3&AudioStreamIndex=1&api_key=<token>&SubtitleMethod=Encode&Tag=79bd5202ee566c2a9d8159d974b8c025 [15:19:29] [ERR] [36] Jellyfin.Server.Middleware.ExceptionMiddleware: Error processing request: Token is required. URL GET /socket. [15:19:30] [ERR] [168] Jellyfin.Server.Middleware.ExceptionMiddleware: Error processing request: Token is required. URL GET /socket. [15:19:31] [ERR] [168] Jellyfin.Server.Middleware.ExceptionMiddleware: Error processing request: Token is required. URL GET /socket. [15:19:32] [ERR] [62] Jellyfin.Server.Middleware.ExceptionMiddleware: Error processing request: Token is required. URL GET /socket. [15:19:33] [ERR] [165] Jellyfin.Server.Middleware.ExceptionMiddleware: Error processing request: Token is required. URL GET /socket. [15:19:34] [ERR] [183] Jellyfin.Server.Middleware.ExceptionMiddleware: Error processing request: Token is required. URL GET /socket. [15:19:51] [ERR] [183] Jellyfin.Server.Middleware.ExceptionMiddleware: Error processing request: Token is required. URL GET /socket. [15:19:52] [INF] [165] Jellyfin.Api.Helpers.MediaInfoHelper: User policy for asmodeus2. EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True [15:19:52] [INF] [165] Jellyfin.Api.Helpers.MediaInfoHelper: StreamBuilder.BuildVideoItem( Profile=Anonymous Profile, Path=/Media/M+/Scat/Pornolab/FilthySkye/FilthySkye_135.mp4, AudioStreamIndex=1, SubtitleStreamIndex=-1 ) => ( PlayMethod=DirectPlay, TranscodeReason=0 ) media:/videos/28bb755a-292a-0b75-4217-62313ce0d6c5/stream.mp4?MediaSourceId=28bb755a292a0b75421762313ce0d6c5&Static=true&VideoCodec=h264&AudioCodec=mp3&AudioStreamIndex=1&api_key=<token>&SubtitleMethod=Encode&Tag=01f11e1c79fc1155e2e3cdd3ff290e43 [15:19:53] [ERR] [36] Jellyfin.Server.Middleware.ExceptionMiddleware: Error processing request: Token is required. URL GET /socket. [15:19:54] [ERR] [169] Jellyfin.Server.Middleware.ExceptionMiddleware: Error processing request: Token is required. URL GET /socket. [15:19:55] [ERR] [169] Jellyfin.Server.Middleware.ExceptionMiddleware: Error processing request: Token is required. URL GET /socket. [15:19:56] [ERR] [171] Jellyfin.Server.Middleware.ExceptionMiddleware: Error processing request: Token is required. URL GET /socket. [15:19:57] [ERR] [162] Jellyfin.Server.Middleware.ExceptionMiddleware: Error processing request: Token is required. URL GET /socket. [15:19:58] [ERR] [165] Jellyfin.Server.Middleware.ExceptionMiddleware: Error processing request: Token is required. URL GET /socket. [15:27:00] [INF] [121] Emby.Server.Implementations.Session.SessionManager: Playback stopped reported by app Jellyfin Web (Vue) 0.0.0 playing FilthySkye_135. Stopped at 24686 ms [15:27:00] [WRN] [121] jellyfin_ani_sync.UpdateProviderStatus: The user e6e51fd8-a2cb-4f6e-b6f0-fc25bbf4878b does not exist in the plugins config file. Skipping [17:29:37] [INF] [8] Emby.Server.Implementations.HttpServer.WebSocketManager: WS 10.0.0.231 request [17:30:28] [ERR] [119] Jellyfin.Server.Middleware.ExceptionMiddleware: Error processing request. URL GET /AniSync/user. System.ArgumentNullException: Value cannot be null. (Parameter 'source') at System.Linq.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument) at System.Linq.Enumerable.TryGetFirst[TSource](IEnumerable1 source, Func2 predicate, Boolean& found) at jellyfin_ani_sync.Api.AuthApiCall.AuthenticatedApiCall(ApiName provider, CallType callType, String url, FormUrlEncodedContent formUrlEncodedContent, StringContent stringContent) at jellyfin_ani_sync.Api.MalApiCalls.GetUserInformation() at jellyfin_ani_sync.Api.AniSyncController.GetUser(ApiName apiName, String userId) at lambda_method1125(Closure , Object ) at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask1 actionResultValueTask)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at Microsoft.AspNetCore.Routing.EndpointMiddleware.g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
at Jellyfin.Server.Middleware.ServerStartupMessageMiddleware.Invoke(HttpContext httpContext, IServerApplicationHost serverApplicationHost, ILocalizationManager localizationManager)
at Jellyfin.Server.Middleware.WebSocketHandlerMiddleware.Invoke(HttpContext httpContext, IWebSocketManager webSocketManager)
at Jellyfin.Server.Middleware.IpBasedAccessValidationMiddleware.Invoke(HttpContext httpContext, INetworkManager networkManager)
at Jellyfin.Server.Middleware.LanFilteringMiddleware.Invoke(HttpContext httpContext, INetworkManager networkManager, IServerConfigurationManager serverConfigurationManager)
at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
at Jellyfin.Server.Middleware.QueryStringDecodingMiddleware.Invoke(HttpContext httpContext)
at Swashbuckle.AspNetCore.ReDoc.ReDocMiddleware.Invoke(HttpContext httpContext)
at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext)
at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
at Jellyfin.Server.Middleware.RobotsRedirectionMiddleware.Invoke(HttpContext httpContext)
at Jellyfin.Server.Middleware.LegacyEmbyRouteRewriteMiddleware.Invoke(HttpContext httpContext)
at Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMiddleware.InvokeCore(HttpContext context)
at Jellyfin.Server.Middleware.ResponseTimeMiddleware.Invoke(HttpContext context, IServerConfigurationManager serverConfigurationManager)
at Jellyfin.Server.Middleware.ExceptionMiddleware.Invoke(HttpContext context)
`

@vosmiic
Copy link
Owner

vosmiic commented Dec 21, 2023

Sorry for the late reply, I am away from my dev PC. Hopefully I can sort out your problem without it.

I'll get the usual "can't reach this page" error when testing with http://172.17.0.3:8096/AniSync/apiUrlTest

You should see a "This is the correct URL." string as the response from anisync/apiurltest if it is correct.

The URL that is generated is not always correct, especially if the Jellyfin installation is not on bare metal or VM.
Do you connect to your Jellyfin server via that IP?

@ForsakenTwilight
Copy link
Author

ForsakenTwilight commented Dec 24, 2023

Thank you for your reply, and no worries :).

No i connect to jellyfin using http://10.0.0.5:8096/ as i am using it inside of UnraidOS and for some reason it has "192.168.0.9" as "JELLYFIN_PublishedServerUrl:" but it never worked for me and it has "172.17.0.3" as "AniSYNC:" variable.
this is a screenshot of how it is currently setup https://i.imgur.com/mrcyIkt.png

Edit:
i changed the API endpoint to "http://10.0.0.5:8096/AniSync/authCallback/" and the test authentication button still gave me this error "Test returned an error - try authenticating again or check the logs for a detailed error reason."

@vosmiic
Copy link
Owner

vosmiic commented Jan 7, 2024

I haven't used UnraidOS before so I might not be able to help much, but do you get a response of "This is the correct URL." when navigating to http://10.0.0.5:8096/AniSync/apiUrlTest?

@ForsakenTwilight
Copy link
Author

ForsakenTwilight commented Jan 10, 2024

Yes i get this message "This is the correct URL.", in that case shouldnt i be able to authenticate? or is it bugged?

@vosmiic
Copy link
Owner

vosmiic commented Jan 11, 2024

I would have thought it would work. Does this suggestion help you at all? It sounds like they may have a similar environment to you. Unfortunately as I run my environment in a VM on proxmox I can't provider much help for your use case.

@ForsakenTwilight
Copy link
Author

ForsakenTwilight commented Jan 12, 2024

it did not work for initial testing but i have to do some more fiddling to see if it does.
Thank you, i appreciate you trying to help

@symphonyalpha
Copy link

symphonyalpha commented Jan 13, 2024

You can try checking if there's an extra space in front of the client ID and client secret. I was having issues authenticating, but after I noticed and removed the extra spaces, everything worked.

Side note: I was getting a "The code field is required." response instead of "This is the correct URL." from the callback URL test, and even now when the plugin is working, I'm still getting the same response. I can see my watch progress being updated on MAL though, so I'm not that concerned.

@Hova2
Copy link

Hova2 commented Jul 6, 2024

I had the same @ForsakenTwilight problem. What I found is 2 problems, one of configuration on my part and another in the authentication procedure in the plugin also on my part:

  1. Configuration problem in MAL:

I had configured well the "App Redirect URL" with the authCallback correctly but I had configured wrong the"Homepage URL", it had to be the URL of my JellyFin, I attach a screenshot.

01

Note

1.The IP is not real, it is an example.
2.The "App Redirect URL" It should be the same in all cases, just change the IP or if there is a DNS resolution of the JellyFin server.

  1. Authentication procedure problem in the plugin:

After correctly configuring the API in my MAL account, you have to go to the plugin configuration, fill in the required fields according to the guide and finally click on the "Authorize User" button.

02

This will generate a URL, which must be pasted into a new tab to allow the local JellyFin user to use the App we created in MAL.

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

4 participants