elsa-workflows / elsa-core

A .NET workflows library

Home Page:https://v3.elsaworkflows.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG]fail: Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware[1] An unhandled exception has occurred while executing the request.

captaris opened this issue · comments

System.Exception: Lost an owner context
at Elsa.Workflows.Services.WorkflowStateExtractor.ExtractCompletionCallbacks(WorkflowState state, WorkflowExecutionContext workflowExecutionContext)
at Elsa.Workflows.Services.WorkflowStateExtractor.Extract(WorkflowExecutionContext workflowExecutionContext)
at Elsa.Workflows.Services.WorkflowRunner.RunAsync(WorkflowExecutionContext workflowExecutionContext)
at Elsa.Workflows.Services.WorkflowRunner.RunAsync(WorkflowGraph workflowGraph, WorkflowState workflowState, RunWorkflowOptions options, CancellationToken cancellationToken)
at Elsa.Workflows.Runtime.Services.WorkflowHost.ResumeWorkflowAsync(ResumeWorkflowHostParams params, CancellationToken cancellationToken)
at Elsa.Workflows.Runtime.Services.DefaultWorkflowRuntime.ResumeWorkflowAsync(String workflowInstanceId, ResumeWorkflowRuntimeParams options)
at Elsa.Workflows.Runtime.Services.DefaultWorkflowRuntime.ResumeWorkflowAsync(String workflowInstanceId, ResumeWorkflowRuntimeParams options)
at Elsa.Workflows.Runtime.Services.DefaultWorkflowRuntime.ResumeWorkflowsAsync(IEnumerable1 bookmarks, ResumeWorkflowRuntimeParams runtimeParams) at Elsa.Workflows.Runtime.Services.DefaultWorkflowRuntime.ResumeWorkflowsAsync(String activityTypeName, Object bookmarkPayload, TriggerWorkflowsOptions options) at Elsa.Workflows.Runtime.Services.DefaultWorkflowInbox.ResumeWorkflowsSynchronouslyAsync(WorkflowInboxMessage message, CancellationToken cancellationToken) at Elsa.Workflows.Runtime.Services.DefaultWorkflowInbox.BroadcastAsync(WorkflowInboxMessage message, BroadcastWorkflowInboxMessageOptions options, CancellationToken cancellationToken) at Elsa.Workflows.Runtime.Handlers.ReadWorkflowInboxMessage.HandleAsync(WorkflowInboxMessageReceived notification, CancellationToken cancellationToken) at Elsa.Mediator.PublishingStrategies.SequentialProcessingStrategy.PublishAsync(NotificationStrategyContext context) at Elsa.Mediator.Middleware.Notification.Components.NotificationHandlerInvokerMiddleware.InvokeAsync(NotificationContext context) at Elsa.Mediator.Middleware.Notification.NotificationPipeline.ExecuteAsync(NotificationContext context) at Elsa.Mediator.Services.DefaultMediator.SendAsync(INotification notification, IEventPublishingStrategy strategy, CancellationToken cancellationToken) at Elsa.Workflows.Runtime.Services.DefaultWorkflowInbox.SubmitAsync(NewWorkflowInboxMessage newMessage, WorkflowInboxMessageDeliveryParams params, CancellationToken cancellationToken) at Elsa.Workflows.Runtime.Services.EventPublisher.PublishInternalAsync(String eventName, Boolean dispatchAsynchronously, String correlationId, String workflowInstanceId, String activityInstanceId, Object payload, CancellationToken cancellationToken) at Elsa.Workflows.Runtime.Services.EventPublisher.PublishAsync(String eventName, String correlationId, String workflowInstanceId, String activityInstanceId, Object payload, CancellationToken cancellationToken) at Elsa.Workflows.Api.Endpoints.Events.TriggerPublic.Trigger.HandleAsync(CancellationToken cancellationToken) at FastEndpoints.Endpoint2.ExecAsync(CancellationToken ct)
at FastEndpoints.Endpoint`2.ExecAsync(CancellationToken ct)
at Elsa.Http.Middleware.HttpWorkflowsMiddleware.InvokeAsync(HttpContext httpContext, IServiceProvider serviceProvider)
at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddlewareImpl.Invoke(HttpContext context)

This exception seems to be the same as reported via #5843, although the stack trace appears to be different. Can you provide detailed steps to reproduce this and or a sample project? Which version of Elsa are you seeing this?