anobaka / InsideWorld

A local media manager for all types of files. 二次元老司机专用的本地媒体文件管理器,支持管理和处理音视频、本子、图集、小说、哔哩哔哩视频、游戏甚至mod等各类资源
https://inside-world.anobaka.com/
GNU General Public License v3.0
397 stars 13 forks source link

[Bug] 点击媒体库/自定义组件触发'/component: [500]'错误 #530

Closed 2455DD closed 1 month ago

2455DD commented 2 months ago

点击媒体库/自定义组件时触发'/component: [500]'错误,具体为

/component: [500] Value cannot be null. (Parameter Key)

具体来说,日志中相关记录为

2024-08-29 00:29:01.214 +08:00 [Error] (Bootstrap.Components.Miscellaneous.SimpleExceptionHandlingMiddleware.) DisplayUrl: http://localhost:10001/component?additionalItems=1
Connection: 0HN67FPQIO54D:00000001
ClientIp: ::1
System.ArgumentNullException: Value cannot be null. (Parameter 'key')
   at System.Collections.Generic.Dictionary`2.FindValue(TKey key)
   at System.Collections.Generic.Dictionary`2.TryGetValue(TKey key, TValue& value)
   at Bakabase.InsideWorld.Business.Services.ComponentService.ToDtoList(ComponentDescriptor[] descriptors, ComponentDescriptorAdditionalItem additionalItems) in I:\Code\Anobaka\Bakabase\src\legacy\Bakabase.InsideWorld.Business\Services\ComponentService.cs:line 237
   at Bakabase.InsideWorld.Business.Services.ComponentService.GetDescriptorDtoList(Nullable`1 componentType, ComponentDescriptorAdditionalItem additionalItems) in I:\Code\Anobaka\Bakabase\src\legacy\Bakabase.InsideWorld.Business\Services\ComponentService.cs:line 198
   at Bakabase.Service.Controllers.ComponentController.GetDescriptors(Nullable`1 type, ComponentDescriptorAdditionalItem additionalItems) in I:\Code\Anobaka\Bakabase\src\Bakabase.Service\Controllers\ComponentController.cs:line 35
   at lambda_method1006(Closure, Object)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.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()
--- 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__Logged|17_1(ResourceInvoker invoker)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker)
   at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|7_0(Endpoint endpoint, Task requestTask, ILogger logger)
   at Bootstrap.Components.Miscellaneous.SimpleExceptionHandlingMiddleware.Invoke(HttpContext context) in I:\Code\Anobaka\LazyMortal\src\Bootstrap\Components\Miscellaneous\SimpleExceptionHandlingMiddleware.cs:line 34

截屏 image

系统:

完整日志 AppLog_20240829.log

anobaka commented 2 months ago

是移除自定义增强器后对历史数据没有足够的兼容判断导致的,beta2修复