n8n-io / n8n

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

JS script running in EditField node blocked UI #11923

Open tqjason opened 4 days ago

tqjason commented 4 days ago

Bug Description

{"nodes":[{"parameters":{"assignments":{"assignments":[{"id":"6da14b3e-bee4-4f8e-b817-95faa538bac2","name":"abc","value":"{\"a1\":\"hy3\",\"_page\":{\"p1\":\"1\",\"p2\":\"8\"}}","type":"object"}]},"options":{}},"id":"46b93bbf-0c2e-460d-a83a-1e20bc0666a8","name":"EditFields","type":"n8n-nodes-base.set","typeVersion":3.4,"position":[220,0]},{"parameters":{},"type":"n8n-nodes-base.manualTrigger","typeVersion":1,"position":[0,0],"id":"66717554-6201-488e-a175-9cd064682846","name":"Whenclicking‘Testworkflow’"},{"parameters":{"assignments":{"assignments":[{"id":"074eae0e-f741-4896-8069-2c38ace2e196","name":"querylist","value":"={{Array.from(\n{\"length\":2},\n(_,i)=>{\nq=$json.abc;\nq._page={\"p1\":(i+1).toString(),\"p2\":\"150\"};\nreturn q;\n}\n)}}","type":"array"}]},"options":{}},"type":"n8n-nodes-base.set","typeVersion":3.4,"position":[440,0],"id":"e309c9cc-e73a-4d09-b7a5-0c5375f1a66b","name":"EditFields1"}],"connections":{"EditFields":{"main":[[{"node":"EditFields1","type":"main","index":0}]]},"Whenclicking‘Testworkflow’":{"main":[[{"node":"EditFields","type":"main","index":0}]]},"EditFields1":{"main":[[]]}},"pinData":{}}

copy this code to a clean workflow, and manually exec workflow. It blocks n8n UI

To Reproduce

copy this code to a clean workflow, and manually exec workflow. It blocks n8n UI

Expected behavior

expect output like this

[
  {
    "querylist": [
      {
        "a1": "hy3",
        "_page": {
          "p1": "1",
          "p2": "150"
        }
      },
      {
        "a1": "hy3",
        "_page": {
          "p1": "2",
          "p2": "150"
        }
      }
    ]
  }
]

Operating System

docker

n8n Version

1.69

Node.js Version

18

Database

SQLite (default)

Execution mode

main (default)

Joffcom commented 4 days ago

Hey @tqjason,

We have created an internal ticket to look into this which we will be tracking as "GHC-509"