-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Action out node does not return to parent node randomly #8
Comments
Is there a simplified flow you can paste or attach that depicts the issue? We’ll need to consistently reproduce it to resolve. Please be sure to state your platform/OS just incase it’s a lower level issue. |
The problem is that its not consistent so sometimes the same flow works and sometimes it gets stuck, the flows themselves are complicated, I will try to create demo flows and run them again and again and see if i can reproduce the issue even at random. I am running node red addon on Hass.IO on a powerful linux server, I think everything is dockerized, latest release node red v20.7 also there is no workaround to tell the parent flow to continue after some timeout or something like that? |
Hmm. Sounds like a timing related issue. This can be tricky. Any ratio of occurrence would help; but we do need a flow to "see/reslove" it. One item of help could be the internal global "actionflows" object. This is the internal structure that maintains a map of what-called-what and where to return too. There could be the possibility of this getting corrupted. Resetting it (but wiping out all AF) might resolve the issue and/or help trace it. I.e. you could dump it's content after one success flow and dump it again to capture a unresponsive one. To see inside, use a function node with the code:
To "click through" the JSON tree or stringify the structure
Unfortunately Node-RED's debug window will only show so much data before truncating. You might have better luck stringifying the content and dumping it to file. Likewise, a timer might be able to check the structure and "correct/abort" for it. |
For more information about programming the internal object directly, see: |
Amazing, ok this might take me a few days but I hope to come back with more concrete debugging information, edit: (you mean just to delete the entire global variable?) edit2: @Steveorevo I've emailed you my actionflows object and the node that it got stuck on, i hope it will help a bit Thanks! |
I have the same problem, but it's always reproducible in my case. As I know, it is allowed to return a new object, for exactly this use-case node-red attaches after each function node the _msgid again. Here the flow (hopefully self explaining)
|
Had the same issue and found out a solution: |
Hi,
Sometimes when using multiple layers of actionflows (3-4 layers down) the action flow gets stuck "running" and never returns to the parent flow to complete the flow that called it.
For example
Flow -> Action Flow 1 -> Action Flow 2 -> Action flow 3 -> Action flow 4
Action flow 4 completes the flow, but does not return to action flow 3,
if you go to action flow 3 you still see "Running"
Also I don't know how to debug it,
there is no error, and most of the time it works, other times it just gets stuck "Running",
I verified this by putting a debug on the node before the action out node, and the flow does reach there and gets the msg.payload, so the msg.payload is in fact sent to the action out node.
is there a way to force it to finish running somehow via a timer for now or some other workaround?
thanks
The text was updated successfully, but these errors were encountered: