elsa-workflows / elsa-workflows/elsa-core

Error when trying to view a workflow instance

Open
#6,731 10 comments 1 reaction 1 assignee Assigned to @Copilot View on GitHub
triaged
Dominant language
C#
Stars
7.9k
Forks
1.5k
Avg merge
15h 22m
Merged PRs (30d)
114

Description

## Description
I have been getting this issue across multiple versions of Elsa and for certain workflow definitions, although pretty inconsistent as to why as they don't use the same activities.

I get an error when trying to view the instance, in production the error is `NullReferenceException: Arg_NullReferenceException`

when running locally it is NullReferenceException: Object reference not set to an instance of an object.

4. **Reproduction Rate**: every time

## Expected Behavior
View the instance

## Actual Behavior
Error is thrown

## Screenshots
![Image](https://github.com/user-attachments/assets/7a691c92-22ff-404e-b66a-f872a2e1cc3b)

## Environment
- **Elsa Package Version**: 3.4.0

## Log Output
Sending HTTP request POST https://localhost:44397/elsa/api/workflow-instances/83def16940ce37f8/journal?*
info: System.Net.Http.HttpClient.IWorkflowInstancesApi.ClientHandler[101]
Received HTTP response headers after 50.6ms - 200
info: System.Net.Http.HttpClient.IWorkflowInstancesApi.LogicalHandler[101]
End processing HTTP request after 63.1ms - 200
fail: Microsoft.AspNetCore.Components.Web.ErrorBoundary[0]
System.NullReferenceException: Object reference not set to an instance of an object.
at Elsa.Studio.Workflows.Components.WorkflowInstanceViewer.Components.WorkflowInstanceDetails.GetLastWorkflowActivityExecutionRecordAsync(String workflowInstanceId)
at Elsa.Studio.Workflows.Components.WorkflowInstanceViewer.Components.WorkflowInstanceDetails.GetWorkflowActivityExecutionRecordAsync(String workflowInstanceId)
at Elsa.Studio.Workflows.Components.WorkflowInstanceViewer.Components.WorkflowInstanceDetails.OnParametersSetAsync()
at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)
System.NullReferenceException: Object reference not set to an instance of an object.
at Elsa.Studio.Workflows.Components.WorkflowInstanceViewer.Components.WorkflowInstanceDetails.GetLastWorkflowActivityExecutionRecordAsync(String workflowInstanceId)
at Elsa.Studio.Workflows.Components.WorkflowInstanceViewer.Components.WorkflowInstanceDetails.GetWorkflowActivityExecutionRecordAsync(String workflowInstanceId)
at Elsa.Studio.Workflows.Components.WorkflowInstanceViewer.Components.WorkflowInstanceDetails.OnParametersSetAsync()
at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.