docs: document Node 26 fetch failed workaround#4301
Conversation
| ## Common error messages and solutions | ||
|
|
||
| - **Error: `[API Error: Connection error. (cause: fetch failed)]` on every API call with Node.js v26.** | ||
| - **Cause:** Node.js v26 can be incompatible with the HTTP client path used by Qwen Code 0.15.11. In this case, Qwen Code may fail before it opens a network connection even when the same endpoint, model, and API key work with `curl` or a direct `node` `fetch()` request. |
There was a problem hiding this comment.
[Suggestion] The hardcoded version pins "Qwen Code 0.15.11" and "Node.js v22.22.3 LTS" will become stale quickly. 0.15.11 is the only Qwen Code version pin anywhere in docs/; once 0.16+ ships (or once Node v26 itself becomes LTS), readers won't know whether the workaround still applies. .nvmrc already targets 22 (no patch) and engines says >=22.0.0, so v22.22.3 is unnecessary precision.
Consider version-agnostic phrasing plus a tracking link so future maintainers can tell whether the root cause is resolved:
| - **Cause:** Node.js v26 can be incompatible with the HTTP client path used by Qwen Code 0.15.11. In this case, Qwen Code may fail before it opens a network connection even when the same endpoint, model, and API key work with `curl` or a direct `node` `fetch()` request. | |
| - **Error: `[API Error: Connection error. (cause: fetch failed)]` on every API call with Node.js v26.** | |
| - **Cause:** Node.js v26 can be incompatible with the HTTP client path used by Qwen Code (known to affect versions up to 0.15.11). In this case, Qwen Code may fail before it opens a network connection even when the same endpoint, model, and API key work with `curl` or a direct `node` `fetch()` request. | |
| - **Solution:** Use a supported Node.js LTS release (v22.x). For example: | |
| ```bash | |
| nvm install 22 | |
| nvm use 22 | |
| qwen -p "hi" | |
| ``` | |
| - **How to verify:** If the request works after switching Node.js versions, your base URL, model IDs, and API key were likely already correct; the Node.js runtime version was the blocker. |
Note: Node.js v26 satisfies the >=22.0.0 engine requirement, so npm install succeeds without warning — the incompatibility only manifests at runtime. Consider mentioning this so users on v26 aren't surprised by a clean install followed by a runtime failure.
— qwen-latest-series-invite-beta-v28 via Qwen Code /review
| - **Error: `Qwen OAuth free tier was discontinued on 2026-04-15`** | ||
| - **Cause:** Qwen OAuth is no longer available as of April 15, 2026. | ||
| - **Solution:** Switch to a different authentication method. Run `qwen` → `/auth` and choose one of: | ||
| - **Solution:** Switch to a different authentication method. Run `qwen` -> `/auth` and choose one of: |
There was a problem hiding this comment.
[Suggestion] Unrelated drive-by change: this line swaps → (unicode) for -> (ASCII), but the PR title/body only describe the Node.js v26 entry. The unicode → is the established convention in 20+ locations across docs/users/ (e.g. CLI → env → settings → defaults, Run qwen → /auth, Continue with Quickstart (5 mins) →). After this change, line 14 becomes the sole outlier in instructional prose.
Suggested: revert to → here, or — if the intent is to standardize on ASCII arrows — split that into a separate PR with a matching scope description.
| - **Solution:** Switch to a different authentication method. Run `qwen` -> `/auth` and choose one of: | |
| - **Solution:** Switch to a different authentication method. Run `qwen` → `/auth` and choose one of: |
— qwen-latest-series-invite-beta-v28 via Qwen Code /review
Summary
[API Error: Connection error. (cause: fetch failed)]Problem
Qwen Code can show
[API Error: Connection error. (cause: fetch failed)]for every API call even thoughcurland directnoderequests reach the endpoint fine.Root Cause
Node.js v26.0.0 can be incompatible with Qwen Code 0.15.11's HTTP client path using undici/OpenAI SDK, causing the SDK request pipeline to fail before the endpoint is reached.
Fix / Workaround
Downgrade Node.js from v26.0.0 to v22.22.3 LTS and retry with the same Qwen Code config.
Validation
Docs-only change. The workaround was validated by switching Node.js v26.0.0 to v22.22.3 LTS while keeping the same base URL, model IDs, and API key.