elsa-workflows / elsa-core

A .NET workflows library
https://v3.elsaworkflows.io/
MIT License
6.42k stars 1.19k forks source link

ElsaStudio (Blazor Server) error when trying to view a workflow instance #4709

Open Icidis opened 11 months ago

Icidis commented 11 months ago

Hi,

When trying to view the workflow definition instance I'm getting the following error and the designer disappears:

image

JSException: Cannot read properties of null (reading 'getBoundingClientRect') TypeError: Cannot read properties of null (reading 'getBoundingClientRect') at Module.getVisibleHeight (https://localhost:7130/_content/Elsa.Studio.DomInterop/dom.entry.js:74:26) at https://localhost:7130/_framework/blazor.server.js:1:3506 at new Promise (<anonymous>) at Ft.beginInvokeJSFromDotNet (https://localhost:7130/_framework/blazor.server.js:1:3480) at Ft._invokeClientMethod (https://localhost:7130/_framework/blazor.server.js:1:75072) at Ft._processIncomingData (https://localhost:7130/_framework/blazor.server.js:1:72696) at Ft.connection.onreceive (https://localhost:7130/_framework/blazor.server.js:1:67009) at i.onmessage (https://localhost:7130/_framework/blazor.server.js:1:51322)

Definition: example_-user-task-workflow-definition.json

Workflow Instance: d02621bfc80f4ff3.json

Also note: When doing this for a different workflow definition that only does write-lines and no suspending state it works perfectly.

image

If anyone has an idea why the cause could be it would be helpful.

hpposch commented 10 months ago

Hi, i see the same error on my side. Any news on that issue?

sfmskywalker commented 10 months ago

Thanks for providing the workflow definition and instance JSON exports.

I am not able to reproduce this issue with the latest version and will close the issue as such. However, please feel free to reopen if you can still reproduce this issue with the latest version. Thank you.

TimNguyenVN commented 2 months ago

Hi @sfmskywalker, Sometimes, I encounter the same error with Elsa 3.2.0-rc3 on my end (around three times), but I haven't been able to reliably reproduce it. It usually happens when navigating between screens. cc @Icidis image

tienpham-quantalytix commented 2 months ago

hello @sfmskywalker, i have same problem in elsa 3 !!!!

sfmskywalker commented 2 months ago

Reopened for another round of triage.

TimNguyenVN commented 1 month ago

Hi @sfmskywalker, I was able to reproduce the issue with the following steps: Note this is not the only way the error occurs, it's just one case.

This issue doesn't always occur on the first attempt, so if you're unable to reproduce it initially, please try it again. This is the video when I try to reproduce it.

https://github.com/user-attachments/assets/7aaac79c-8fab-4eef-8ef4-05d04c972f4f

Let me know if you need further details or clarification!

sfmskywalker commented 1 week ago

@TimNguyenVN Thank you for the additional details and video. I have tried to reproduce the issue accordingly with the current version of the main branch, with no avail. However, when switching between two tabs (1 tab for the sub workflow and another tab for the consuming workflow), I do notice that, without refreshing the consuming workflow tab before executing the activity, the activity dissapears. I suspect that this has something to do with the activity registry getting out of sync, which would be a separate issue.

When you get a chance, it would be interesting to see if you can still reproduce the issue with the 3.3 release happening later this year.