Skip to content

Instantly share code, notes, and snippets.

@bakerboy448
Created January 12, 2024 13:46
Show Gist options
  • Save bakerboy448/473c2747ef4111b3cb51bee566f56865 to your computer and use it in GitHub Desktop.
Save bakerboy448/473c2747ef4111b3cb51bee566f56865 to your computer and use it in GitHub Desktop.
2024-01-12 07:42:59.9|Trace|Http|Req: 638 [GET] /lidarr/api/v1/history?eventType=3&page=1&pageSize=25&sortDirection=descending&sortKey=date (from 172.23.0.1 go-starr: https://golift.io/starr)
2024-01-12 07:42:59.9|Debug|Lidarr.Http.Authentication.ApiKeyAuthenticationHandler|AuthenticationScheme: API was successfully authenticated.
2024-01-12 07:42:59.9|Trace|LidarrErrorPipeline|Handling Exception
2024-01-12 07:42:59.9|Warn|LidarrErrorPipeline|System.ArgumentException: A PostgreSQL type with the name 'entity_history_event_type' was not found in the database
[v2.1.3.3920] System.ArgumentException: A PostgreSQL type with the name 'entity_history_event_type' was not found in the database
at Npgsql.Internal.NpgsqlDatabaseInfo.GetPostgresTypeByName(String pgName)
at Npgsql.TypeMapping.TypeMapper.ResolveByClrType(Type type)
at Npgsql.TypeMapping.TypeMapper.ResolveByClrType(Type type)
at Npgsql.NpgsqlParameter.ResolveHandler(TypeMapper typeMapper)
at Npgsql.NpgsqlParameterCollection.ProcessParameters(TypeMapper typeMapper, Boolean validateValues, CommandType commandType)
at Npgsql.NpgsqlCommand.ExecuteReader(CommandBehavior behavior, Boolean async, CancellationToken cancellationToken)
at Npgsql.NpgsqlCommand.ExecuteReader(CommandBehavior behavior, Boolean async, CancellationToken cancellationToken)
at Npgsql.NpgsqlCommand.ExecuteReader(CommandBehavior behavior)
at Dapper.SqlMapper.ExecuteReaderWithFlagsFallback(IDbCommand cmd, Boolean wasClosed, CommandBehavior behavior) in /_/Dapper/SqlMapper.cs:line 1075
at Dapper.SqlMapper.MultiMapImpl[TFirst,TSecond,TThird,TFourth,TFifth,TSixth,TSeventh,TReturn](IDbConnection cnn, CommandDefinition command, Delegate map, String splitOn, IDataReader reader, Identity identity, Boolean finalize)+MoveNext() in /_/Dapper/SqlMapper.cs:line 1470
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at Dapper.SqlMapper.MultiMap[TFirst,TSecond,TThird,TFourth,TFifth,TSixth,TSeventh,TReturn](IDbConnection cnn, String sql, Delegate map, Object param, IDbTransaction transaction, Boolean buffered, String splitOn, Nullable`1 commandTimeout, Nullable`1 commandType) in /_/Dapper/SqlMapper.cs:line 1451
at Dapper.SqlMapper.Query[TFirst,TSecond,TThird,TFourth,TReturn](IDbConnection cnn, String sql, Func`5 map, Object param, IDbTransaction transaction, Boolean buffered, String splitOn, Nullable`1 commandTimeout, Nullable`1 commandType) in /_/Dapper/SqlMapper.cs:line 1349
at NzbDrone.Core.Datastore.SqlMapperExtensions.Query[TFirst,TSecond,TThird,TFourth,TReturn](IDatabase db, String sql, Func`5 map, Object param, IDbTransaction transaction, Boolean buffered, String splitOn, Nullable`1 commandTimeout, Nullable`1 commandType) in ./Lidarr.Core/Datastore/Extensions/SqlMapperExtensions.cs:line 99
at NzbDrone.Core.Datastore.SqlMapperExtensions.QueryJoined[T,T2,T3,T4](IDatabase db, SqlBuilder builder, Func`5 mapper) in ./Lidarr.Core/Datastore/Extensions/SqlMapperExtensions.cs:line 172
at NzbDrone.Core.History.EntityHistoryRepository.PagedQuery(SqlBuilder builder) in ./Lidarr.Core/History/EntityHistoryRepository.cs:line 150
at NzbDrone.Core.Datastore.BasicRepository`1.GetPagedRecords(SqlBuilder builder, PagingSpec`1 pagingSpec, Func`2 queryFunc) in ./Lidarr.Core/Datastore/BasicRepository.cs:line 434
at NzbDrone.Core.History.EntityHistoryRepository.GetPaged(PagingSpec`1 pagingSpec, Int32[] qualities) in ./Lidarr.Core/History/EntityHistoryRepository.cs:line 124
at NzbDrone.Core.History.EntityHistoryService.Paged(PagingSpec`1 pagingSpec, Int32[] qualities) in ./Lidarr.Core/History/EntityHistoryService.cs:line 57
at Lidarr.Api.V1.History.HistoryController.<>c__DisplayClass7_0.<GetHistory>b__3(PagingSpec`1 h) in ./Lidarr.Api.V1/History/HistoryController.cs:line 97
at Lidarr.Http.Extensions.RequestExtensions.ApplyToPage[TResource,TModel](PagingSpec`1 pagingSpec, Func`2 function, Converter`2 mapper) in ./Lidarr.Http/Extensions/RequestExtensions.cs:line 56
at Lidarr.Api.V1.History.HistoryController.GetHistory(PagingRequestResource paging, Boolean includeArtist, Boolean includeAlbum, Boolean includeTrack, Int32[] eventTypes, Nullable`1 albumId, String downloadId, Int32[] artistIds, Int32[] quality) in ./Lidarr.Api.V1/History/HistoryController.cs:line 97
at lambda_method111(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 ./Lidarr.Http/Middleware/BufferingMiddleware.cs:line 28
at Lidarr.Http.Middleware.IfModifiedMiddleware.InvokeAsync(HttpContext context) in ./Lidarr.Http/Middleware/IfModifiedMiddleware.cs:line 41
at Lidarr.Http.Middleware.CacheHeaderMiddleware.InvokeAsync(HttpContext context) in ./Lidarr.Http/Middleware/CacheHeaderMiddleware.cs:line 33
at Lidarr.Http.Middleware.StartingUpMiddleware.InvokeAsync(HttpContext context) in ./Lidarr.Http/Middleware/StartingUpMiddleware.cs:line 38
at Lidarr.Http.Middleware.UrlBaseMiddleware.InvokeAsync(HttpContext context) in ./Lidarr.Http/Middleware/UrlBaseMiddleware.cs:line 27
at Lidarr.Http.Middleware.VersionMiddleware.InvokeAsync(HttpContext context) in ./Lidarr.Http/Middleware/VersionMiddleware.cs:line 29
at Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMiddleware.InvokeCore(HttpContext context)
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)
SQL:
==== Begin Query Trace ====
QUERY TEXT:
SELECT "History".*, "Artists".*, "Albums".*, "Tracks".*
FROM "History"
JOIN "Artists" ON ("History"."ArtistId" = "Artists"."Id")
JOIN "Albums" ON ("History"."AlbumId" = "Albums"."Id")
LEFT JOIN "Tracks" ON ("History"."TrackId" = "Tracks"."Id")
WHERE ("History"."EventType" = ANY (@Clause4_P1)) AND ("History"."EventType" = ANY (@Clause5_P1))
ORDER BY "Date" DESC LIMIT 25 OFFSET 0
PARAMETERS:
Clause4_P1 = [[
"trackFileImported"
]]
Clause5_P1 = [[
"trackFileImported"
]]
==== End Query Trace ====
2024-01-12 07:43:00.2|Fatal|LidarrErrorPipeline|Request Failed. GET /api/v1/history
[v2.1.3.3920] System.ArgumentException: A PostgreSQL type with the name 'entity_history_event_type' was not found in the database
at Npgsql.Internal.NpgsqlDatabaseInfo.GetPostgresTypeByName(String pgName)
at Npgsql.TypeMapping.TypeMapper.ResolveByClrType(Type type)
at Npgsql.TypeMapping.TypeMapper.ResolveByClrType(Type type)
at Npgsql.NpgsqlParameter.ResolveHandler(TypeMapper typeMapper)
at Npgsql.NpgsqlParameterCollection.ProcessParameters(TypeMapper typeMapper, Boolean validateValues, CommandType commandType)
at Npgsql.NpgsqlCommand.ExecuteReader(CommandBehavior behavior, Boolean async, CancellationToken cancellationToken)
at Npgsql.NpgsqlCommand.ExecuteReader(CommandBehavior behavior, Boolean async, CancellationToken cancellationToken)
at Npgsql.NpgsqlCommand.ExecuteReader(CommandBehavior behavior)
at Dapper.SqlMapper.ExecuteReaderWithFlagsFallback(IDbCommand cmd, Boolean wasClosed, CommandBehavior behavior) in /_/Dapper/SqlMapper.cs:line 1075
at Dapper.SqlMapper.MultiMapImpl[TFirst,TSecond,TThird,TFourth,TFifth,TSixth,TSeventh,TReturn](IDbConnection cnn, CommandDefinition command, Delegate map, String splitOn, IDataReader reader, Identity identity, Boolean finalize)+MoveNext() in /_/Dapper/SqlMapper.cs:line 1470
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at Dapper.SqlMapper.MultiMap[TFirst,TSecond,TThird,TFourth,TFifth,TSixth,TSeventh,TReturn](IDbConnection cnn, String sql, Delegate map, Object param, IDbTransaction transaction, Boolean buffered, String splitOn, Nullable`1 commandTimeout, Nullable`1 commandType) in /_/Dapper/SqlMapper.cs:line 1451
at Dapper.SqlMapper.Query[TFirst,TSecond,TThird,TFourth,TReturn](IDbConnection cnn, String sql, Func`5 map, Object param, IDbTransaction transaction, Boolean buffered, String splitOn, Nullable`1 commandTimeout, Nullable`1 commandType) in /_/Dapper/SqlMapper.cs:line 1349
at NzbDrone.Core.Datastore.SqlMapperExtensions.Query[TFirst,TSecond,TThird,TFourth,TReturn](IDatabase db, String sql, Func`5 map, Object param, IDbTransaction transaction, Boolean buffered, String splitOn, Nullable`1 commandTimeout, Nullable`1 commandType) in ./Lidarr.Core/Datastore/Extensions/SqlMapperExtensions.cs:line 99
at NzbDrone.Core.Datastore.SqlMapperExtensions.QueryJoined[T,T2,T3,T4](IDatabase db, SqlBuilder builder, Func`5 mapper) in ./Lidarr.Core/Datastore/Extensions/SqlMapperExtensions.cs:line 172
at NzbDrone.Core.History.EntityHistoryRepository.PagedQuery(SqlBuilder builder) in ./Lidarr.Core/History/EntityHistoryRepository.cs:line 150
at NzbDrone.Core.Datastore.BasicRepository`1.GetPagedRecords(SqlBuilder builder, PagingSpec`1 pagingSpec, Func`2 queryFunc) in ./Lidarr.Core/Datastore/BasicRepository.cs:line 434
at NzbDrone.Core.History.EntityHistoryRepository.GetPaged(PagingSpec`1 pagingSpec, Int32[] qualities) in ./Lidarr.Core/History/EntityHistoryRepository.cs:line 124
at NzbDrone.Core.History.EntityHistoryService.Paged(PagingSpec`1 pagingSpec, Int32[] qualities) in ./Lidarr.Core/History/EntityHistoryService.cs:line 57
at Lidarr.Api.V1.History.HistoryController.<>c__DisplayClass7_0.<GetHistory>b__3(PagingSpec`1 h) in ./Lidarr.Api.V1/History/HistoryController.cs:line 97
at Lidarr.Http.Extensions.RequestExtensions.ApplyToPage[TResource,TModel](PagingSpec`1 pagingSpec, Func`2 function, Converter`2 mapper) in ./Lidarr.Http/Extensions/RequestExtensions.cs:line 56
at Lidarr.Api.V1.History.HistoryController.GetHistory(PagingRequestResource paging, Boolean includeArtist, Boolean includeAlbum, Boolean includeTrack, Int32[] eventTypes, Nullable`1 albumId, String downloadId, Int32[] artistIds, Int32[] quality) in ./Lidarr.Api.V1/History/HistoryController.cs:line 97
at lambda_method111(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 ./Lidarr.Http/Middleware/BufferingMiddleware.cs:line 28
at Lidarr.Http.Middleware.IfModifiedMiddleware.InvokeAsync(HttpContext context) in ./Lidarr.Http/Middleware/IfModifiedMiddleware.cs:line 41
at Lidarr.Http.Middleware.CacheHeaderMiddleware.InvokeAsync(HttpContext context) in ./Lidarr.Http/Middleware/CacheHeaderMiddleware.cs:line 33
at Lidarr.Http.Middleware.StartingUpMiddleware.InvokeAsync(HttpContext context) in ./Lidarr.Http/Middleware/StartingUpMiddleware.cs:line 38
at Lidarr.Http.Middleware.UrlBaseMiddleware.InvokeAsync(HttpContext context) in ./Lidarr.Http/Middleware/UrlBaseMiddleware.cs:line 27
at Lidarr.Http.Middleware.VersionMiddleware.InvokeAsync(HttpContext context) in ./Lidarr.Http/Middleware/VersionMiddleware.cs:line 29
at Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMiddleware.InvokeCore(HttpContext context)
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)
SQL:
==== Begin Query Trace ====
QUERY TEXT:
SELECT "History".*, "Artists".*, "Albums".*, "Tracks".*
FROM "History"
JOIN "Artists" ON ("History"."ArtistId" = "Artists"."Id")
JOIN "Albums" ON ("History"."AlbumId" = "Albums"."Id")
LEFT JOIN "Tracks" ON ("History"."TrackId" = "Tracks"."Id")
WHERE ("History"."EventType" = ANY (@Clause4_P1)) AND ("History"."EventType" = ANY (@Clause5_P1))
ORDER BY "Date" DESC LIMIT 25 OFFSET 0
PARAMETERS:
Clause4_P1 = [[
"trackFileImported"
]]
Clause5_P1 = [[
"trackFileImported"
]]
==== End Query Trace ====
2024-01-12 07:43:00.5|Trace|Http|Res: 638 [GET] /lidarr/api/v1/history?eventType=3&page=1&pageSize=25&sortDirection=descending&sortKey=date: 500.InternalServerError (554 ms)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment