Skip to content
This repository has been archived by the owner on Oct 13, 2024. It is now read-only.

Error processing request. URL "POST" #17

Closed
paugau opened this issue Feb 16, 2023 · 20 comments
Closed

Error processing request. URL "POST" #17

paugau opened this issue Feb 16, 2023 · 20 comments
Labels
help wanted Extra attention is needed stale

Comments

@paugau
Copy link

paugau commented Feb 16, 2023

Describe the Bug

I'm receiving the following error when trying to run Themerr-jellyfin.

Jellyfin Version : 10.8.8

Themerr-Jellyfin Version : 0.0.1.0

Operating System: Linux

Architecture: X64`

[2023-02-16 09:56:01.828 +00:00] [ERR] [123] Jellyfin.Server.Middleware.ExceptionMiddleware: Error processing request. URL "POST" "/Themerr/DownloadMovies".
Newtonsoft.Json.JsonReaderException: Additional text encountered after finished reading JSON content: }. Path '', line 1, position 120.
   at Newtonsoft.Json.JsonTextReader.Read()
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
   at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
   at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
   at Jellyfin.Plugin.Themerr.ThemerrManager.DownloadAllThemerr()
   at Jellyfin.Plugin.Themerr.Api.ThemerrController.DownloadMovieThemerrRequest()
   at lambda_method1017(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.Policy.AuthorizationMiddlewareResultHandler.HandleAsync(RequestDelegate next, HttpContext context, AuthorizationPolicy policy, PolicyAuthorizationResult authorizeResult)
   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)

Is there anyway to fix this?

Expected Behavior

No response

Additional Context

No response

@ReenigneArcher
Copy link
Member

I'm quite new to C# so this might take me a bit to figure out.

I would like to know if you get any errors when you first start Jellyfin.

@paugau
Copy link
Author

paugau commented Feb 18, 2023

I don't get any errors at startup.
I think I found a lead. I have a movie named Captain Marvel, which does have a json file but this one doesn't have an associated youtube video. I think it's this movie that makes crash the plugin. I added a request-movie and I'm waiting for it to be modified to see if the bug comes from there

@ReenigneArcher
Copy link
Member

Interesting... I'll try to look into it soon.

@ReenigneArcher
Copy link
Member

Although this project doesn't use youtube-dl, I suspect this issue is actually related to ytdl-org/youtube-dl#31530

It seems that YouTube is changing some things in their API.

@dirkf
Copy link

dirkf commented Feb 18, 2023

The page structure, anyway.

Could this code be asking yt-dl to extract the movie metadata when it isn't already present? Or extracting it in some other way that is also broken by the new page structure?

@ReenigneArcher
Copy link
Member

This project isn't using youtube-dl, it uses YoutubeExplode.

@ReenigneArcher
Copy link
Member

Could you test this build? https://github.com/LizardByte/Themerr-jellyfin/actions/runs/4162433864#artifacts

You must be logged in to download artifacts.

@paugau
Copy link
Author

paugau commented Feb 21, 2023

I'm sorry, I have exactly the same issue

@ReenigneArcher ReenigneArcher added the help wanted Extra attention is needed label Feb 23, 2023
@ReenigneArcher
Copy link
Member

Sorry to ask again, but can you test this build? https://github.com/LizardByte/Themerr-jellyfin/actions/runs/4287066053/jobs/7467461435#artifacts

@paugau
Copy link
Author

paugau commented Mar 1, 2023

I still have a mistake but it has changed a bit. Here it is :

[2023-03-01 23:06:32.807 +00:00] [INF] [10] Jellyfin.Plugin.Themerr.ThemerrManager: "Moonraker" theme song not in database, or no internet connection
[2023-03-01 23:06:32.807 +00:00] [ERR] [10] Emby.Server.Implementations.ScheduledTasks.TaskManager: Error
Newtonsoft.Json.JsonReaderException: Additional text encountered after finished reading JSON content: }. Path '', line 1, position 120.
   at Newtonsoft.Json.JsonTextReader.Read()
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
   at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
   at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
   at Jellyfin.Plugin.Themerr.ThemerrManager.DownloadAllThemerr()
   at Jellyfin.Plugin.Themerr.ScheduledTasks.DownloadThemerrTask.ExecuteAsync(IProgress`1 progress, CancellationToken cancellationToken)
   at Emby.Server.Implementations.ScheduledTasks.ScheduledTaskWorker.ExecuteInternal(TaskOptions options)
[2023-03-01 23:06:32.808 +00:00] [INF] [10] Emby.Server.Implementations.ScheduledTasks.TaskManager: "Download Theme Songs" Failed after 0 minute(s) and 5 seconds
[2023-03-01 23:06:32.808 +00:00] [INF] [10] Emby.Server.Implementations.ScheduledTasks.TaskManager: ExecuteQueuedTasks

@ReenigneArcher
Copy link
Member

@paugau
Copy link
Author

paugau commented Mar 2, 2023

I have other errors that appear for each film, in addition to the same error at the end :

[2023-03-02 14:17:14.624 +00:00] [INF] [102] Jellyfin.Plugin.Themerr.ThemerrManager: Unknown exception occured for "Die Hard 4 : Retour en enfer": "System.AggregateException: One or more errors occurred. (Response status code does not indicate success: 404 (Not Found).)
 ---> System.Net.Http.HttpRequestException: Response status code does not indicate success: 404 (Not Found).
   at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()
   at System.Net.Http.HttpClient.GetStringAsyncCore(HttpRequestMessage request, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at Jellyfin.Plugin.Themerr.ThemerrManager.DownloadAllThemerr()"

@ReenigneArcher
Copy link
Member

Can you share a larger section of the log?

@paugau
Copy link
Author

paugau commented Mar 3, 2023

Yes of course. However it is exactly this bit of error that repeats itself for every film I have. Here is an extract from the log :

[2023-03-03 12:36:22.792 +00:00] [INF] [195] Emby.Server.Implementations.ScheduledTasks.TaskManager: Executing "Download Theme Songs"
[2023-03-03 12:36:22.793 +00:00] [INF] [195] Jellyfin.Plugin.Themerr.ThemerrManager: Starting plugin, Downloading Movie Theme Songs...
[2023-03-03 12:36:23.346 +00:00] [INF] [195] Jellyfin.Plugin.Themerr.ThemerrManager: Unknown exception occured for "Hannibal": "System.AggregateException: One or more errors occurred. (Response status code does not indicate success: 404 (Not Found).)
 ---> System.Net.Http.HttpRequestException: Response status code does not indicate success: 404 (Not Found).
   at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()
   at System.Net.Http.HttpClient.GetStringAsyncCore(HttpRequestMessage request, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at Jellyfin.Plugin.Themerr.ThemerrManager.DownloadAllThemerr()"
[2023-03-03 12:36:23.801 +00:00] [INF] [195] Jellyfin.Plugin.Themerr.ThemerrManager: Unknown exception occured for "Die Hard 4 : Retour en enfer": "System.AggregateException: One or more errors occurred. (Response status code does not indicate success: 404 (Not Found).)
 ---> System.Net.Http.HttpRequestException: Response status code does not indicate success: 404 (Not Found).
   at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()
   at System.Net.Http.HttpClient.GetStringAsyncCore(HttpRequestMessage request, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at Jellyfin.Plugin.Themerr.ThemerrManager.DownloadAllThemerr()"
[2023-03-03 12:36:23.924 +00:00] [INF] [195] Jellyfin.Plugin.Themerr.ThemerrManager: Unknown exception occured for "Parasite": "System.AggregateException: One or more errors occurred. (Response status code does not indicate success: 404 (Not Found).)
 ---> System.Net.Http.HttpRequestException: Response status code does not indicate success: 404 (Not Found).
   at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()
   at System.Net.Http.HttpClient.GetStringAsyncCore(HttpRequestMessage request, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at Jellyfin.Plugin.Themerr.ThemerrManager.DownloadAllThemerr()"

And at the end, after all errors for each film, I have this error code :

[2023-03-03 12:36:50.594 +00:00] [ERR] [195] Emby.Server.Implementations.ScheduledTasks.TaskManager: Error
Newtonsoft.Json.JsonReaderException: Additional text encountered after finished reading JSON content: }. Path '', line 1, position 120.
   at Newtonsoft.Json.JsonTextReader.Read()
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
   at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
   at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
   at Jellyfin.Plugin.Themerr.ThemerrManager.DownloadAllThemerr()
   at Jellyfin.Plugin.Themerr.ScheduledTasks.DownloadThemerrTask.ExecuteAsync(IProgress 1 progress, CancellationToken cancellationToken)
   at Emby.Server.Implementations.ScheduledTasks.ScheduledTaskWorker.ExecuteInternal(TaskOptions options)
[2023-03-03 12:36:50.596 +00:00] [INF] [195] Emby.Server.Implementations.ScheduledTasks.TaskManager: "Download Theme Songs" Failed after 0 minute(s) and 27 seconds
[2023-03-03 12:36:50.615 +00:00] [INF] [195] Emby.Server.Implementations.ScheduledTasks.TaskManager: ExecuteQueuedTasks`

@LizardByte-bot
Copy link
Member

This issue is stale because it has been open for 90 days with no activity. Comment or remove the stale label, otherwise this will be closed in 10 days.

@LizardByte-bot
Copy link
Member

This issue was closed because it has been stalled for 10 days with no activity.

@LizardByte-bot LizardByte-bot closed this as not planned Won't fix, can't repro, duplicate, stale Jun 12, 2023
@theqkash
Copy link

theqkash commented Oct 18, 2023

Don't know if possible to post here and got answers, but I got the same issue as OP. I'm not using docker here, but I've extracted fresh files and 0.01 version as well, none are working.

Newtonsoft.Json.JsonReaderException: Additional text encountered after finished reading JSON content: }. Path '', line 1, position 120.
   at Newtonsoft.Json.JsonTextReader.Read()
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
   at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
   at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
   at Jellyfin.Plugin.Themerr.ThemerrManager.DownloadAllThemerr()
   at Jellyfin.Plugin.Themerr.Api.ThemerrController.DownloadMovieThemerrRequest()
   at lambda_method928(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.Policy.AuthorizationMiddlewareResultHandler.HandleAsync(RequestDelegate next, HttpContext context, AuthorizationPolicy policy, PolicyAuthorizationResult authorizeResult)
   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)```

@ReenigneArcher
Copy link
Member

ReenigneArcher commented Oct 18, 2023

If you're using a new build, I think (not 100% sure) you can solve this by manually removing existing themerr.json files. I apologize, that it's not the easiest solution.

You can try this build https://github.com/LizardByte/Themerr-jellyfin/actions/runs/6533867706?pr=12#artifacts

Please let me know if that solves the issue, and if so I can probably programmatically resolve this.

@LizardByte-bot
Copy link
Member

It seems this issue hasn't had any activity in the past 90 days. If it's still something you'd like addressed, please let us know by leaving a comment. Otherwise, to help keep our backlog tidy, we'll be closing this issue in 10 days. Thanks!

@LizardByte-bot
Copy link
Member

This issue was closed because it has been stalled for 10 days with no activity.

@LizardByte-bot LizardByte-bot closed this as not planned Won't fix, can't repro, duplicate, stale Jan 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
help wanted Extra attention is needed stale
Projects
None yet
Development

No branches or pull requests

5 participants