"[ERROR: Can’t get data for expression]" on Set node variable preview when connected to both ends of If node

This one is a bit tricky to understand, but it is most certainly an annoying bug:

On a Set node, when accessing a value from a previous node, if connected to both ends of an IF node (EDIT: at least one of them directly), the Set node can’t display the value of the variable, resulting on an “[ERROR: Can’t get data for expression]” error. This does not affect the actual functionality of the workflow, only the variable preview.

See the following workflow:

After executing the previous workflow and clicking on the “Error on display” node, it shows the following error:
image

The “No error on display” node, however, doesn’t show the error, even though it is a copy of the “Error on display” node:
image

One thing to note is that if the “Error on display” node is not connected to one of the ends of the IF node, the bug is not reproducible:

In this case, after executing the workflow, the “Error on display” node shows the variable preview as expected:

image

EDIT: If the Set node that access the previous value is not directly connected to any of the ends of the IF node, the behavior is not reproducible:

Information on your n8n setup

  • n8n version: Reproducible on both 0.212.1 and 0.226.0

Hi @miguel-mconf, thanks for reporting this and sorry for the trouble! I’ll make sure to add this to our bug tracker.

As this is mainly a display issue (your workflow is still running after all), it may take a while to get it looked at, but we’ll make sure to post an update in this thread as soon as it’s resolved :slight_smile:

Facing same issue

Same here. Just spent ages trying to debug, then found this thread :slight_smile:

Hi folks, I am so sorry for the trouble. I’ve brought this up once again with the engineering team seeing this is affecting multiple users and will get back to you once I get feedback on this.

1 Like