elsa-workflows / elsa-workflows/elsa-core
Error when trying to view a workflow instance
- 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

## 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
Assessment
This issue has not been assessed yet.