ShokoAnime / ShokoServer

Repository for Shoko Server.
https://shokoanime.com/
MIT License
412 stars 74 forks source link

Error linking TMDb Series (DEV- Daily) #1180

Closed t0815 closed 2 months ago

t0815 commented 2 months ago

VERSION INFORMATION

Server Version: 4.2.2.167 (e776b8b)

Desktop Version: n/a

If you've compiled your own version, please use the last commit you compiled.

LOG FILE

[2024-09-24 10:57:05:834] Error|Microsoft.AspNetCore.Server.Kestrel > Connection id "0HN6S7Q7BQ37V", Request id "0HN6S7Q7BQ37V:0000002E": An unhandled exception was thrown by the application.: NHibernate.Exceptions.GenericADOException: could not insert: [Shoko.Server.Models.TMDB.TMDB_Show][SQL: INSERT INTO TMDB_Show (TmdbShowID, TvdbShowID, PosterPath, BackdropPath, EnglishTitle, EnglishOverview, OriginalTitle, OriginalLanguageCode, IsRestricted, Genres, ContentRatings, EpisodeCount, SeasonCount, AlternateOrderingCount, UserRating, UserVotes, FirstAiredAt, LastAiredAt, CreatedAt, LastUpdatedAt, PreferredAlternateOrderingID) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)]
 ---> MySqlConnector.MySqlException (0x80004005): Data too long for column 'ContentRatings' at row 1
   at MySqlConnector.Core.ServerSession.ReceiveReplyAsync(IOBehavior ioBehavior, CancellationToken cancellationToken) in /_/src/MySqlConnector/Core/ServerSession.cs:line 892
   at MySqlConnector.Core.ResultSet.ReadResultSetHeaderAsync(IOBehavior ioBehavior) in /_/src/MySqlConnector/Core/ResultSet.cs:line 37
   at MySqlConnector.MySqlDataReader.ActivateResultSet(CancellationToken cancellationToken) in /_/src/MySqlConnector/MySqlDataReader.cs:line 130
   at MySqlConnector.MySqlDataReader.InitAsync(CommandListPosition commandListPosition, ICommandPayloadCreator payloadCreator, IDictionary`2 cachedProcedures, IMySqlCommand command, CommandBehavior behavior, Activity activity, IOBehavior ioBehavior, CancellationToken cancellationToken) in /_/src/MySqlConnector/MySqlDataReader.cs:line 483
   at MySqlConnector.Core.CommandExecutor.ExecuteReaderAsync(CommandListPosition commandListPosition, ICommandPayloadCreator payloadCreator, CommandBehavior behavior, Activity activity, IOBehavior ioBehavior, CancellationToken cancellationToken) in /_/src/MySqlConnector/Core/CommandExecutor.cs:line 56
   at MySqlConnector.MySqlCommand.ExecuteNonQueryAsync(IOBehavior ioBehavior, CancellationToken cancellationToken) in /_/src/MySqlConnector/MySqlCommand.cs:line 309
   at NHibernate.AdoNet.AbstractBatcher.ExecuteNonQuery(DbCommand cmd)
   at NHibernate.Id.Insert.AbstractSelectingDelegate.PerformInsert(SqlCommandInfo insertSql, ISessionImplementor session, IBinder binder)
   --- End of inner exception stack trace ---
   at NHibernate.Id.Insert.AbstractSelectingDelegate.PerformInsert(SqlCommandInfo insertSql, ISessionImplementor session, IBinder binder)
   at NHibernate.Action.EntityIdentityInsertAction.Execute()
   at NHibernate.Engine.ActionQueue.InnerExecute(IExecutable executable)
   at NHibernate.Engine.ActionQueue.Execute(IExecutable executable)
   at NHibernate.Event.Default.AbstractSaveEventListener.PerformSaveOrReplicate(Object entity, EntityKey key, IEntityPersister persister, Boolean useIdentityColumn, Object anything, IEventSource source, Boolean requiresImmediateIdAccess)
   at NHibernate.Impl.SessionImpl.FireSaveOrUpdate(SaveOrUpdateEvent event)
   at NHibernate.Impl.SessionImpl.SaveOrUpdate(Object obj)
   at Shoko.Server.Repositories.BaseDirectRepository`2.<>c__DisplayClass38_0.<Save>b__0() in D:\a\ShokoServer\ShokoServer\Shoko.Server\Repositories\BaseDirectRepository.cs:line 155
   at Shoko.Server.Repositories.BaseRepository.Lock(Action action) in D:\a\ShokoServer\ShokoServer\Shoko.Server\Repositories\BaseRepository.cs:line 17
   at Shoko.Server.Providers.TMDB.TmdbMetadataService.UpdateShow(Int32 showId, Boolean forceRefresh, Boolean downloadImages, Boolean downloadCrewAndCast, Boolean downloadAlternateOrdering, Boolean quickRefresh) in D:\a\ShokoServer\ShokoServer\Shoko.Server\Providers\TMDB\TmdbMetadataService.cs:line 926
   at Shoko.Server.API.v3.Controllers.TmdbController.RefreshTmdbShowByShowID(Int32 showID, TmdbRefreshShowBody body) in D:\a\ShokoServer\ShokoServer\Shoko.Server\API\v3\Controllers\TmdbController.cs:line 1358
   at lambda_method296613(Closure, Object)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfActionResultExecutor.Execute(ActionContext actionContext, 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>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   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>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.Builder.RouterMiddleware.Invoke(HttpContext httpContext)
   at Sentry.AspNetCore.SentryTracingMiddleware.InvokeAsync(HttpContext context)
   at Sentry.AspNetCore.SentryTracingMiddleware.InvokeAsync(HttpContext context)
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext)
   at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)
   at Shoko.Server.API.APIExtensions.<>c.<<UseAPI>b__4_0>d.MoveNext() in D:\a\ShokoServer\ShokoServer\Shoko.Server\API\APIExtensions.cs:line 233
--- End of stack trace from previous location ---
   at Sentry.AspNetCore.SentryMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
   at Sentry.AspNetCore.SentryMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
   at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.InterfaceMiddlewareBinder.<>c__DisplayClass2_0.<<CreateMiddleware>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application)

DESCRIPTION

When trying to link Show "Dungeon Meshi" (https://anidb.net/anime/17564) to TMDb, when trying to load results / episodes from TMDb an error occurs for this particular show.

STEPS TO REPRODUCE

  1. Have show in your collection
  2. In WEB-UI try to link the show to TMDb
revam commented 2 months ago

Should be fixed in 4.2.2.169 (02af85a39345924bba04a06a7f035c1707c7ec71) when it's released. If it doesn't, then please re-open this issue (because I fudged up the MySQL/MariaDB migration).

revam commented 2 months ago

…fixed in 4.2.2.170 (12c92df412bb946f7bb0f74134762a0768e670fe). 4.2.2.169 (02af85a39345924bba04a06a7f035c1707c7ec71) had incorrect MySQL/MariaDB syntax because I was literally writing it blind (no syntax highlighting and no IDE to scream at me).