n8n-io / n8n

Free and source-available fair-code licensed workflow automation tool. Easily automate tasks across different services.
https://n8n.io
Other
45.52k stars 6.27k forks source link

ERROR: Failed to extend syntax #5209

Closed rfehling-mittwald closed 1 year ago

rfehling-mittwald commented 1 year ago

We updated to the newest n8n version v0.212.0, and our already existing workflows are crashing.

ERROR: Failed to extend syntax

Create a code node with just an empty list and use an expression with "?". This will crash, but did not crash in 0.210.

Easiest Example that exists:

Code Node Once Each Item:

return {
  json: {
    test: [],
  }
}

If Node :boom: : {{$json["test"]?.length >0}}

If this is not a bug, do we have to to manual type checks like?: {{$json["test"] !== undefined && $json["test"].length >0}}

We may overused the expression function in the past :sweat_smile:

Joffcom commented 1 year ago

Hey @rfehling-mittwald,

Thanks for reporting this one, We already have this one logged internally and we are tracking it as PAY-105. That example to reproduce is handy as well 🙌🏻

ivov commented 1 year ago

Should be addressed by https://github.com/n8n-io/n8n/pull/5219

janober commented 1 year ago

Fix got released with n8n@0.212.1