n8n-io / n8n

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

Error output not working on Postgres Node #11265

Closed pdondin closed 1 day ago

pdondin commented 1 day ago

Bug Description

Using any node setting (select, update... or sql queries) - when using a specific error management parameter - will return no result (empty result object).

To Reproduce

  1. Create a step with Postgres Node
  2. Add a basic select that should result in something
  3. Set the parameter "On Error" to "Continue (using error output)"
  4. Run the node
  5. Should result in empty result
  6. Try with the parameter "On Error" to "Stop workflow"
  7. Should result in the expected result

Expected behavior

Returning the same result

Operating System

Alpine Linux v3.20

n8n Version

1.62.5

Node.js Version

v20.18.0

Database

PostgreSQL

Execution mode

main (default)

Joffcom commented 1 day ago

Hey @pdondin,

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

leesilverman commented 1 day ago

Also just encountered this in 1.62.5. This problem is breaking many of my automations.

I this workflow, Postgres1 will return an item, Postgres2 will not. The only difference is that Postgres2 has an error output.

{ "meta": { "instanceId": "56a3b6e808c84fdadd2d80585289500a7b27625c2792fc6c214518fe7ce0a003" }, "nodes": [ { "parameters": {}, "id": "7285ed37-2d8a-4d66-b51a-08569fa9b7bd", "name": "When clicking \"Execute Workflow\"", "type": "n8n-nodes-base.manualTrigger", "typeVersion": 1, "position": [ 780, 880 ] }, { "parameters": { "operation": "executeQuery", "query": "Select NOW()::date ;", "options": {} }, "id": "572a255f-9e7a-4a83-b07b-0e32848aaa7f", "name": "Postgres1", "type": "n8n-nodes-base.postgres", "typeVersion": 2.3, "position": [ 1160, 880 ], "retryOnFail": true, "credentials": { "postgres": { "id": "VEr7bxWUKIQlYdtb", "name": "Postgres Fulfillment Database" } } }, { "parameters": { "operation": "executeQuery", "query": "Select NOW()::date ;", "options": {} }, "id": "c3107b8a-2344-405e-bebc-ee35c66b4f0a", "name": "Postgres2", "type": "n8n-nodes-base.postgres", "typeVersion": 2.5, "position": [ 1160, 1100 ], "credentials": { "postgres": { "id": "VEr7bxWUKIQlYdtb", "name": "Postgres Fulfillment Database" } }, "onError": "continueErrorOutput" } ], "connections": { "When clicking \"Execute Workflow\"": { "main": [ [ { "node": "Postgres2", "type": "main", "index": 0 }, { "node": "Postgres1", "type": "main", "index": 0 } ] ] } }, "pinData": {} }

pdondin commented 1 day ago

@leesilverman Looks like it happens on any node using the additional error output parameter :/ ive seen several issues being raised for this

leesilverman commented 1 day ago

I haven't tested any module besides postgres. But I use the error output extensively, especially on HTTP module, so if this is a broader problem it's going to be tough to manually override.

Tried downgrading to 1.61.0 but then I couldn't log in. Something must have changed in the n8n admin database structure.

Tried downgrading to 1.62.0 but still encounter this problem.

Confirmed that in 1.62.0 if I remove the error output from postgres module it works as expected.

netroy commented 1 day ago

We are working on getting this fixed in #11238, and will push out a patch release as soon as this is merged.

leesilverman commented 1 day ago

Preliminary testing shows this working in 1.62.6. Thanks for pushing out a fix so quickly!

pdondin commented 1 day ago

Hey Netroy thanks a lot!!

Just curious, I'm using a docker image to deploy my instance, it looks like those version are not available through a public image.

What's your way of deploying it @leesilverman ?

EDIT : nvm I found the docker image

janober commented 1 day ago

Fix got released with n8n@1.62.6

netroy commented 1 day ago

@pdondin The images finished building only about 15 minutes ago. Maybe there is some replication delay. I can see the images on docker hub and on ghcr. Can you please try again?

pdondin commented 1 day ago

yes nvm, worked out a minute after, idk if this was related to a wrong URL or the image not being published

edited my comment :')