{"record":{"id":"c6156fca6b90a173","repo":"n8n-io/n8n","slug":"mcp-server-this-config-name-connectiontimeou","errorCode":null,"errorMessage":"MCP server \"${this.config.name}\": connectionTimeoutMs must be a positive finite number","messagePattern":"MCP server \"(.+?)\": connectionTimeoutMs must be a positive finite number","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/@n8n/agents/src/runtime/mcp/mcp-connection.ts","lineNumber":128,"sourceCode":"\t\tthis.connectionPromise = this.connectWithTransport(this.createTransport(this.config, sdk));\n\t\ttry {\n\t\t\tawait this.connectionPromise;\n\t\t} catch (error) {\n\t\t\tthis.connectionPromise = undefined;\n\t\t\tthrow error;\n\t\t}\n\t}\n\n\tprivate async connectWithTransport(transport: McpTransport): Promise<void> {\n\t\tif (!this.client) throw new Error('MCP client not initialized; connect() must be called first');\n\t\tconst client = this.client;\n\t\tconst timeoutMs = this.config.connectionTimeoutMs;\n\t\tif (timeoutMs === undefined) {\n\t\t\tawait client.connect(transport);\n\t\t\treturn;\n\t\t}\n\t\tif (!Number.isFinite(timeoutMs) || timeoutMs <= 0) {\n\t\t\tthrow new Error(\n\t\t\t\t`MCP server \"${this.config.name}\": connectionTimeoutMs must be a positive finite number`,\n\t\t\t);\n\t\t}\n\t\tlet timeoutId: ReturnType<typeof setTimeout> | undefined;\n\t\ttry {\n\t\t\tawait Promise.race([\n\t\t\t\tclient.connect(transport),\n\t\t\t\tnew Promise<never>((_, reject) => {\n\t\t\t\t\ttimeoutId = setTimeout(() => {\n\t\t\t\t\t\treject(\n\t\t\t\t\t\t\tnew Error(\n\t\t\t\t\t\t\t\t`MCP server \"${this.config.name}\": connection timed out after ${timeoutMs}ms`,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t);\n\t\t\t\t\t}, timeoutMs);\n\t\t\t\t}),\n\t\t\t]);\n\t\t} catch (error) {","sourceCodeStart":110,"sourceCodeEnd":146,"githubUrl":"https://github.com/n8n-io/n8n/blob/5ac6606e81f67bb9534255570cd4e86fd8101eee/packages/@n8n/agents/src/runtime/mcp/mcp-connection.ts#L110-L146","documentation":"Thrown by the Set node validator (v3.3+) when an assignment object is missing a non-empty id, name, or type field. Each of those three keys must be a non-empty trimmed string; whitespace-only values are treated as missing.","triggerScenarios":"For a record assignment, the validator iterates keys ['id','name','type'] and fires one issue per key where !isNonEmptyString(assignment[key]). Reported at parameterPath parameters.assignments.assignments[index].<key>.","commonSituations":"Forgetting the id (which v3.3 requires); leaving type blank; an AI builder omits type assuming it is inferred; whitespace copied from a template.","solutions":["Provide a non-empty id (uuid or incrementing id) for every assignment.","Provide a non-empty name (the output field name) and a non-empty type (e.g. 'string', 'number', 'boolean').","Strip accidental whitespace from these fields."],"exampleFix":"// before — missing id and type\nassignments: { assignments: [{ name: 'status', value: 'ok' }] }\n\n// after\nassignments: {\n  assignments: [{ id: '1', name: 'status', value: 'ok', type: 'string' }],\n}","handlingStrategy":"validation","validationCode":"function isNonEmptyString(v: unknown): v is string {\n  return typeof v === 'string' && v.trim() !== '';\n}\n\nfunction validateAssignmentKeys(a: Record<string, unknown>): string[] {\n  return (['id', 'name', 'type'] as const).filter((k) => !isNonEmptyString(a[k]));\n}\n\nconst missing = validateAssignmentKeys(assignment);\nif (missing.length) throw new Error(`Assignment missing: ${missing.join(', ')}`);","typeGuard":"function isNonEmptyString(v: unknown): v is string {\n  return typeof v === 'string' && v.trim() !== '';\n}","tryCatchPattern":null,"preventionTips":["Always emit a unique id alongside name/type for each assignment.","Generate ids with a uuid/incrementing counter rather than leaving blank.","Strip whitespace and reject empty strings for these keys."],"tags":["set-node","assignments","parameters","node-version"],"backgroundTag":null,"analyzedSha":"5ac6606e81f67bb9534255570cd4e86fd8101eee","analyzedAt":"2026-08-12T05:26:35.080Z","schemaVersion":2},"datasetVersion":"2026-08-13T14:17:21.547Z"}