Problem in node ‘Splunk‘ field.reduce is not a function

Describe the problem/error/question

What is the error message (if any)? Problem in node ‘Splunk‘ field.reduce is not a function

Please share your workflow

Share the output returned by the last node

Information on your n8n setup

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

Hey @hasanm,

Could you share a bit more information? Having the full error would be handy as well as knowing which of the 4 Splunk nodes displays it.

Dear Jon,

The problem occured when splunk node return one value from splunk, but when it return array, it’s work fine, i don’t know if this bug.
Best Reagrds

Hey @hasanm,

So do all 4 nodes produce this error? Can you also share the full error message.

this is the full error message
ERROR: field.reduce is not a function

Details

Stack

TypeError: field.reduce is not a function
    at formatResult (/usr/lib/node_modules/n8n/node_modules/n8n-nodes-base/nodes/Splunk/GenericFunctions.ts:196:15)
    at formatResults (/usr/lib/node_modules/n8n/node_modules/n8n-nodes-base/nodes/Splunk/GenericFunctions.ts:208:6)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at Object.execute (/usr/lib/node_modules/n8n/node_modules/n8n-nodes-base/nodes/Splunk/Splunk.node.ts:355:22)
    at Workflow.runNode (/usr/lib/node_modules/n8n/node_modules/n8n-workflow/src/Workflow.ts:1263:19)
    at /usr/lib/node_modules/n8n/node_modules/n8n-core/src/WorkflowExecute.ts:951:29

Splunk3

Execute node

Parameters


Docs

Credential to connect with

Resource

Operation

Search ID

Fixed

Expression

{{ $json.sid }}

1685035444.30722

Return All

Fixed

Expression

Filters

No properties

Add Filter

Options

No properties

Add Option

I wish this node would…

I also have same problem.

have the same problem and mostly its becaused of the below query:
sourcetype=asa | table _raw (with this query, it will return the error)

but below query works
sourcetype=asa | table src, dst, ua

the most quick reproduce step is just return table _raw.

We did an overhaul of the Splunk node 2 weeks ago, that went out in 1.50.0.
I see clear checks for Arrays in the code to avoid calling .reduce on non arrays.
Can you folks upgrade your n8n instance and let us know if you are still seeing this issue :pray: ?