Skip to content

Telegram Long-Polling Aborts Immediately on Node 22.22.0 #7519

Description

@alignedspark

Environment

  • OpenClaw version: 2026.2.1 (latest)
  • Node version: v22.22.0
  • OS: macOS 15.5 (arm64)
  • Installation: Homebrew (brew install openclaw)
  • Channel: Telegram (Bot API via grammY)

Issue

Telegram bot starts successfully but does not receive any incoming messages. The polling loop aborts immediately with AbortError.

Logs

2026-02-02T22:12:28.170Z warn [openclaw] Suppressed AbortError: AbortError: This operation was aborted
2026-02-02T22:12:38.686Z warn [openclaw] Suppressed AbortError: AbortError: This operation was aborted

Gateway shows:

2026-02-02T22:06:18.809Z info gateway/channels/telegram [default] starting provider (@SloanAI_Bot)
2026-02-02T22:06:18.816Z info telegram/network telegram: autoSelectFamily=false (default-node22)

But no subsequent polling activity - no getUpdates, no incoming message logs, nothing.

Symptoms

  • ✅ Outbound messages work (bot can send via message tool)
  • ✅ Bot API health checks pass (openclaw status --deep shows OK)
  • ✅ Telegram API getWebhookInfo shows no webhook conflict
  • ❌ Inbound messages never arrive at OpenClaw
  • pending_update_count stays at 0 even after fresh messages sent to bot
  • ❌ No polling logs in gateway output

Configuration

{
  "channels": {
    "telegram": {
      "enabled": true,
      "dmPolicy": "allowlist",
      "botToken": "8227...h8EM",
      "allowFrom": [577...534],
      "groupPolicy": "allowlist",
      "groupAllowFrom": [577...534],
      "streamMode": "partial"
    }
  }
}

Expected Behavior

Bot should continuously poll getUpdates and process incoming messages.

Actual Behavior

Polling loop aborts immediately on startup. Zero message processing.

Known Workaround

The documentation mentions:

"Long-polling aborts immediately on Node 22+ (often with proxies/custom fetch): Node 22+ is stricter about AbortSignal instances; foreign signals can abort fetch calls right away. Upgrade to a OpenClaw build that normalizes abort signals, or run the gateway on Node 20 until you can upgrade."

However:

  • Node 20 is not compatible - OpenClaw requires >=22.0.0
  • No updated build available - npm shows latest/beta both at 2026.2.1
  • Users are stuck - can't downgrade Node, can't upgrade OpenClaw

Impact

Telegram channel is completely broken on the current stable release with Node 22+. This affects:

  • All new macOS Homebrew installs (default to Node 22)
  • Anyone who upgraded Node recently
  • Production bots that can't receive messages

Request

Please prioritize a fix that normalizes abort signals for Node 22 compatibility, or update the minimum Node requirement in package.json if Node 20 is truly required.

Reproduction Steps

  1. Install OpenClaw 2026.2.1 on Node 22.22.0
  2. Configure Telegram bot with valid token
  3. Start gateway: openclaw gateway start
  4. Send message to bot from Telegram
  5. Observe: no message arrives at OpenClaw, AbortError in logs

Additional Context

  • grammY version: 1.39.3
  • @grammyjs/runner version: 2.0.3
  • Bot was created fresh via @Botfather
  • Privacy mode: disabled (bot should see all group messages)
  • No webhook configured (using long-polling)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingstaleMarked as stale due to inactivity

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions