RandomNinjaAtk / docker-lidarr-extended

lidarr-extended :: Lidarr application packaged with multiple scripts to provide additional functionality
GNU General Public License v3.0
279 stars 25 forks source link

Finding missing albums - Error 500 #8

Closed Eldarock closed 2 years ago

Eldarock commented 2 years ago

Hello ! This new docker image worked the day it was out, but not anymore after the first couple of updates. Don't know exactly which updates broke the script. Got an error in the extended script run :

2022-06-29 08:45:16 :: FINDING MISSING ALBUMS wget: server returned error: HTTP/1.1 500 Internal Server Error

The only error i see in the lidarr logs are this one, who triggers a lot :

2022-06-29 08:47:13.6|Fatal|LidarrErrorPipeline|Request Failed. GET /api/v1/wanted/missing

[v1.1.0.2602] System.InvalidOperationException: Sequence contains more than one element
   at System.Linq.ThrowHelper.ThrowMoreThanOneElementException()
   at System.Linq.Enumerable.TryGetSingle[TSource](IEnumerable`1 source, Boolean& found)
   at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1 source)
   at Lidarr.Api.V1.Albums.AlbumResourceMapper.ToResource(Album model) in D:\a\1\s\src\Lidarr.Api.V1\Albums\AlbumResource.cs:line 64
   at Lidarr.Api.V1.Albums.AlbumControllerWithSignalR.MapToResource(Album album, Boolean includeArtist) in D:\a\1\s\src\Lidarr.Api.V1\Albums\AlbumControllerWithSignalR.cs:line 43
   at Lidarr.Api.V1.Wanted.MissingController.<>c__DisplayClass1_0.<GetMissingAlbums>b__3(Album v) in D:\a\1\s\src\Lidarr.Api.V1\Wanted\MissingController.cs:line 44
   at System.Collections.Generic.List`1.ConvertAll[TOutput](Converter`2 converter)
   at Lidarr.Http.Extensions.RequestExtensions.ApplyToPage[TResource,TModel](PagingSpec`1 pagingSpec, Func`2 function, Converter`2 mapper) in D:\a\1\s\src\Lidarr.Http\Extensions\RequestExtensions.cs:line 135
   at Lidarr.Api.V1.Wanted.MissingController.GetMissingAlbums(Boolean includeArtist) in D:\a\1\s\src\Lidarr.Api.V1\Wanted\MissingController.cs:line 44
   at lambda_method143(Closure , Object , Object[] )
   at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.SyncObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeActionMethodAsync()
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeNextActionFilterAsync()
--- End of stack trace from previous location ---
   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.<InvokeFilterPipelineAsync>g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   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 Lidarr.Http.Middleware.BufferingMiddleware.InvokeAsync(HttpContext context) in D:\a\1\s\src\Lidarr.Http\Middleware\BufferingMiddleware.cs:line 27
   at Lidarr.Http.Middleware.IfModifiedMiddleware.InvokeAsync(HttpContext context) in D:\a\1\s\src\Lidarr.Http\Middleware\IfModifiedMiddleware.cs:line 40
   at Lidarr.Http.Middleware.CacheHeaderMiddleware.InvokeAsync(HttpContext context) in D:\a\1\s\src\Lidarr.Http\Middleware\CacheHeaderMiddleware.cs:line 32
   at Lidarr.Http.Middleware.UrlBaseMiddleware.InvokeAsync(HttpContext context) in D:\a\1\s\src\Lidarr.Http\Middleware\UrlBaseMiddleware.cs:line 26
   at Lidarr.Http.Middleware.VersionMiddleware.InvokeAsync(HttpContext context) in D:\a\1\s\src\Lidarr.Http\Middleware\VersionMiddleware.cs:line 27
   at Microsoft.AspNetCore.Authorization.Policy.AuthorizationMiddlewareResultHandler.HandleAsync(RequestDelegate next, HttpContext context, AuthorizationPolicy policy, PolicyAuthorizationResult authorizeResult)
   at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.<Invoke>g__Awaited|6_0(ExceptionHandlerMiddleware middleware, HttpContext context, Task task)
RandomNinjaAtk commented 2 years ago

Make sure you have the latest update, current script version is:

https://github.com/RandomNinjaAtk/docker-lidarr-extended/blob/b330e0c81fa62810d151fa7b76b7806032e4fe59/root/scripts/download.sh#L2

Eldarock commented 2 years ago

I updated the docker image in my unraid setup before creating the issue (like 1 hour ago) I recheck if i have an update after your comment, there wasn't, but i restart the docker image, monitor the logs, and the bug is still there. I even check directly in the docker image, scriptVersion in the /config/extended/scripts/download.sh : 1.0.73

RandomNinjaAtk commented 2 years ago

Could indicate an issue with you Lidarr DB. Which would be unrelated to the script and you may need to contact the Lidarr support team. You might want to hop on Discord to discuss further

Eldarock commented 2 years ago

Looks like you're right, the api call seems to stuck on one particular page, indicating a corrupted db yeah. Sorry for the non related issue. Have a nice day !