MongoDB node "Find and Update" error

I’m having problems with the MongoDB node after I updated n8n to version 1.44.1

{
“errorMessage”: “input must be a 24 character hex string, 12 byte Uint8Array, or an integer”,
“errorDetails”: {},
“n8nDetails”: {
“n8nVersion”: “1.44.1 (Self Hosted)”,
“binaryDataMode”: “default”,
“stackTrace”: [
“BSONError: input must be a 24 character hex string, 12 byte Uint8Array, or an integer”,
" at new ObjectId (/usr/local/lib/node_modules/n8n/node_modules/bson/src/objectid.ts:118:15)“,
" at Object.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/MongoDb/MongoDb.node.js:219:45)”,
" at processTicksAndRejections (node:internal/process/task_queues:95:5)“,
" at Workflow.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/Workflow.js:728:19)”,
" at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:664:51",
" at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:1079:20"
]
}
}

1 Like

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 @Joao_Paulo_Campos

Is it possible that the input from the previous node has changed? Which node provides the _id ?

If you use it with an expression ( {{ $json._id }} ) it should work:

I’m getting the same issue. Seems to be _id is being returned since the update with double quotes.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.