n8n - 💡(How to fix) Fix OpenAI credential fails on n8n Cloud 2.19.5: config.headers.setContentType is not a function [3 comments, 3 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
n8n-io/n8n#30178Fetched 2026-05-11 03:26:49
View on GitHub
Comments
3
Participants
3
Timeline
9
Reactions
0
Timeline (top)
commented ×3mentioned ×2subscribed ×2closed ×1

Error Message

Describe the problem/error/question

What is the error message (if any)?

The error message shown in the OpenAI credential window is: The error happens when trying to connect/test the OpenAI credential.

  • error: all

Root Cause

No output is returned because the OpenAI credential connection fails before the workflow can execute correctly.

RAW_BUFFERClick to expand / collapse

Describe the problem/error/question

I’m using n8n self-hosted with Docker on version 2.19.5.

I’m trying to connect OpenAI credentials in n8n, but the credential test fails.

OpenAI setup seems valid:

  • New API key created
  • Credits are active on my OpenAI account
  • Organization ID is left empty
  • Base URL used: https://api.openai.com/v1
  • API key has read/write permissions

The issue seems to happen inside n8n before the OpenAI request completes correctly.

What is the error message (if any)?

The error message shown in the OpenAI credential window is:

config.headers.setContentType is not a function

Please share your workflow/screenshots/recording

I’m testing with a very simple workflow:

Manual Trigger → OpenAI “Message a model” node

The error happens when trying to connect/test the OpenAI credential.

Screenshot attached if needed.

Share the output returned by the last node

No output is returned because the OpenAI credential connection fails before the workflow can execute correctly.

Debug info

core

  • n8nVersion: 2.19.5
  • platform: docker (self-hosted)
  • nodeJsVersion: 24.14.1
  • nodeEnv: production
  • database: sqlite
  • executionMode: regular
  • concurrency: -1
  • license: enterprise (production)

storage

  • success: all
  • error: all
  • progress: false
  • manual: true
  • binaryMode: filesystem

pruning

  • enabled: true
  • maxAge: 336 hours
  • maxCount: 10000 executions

client

  • userAgent: mozilla/5.0 (macintosh; intel mac os x 10_15_7) applewebkit/537.36 (khtml, like gecko) chrome/148.0.0.0 safari/537.36
  • isTouchDevice: false

Generated at: 2026-05-10T16:40:02.819Z

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING