Postgres Node Issuse After Update

I’ve just updated n8n to “latest” and some of my workflows have started to fail, after reviewing, the insert op on the postgres node started to fail

this is the node:

this is the error:

{
  "errorMessage": "Values null/undefined cannot be used as raw text.",
  "errorDetails": {},
  "n8nDetails": {
    "n8nVersion": "1.76.1 (Self Hosted)",
    "binaryDataMode": "default",
    "stackTrace": [
      "TypeError: Values null/undefined cannot be used as raw text.",
      "    at throwIfRaw (/usr/local/lib/node_modules/n8n/node_modules/pg-promise/lib/formatting.js:257:15)",
      "    at Object.json (/usr/local/lib/node_modules/n8n/node_modules/pg-promise/lib/formatting.js:739:13)",
      "    at /usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Postgres/v2/helpers/utils.js:321:38",
      "    at Array.forEach (<anonymous>)",
      "    at convertValuesToJsonWithPgp (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Postgres/v2/helpers/utils.js:320:10)",
      "    at ExecuteContext.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Postgres/v2/actions/database/insert.operation.js:172:66)",
      "    at processTicksAndRejections (node:internal/process/task_queues:95:5)",
      "    at ExecuteContext.router (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Postgres/v2/actions/router.js:59:26)",
      "    at ExecuteContext.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Postgres/v2/PostgresV2.node.js:16:16)",
      "    at WorkflowExecute.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/execution-engine/workflow-execute.js:632:19)"
    ]
  }
}

As I work around I’ve used the execute SQL op, however, I expect this will cause some issues across other workflows.

Note that the values being passed are not undefined, null or empty despite what the error states.

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Hi @Wayne

Could you please share some sample data to be able to recreate the error? As of now, I cannot reproduce.

Thanks :slight_smile:

we also have the same issue

Hi Ria,

What data do you need?

I’m reluctant to update any prod n8n instances in case it affects anything but I can try to recreate to a dev instance if you can let me know what data you need.

Thanks
Wayne

Hi guys,
I have the same issue after the 1.74.1 update

But it looks like the problem is only with old workflows. Because if I create a new workflow it handles null/undefined well

@Oleksandr_Dovgopol good to know it’s not just me! I best not update n8n anywhere until this is fixed, I use Postgre alot!

Hi Wayne,
We are a team now))

We also frequently use Postgres, so I was scared of that error. Do you run into it in newly created workflows or only in old ones?

same issue here

I only updated one instance of n8n and noticed it right away, not sure if it exists elsewhere, this could cause some major issues for us so I’ll wait and see before updating other instances.

I haven’t noticed any issues with new workflows yet, but I haven’t been keeping an eye out for it - but I will now!

Hi guys,
we are aware of this bug and working on a fix. Will update here when released.

:pray: Thanks for reporting this!

1 Like

Hi guys, the fix went out with 1.76.3 - can you please feedback if that’s working for you?

Thanks :slight_smile:

1 Like

Still the same on 1.77.3:

{
  "errorMessage": "Values null/undefined cannot be used as raw text.",
  "errorDetails": {},
  "n8nDetails": {
    "n8nVersion": "1.77.3 (Self Hosted)",
    "binaryDataMode": "filesystem",
    "stackTrace": [
      "TypeError: Values null/undefined cannot be used as raw text.",
      "    at throwIfRaw (/usr/local/lib/node_modules/n8n/node_modules/pg-promise/lib/formatting.js:257:15)",
      "    at Object.json (/usr/local/lib/node_modules/n8n/node_modules/pg-promise/lib/formatting.js:739:13)",
      "    at /usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Postgres/v2/helpers/utils.js:321:38",
      "    at Array.forEach (<anonymous>)",
      "    at convertValuesToJsonWithPgp (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Postgres/v2/helpers/utils.js:320:10)",
      "    at ExecuteContext.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Postgres/v2/actions/database/insert.operation.js:172:66)",
      "    at processTicksAndRejections (node:internal/process/task_queues:95:5)",
      "    at ExecuteContext.router (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Postgres/v2/actions/router.js:59:26)",
      "    at ExecuteContext.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Postgres/v2/PostgresV2.node.js:16:16)",
      "    at WorkflowExecute.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/execution-engine/workflow-execute.js:633:19)"
    ]
  }
}

Hi!
I am on 1.77.3 but still have the same issue with some workflows

What additional info could I provide here to help you debug it?

Is anyone else still having this issue - I want to update n8n, but this gives me the fear :wink:

Hello there !
Just updated to 1.78.0 and the issue is still here ! :slight_smile: