Skip to content

docs: document Node 26 fetch failed workaround#4301

Open
debpramanik wants to merge 1 commit into
QwenLM:mainfrom
debpramanik:docs-node26-fetch-failed-workaround
Open

docs: document Node 26 fetch failed workaround#4301
debpramanik wants to merge 1 commit into
QwenLM:mainfrom
debpramanik:docs-node26-fetch-failed-workaround

Conversation

@debpramanik
Copy link
Copy Markdown

Summary

  • Document a Node.js v26-specific cause for [API Error: Connection error. (cause: fetch failed)]
  • Add Node.js v22.22.3 LTS as the immediate workaround
  • Clarify that if curl/direct Node requests work, the base URL, model IDs, and API key may already be correct

Problem

Qwen Code can show [API Error: Connection error. (cause: fetch failed)] for every API call even though curl and direct node requests 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.

## 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.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[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:

Suggested change
- **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:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[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.

Suggested change
- **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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants