ivanpaulovich / ivanpaulovich/FluentMediator
Issue using blazor virtualize component with FluentMediator
- Dominant language
- C#
- Stars
- 196
- Forks
- 18
- PR merge metrics
- No merged PRs in 30d
Description
Hi guys,
I'm using FluentMediator in two of my projects.
Last days I found an issue in my app where my requests get an OperationCancelledException.
After a few hours trying to resolve, I found it on my Windows Event Viewers.
It's looks like the FluentMediator crashing between my controller and my use case class.
Can you guys check it out?
_`at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
fail: Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware[1]
An unhandled exception has occurred while executing the request.
System.OperationCanceledException: The operation was canceled.
at System.Threading.CancellationToken.ThrowOperationCanceledException()
at FluentMediator.Pipelines.CancellablePipelineAsync.Pipeline.PublishAsync(GetService getService, Object request, CancellationToken cancellationToken)
at FluentMediator.Mediator.PublishAsync(Object request, CancellationToken cancellationToken, String pipelineName)
at LetzIt.Admin.WebAPI.UseCases.V1.Users.Get.UsersController.Get(RequestDTO request, CancellationToken cancellationToken) in C:\Users\Leandro\source\repos\letzit\admin-webservice\src\Admin.WebAPI\UseCases\V1\Users\Get\UsersController.cs:line 43
at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.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.g__Awaited|19_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at Microsoft.AspNetCore.Routing.EndpointMiddleware.g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(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 Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)`_
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with CancellablePipelineAsync.Pipeline.PublishAsync and the stack trace's UsersController.Get at line 43 to determine where the cancellation originates when using the Blazor Virtualize component. Reproduce the OperationCanceledException and trace the request through FluentMediator; done means the request no longer fails unexpectedly, with a regression test covering the scenario.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100