n8n-io/n8n · error · UnsupportedFunctionError

The function "${functionName}" is not supported in the Code

Error message

The function "${functionName}" is not supported in the Code Node

What it means

Thrown by the JS Task Runner when user code in a Code Node calls one of the helper functions explicitly listed in UNSUPPORTED_HELPER_FUNCTIONS. These are helpers that exist in the regular Code Node execution context but are deliberately not exposed in the task runner (e.g. credential-dependent helpers, stream-based helpers, or removed/deprecated functions). The runner installs a stub that throws UnsupportedFunctionError immediately on invocation.

Source

Thrown at packages/@n8n/task-runner/src/js-task-runner/js-task-runner.ts:602

			this.nodeTypes.addNodeTypeDescriptions(nodeTypes);
		}
	}

	private buildRpcCallObject(taskId: string) {
		const rpcObject: RpcCallObject = {};

		for (const rpcMethod of EXPOSED_RPC_METHODS) {
			set(
				rpcObject,
				rpcMethod.split('.'),
				async (...args: unknown[]) => await this.makeRpcCall(taskId, rpcMethod, args),
			);
		}

		for (const rpcMethod of UNSUPPORTED_HELPER_FUNCTIONS) {
			set(rpcObject, rpcMethod.split('.'), () => {
				throw new UnsupportedFunctionError(rpcMethod);
			});
		}

		return rpcObject;
	}

	private buildCustomConsole(taskId: string): CustomConsole {
		return {
			// all except `log` are dummy methods that disregard without throwing, following existing Code node behavior
			...JsTaskRunner.CONSOLE_METHODS.reduce<Record<string, () => void>>((acc, name) => {
				acc[name] = noOp;
				return acc;
			}, {}),

			// Send log output back to the main process. It will take care of forwarding
			// it to the UI or printing to console.
			log: (...args: unknown[]) => {
				const formattedLogArgs = args.map((arg) => {

View on GitHub (pinned to 5ac6606e81)

Solutions

  1. Replace helpers.httpRequestWithAuthentication with a manual credential fetch + helpers.httpRequest call.
  2. For binary/stream helpers, use $input.item.json to access binary metadata or move the logic to a dedicated node.
  3. For helpers.copyBinaryFile (removed), use the binary data write API or a suitable node instead.
  4. Check the UNSUPPORTED_HELPER_FUNCTIONS list in runner-types.ts to confirm which helpers are unavailable in task-runner mode.

Example fix

// before
const response = await this.helpers.httpRequestWithAuthentication.call(
  this,
  'myApi',
  { method: 'GET', url: 'https://api.example.com/data' }
);
// after — fetch credential and use plain httpRequest
const cred = await this.helpers.getCredentials.call(this, 'myApi');
const response = await this.helpers.httpRequest({
  method: 'GET',
  url: 'https://api.example.com/data',
  headers: { Authorization: `Bearer ${cred.token}` },
});
Defensive patterns

Strategy: try-catch

Validate before calling

import { UNSUPPORTED_HELPER_FUNCTIONS } from '@n8n/task-runner/runner-types';

// Check before calling if the helper might be unsupported
function isUnsupportedHelper(path: string): boolean {
  return UNSUPPORTED_HELPER_FUNCTIONS.includes(path as any);
}

if (isUnsupportedHelper('helpers.createReadStream')) {
  // use an alternative approach
}

Try / catch

import { UnsupportedFunctionError } from '@n8n/task-runner';

try {
  const result = await this.helpers.someHelper();
} catch (e) {
  if (e instanceof UnsupportedFunctionError) {
    // fall back to an alternative implementation
    return await alternativeApproach();
  }
  throw e;
}

Prevention

When it happens

Trigger: User JavaScript in a Code Node running in task-runner mode calls one of: helpers.httpRequestWithAuthentication, helpers.requestWithAuthenticationPaginated, helpers.copyBinaryFile, helpers.createReadStream, helpers.getBinaryStream, helpers.binaryToBufgetBinaryMetadata, helpers.getStoragePath, helpers.getBinaryPath, or other functions in the UNSUPPORTED_HELPER_FUNCTIONS list. The stub function placed by buildRpcCallObject intercepts the call and throws.

Common situations: Migrating a workflow from the internal Code Node execution mode to the task runner (ADVANCED_CODE_EXECUTION or external runner). Using helpers that depend on credentials in a Code Node that has none. Using stream-based binary helpers that can't be serialized over the RPC boundary between runner and main process.

Related errors


AI-assisted analysis of n8n-io/n8n@5ac6606e81 (2026-08-12). Data as JSON: /api/errors/9cc548da4052c92f. Report an issue: GitHub.