Skip to content

fetch failed / UND_ERR_SOCKET on Windows WSL when connecting to Google Gemini #91675

Description

@jlrky

Bug type

Crash (process/app exits or hangs)

Beta release blocker

No

Summary

Environment:

  • Windows 10 Build 26200
  • OpenClaw v2026.5.28
  • WSL Gateway (OpenClawGateway)
  • Hardware: Lenovo IdeaPad (model 81SQ), 4GB RAM

Problem:
Every attempt to chat fails with an agent error. The gateway is connected and healthy, but all LLM requests to Google Gemini fail with a network socket error.

Error from logs:

LLM request failed: network connection error.
failoverReason: timeout
rawErrorPreview: fetch failed
causeName: SocketError
causeCode: UND_ERR_SOCKET
providerRuntimeFailureKind: timeout

Models tried:

  • google/gemini-3.1-pro-preview
  • google/gemini-3-flash-preview

What works:

What doesn't work:

  • Any chat message immediately fails with the above socket error
  • The auth profile goes into cooldown after each failed attempt
  • Deleting the auth-state.json file and re-authenticating does not fix it
  • The issue persists across gateway restarts and full Windows reboots

Additional notes:

  • The error hash sha256:e2c73a8fd237 appears consistently across all attempts
  • Node.js was not installed in the WSL environment by default; installed via nvm as a workaround but did not resolve the issue
  • WSL occasionally crashes with Wsl/Service/E_UNEXPECTED after extended use

Steps to reproduce:

  1. Install OpenClaw on Windows 10 with WSL gateway
  2. Configure Google Gemini as the AI provider and enter a valid API key
  3. Send any message in Chat
  4. Observe "Agent error" / fetch failed in logs

Steps to reproduce

no reply

Expected behavior

chat should send reply

Actual behavior

agent error

OpenClaw version

2026.5.28

Operating system

Lenovo IdeaPad 81SQ Windows 10 Build 26200

Install method

Windows Hub / Companion App

Model

google/gemini-3.1-pro-preview

Provider / routing chain

Windows Hub → Local WSL Gateway (localhost:18789) → Google Gemini API (generativelanguage.googleapis.com)

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High-priority user-facing bug, regression, or broken workflow.bugSomething isn't workingbug:crashProcess/app exits unexpectedly or hangsclawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.impact:crash-loopCrash, hang, restart loop, or process-level availability failure.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions