openclaw - 💡(How to fix) Fix [Bug]: Telegram: all outbound API calls fail (sendMessage, sendChatAction, editMessageText) while inbound polling works [1 comments, 2 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
openclaw/openclaw#53686Fetched 2026-04-08 01:24:50
View on GitHub
Comments
1
Participants
2
Timeline
3
Reactions
0
Author
Participants
Timeline (top)
labeled ×2commented ×1

On Windows 11 with Node v25, all outbound Telegram API calls fail with "Network request failed" while inbound polling (getUpdates) works correctly.

Error Message

[telegram] autoSelectFamily=true (config) [telegram] dnsResultOrder=ipv4first (config) [telegram] Polling stall detected (no getUpdates for 109.65s); forcing restart. [telegram] telegram sendChatAction failed: Network request for 'sendChatAction' failed! [telegram] telegram sendMessage failed: Network request for 'sendMessage' failed! [telegram] telegram final reply failed: HttpError: Network request for 'sendMessage' failed!

Workarounds already attempted without success:

  • Fixed IPv4 entry in Windows hosts file (149.154.166.110 api.telegram.org)
  • Windows Firewall rule blocking Telegram IPv6 address (2001:67c:4e8:f004::9)
  • autoSelectFamily: true + dnsResultOrder: ipv4first in config
  • Upgraded Node.js from v24 to v25
  • Updated OpenClaw from 2026.3.13 to 2026.3.23-2
  • Verified no active webhook (getWebhookInfo returns empty url)
  • Direct Node fetch test: node -e "fetch('https://api.telegram.org')" → OK status 200

Root Cause

On Windows 11 with Node v25, all outbound Telegram API calls fail with "Network request failed" while inbound polling (getUpdates) works correctly.

Fix Action

Fix / Workaround

Workarounds already attempted without success:

  • Fixed IPv4 entry in Windows hosts file (149.154.166.110 api.telegram.org)
  • Windows Firewall rule blocking Telegram IPv6 address (2001:67c:4e8:f004::9)
  • autoSelectFamily: true + dnsResultOrder: ipv4first in config
  • Upgraded Node.js from v24 to v25
  • Updated OpenClaw from 2026.3.13 to 2026.3.23-2
  • Verified no active webhook (getWebhookInfo returns empty url)
  • Direct Node fetch test: node -e "fetch('https://api.telegram.org')" → OK status 200

Code Example

[telegram] autoSelectFamily=true (config)
[telegram] dnsResultOrder=ipv4first (config)
[telegram] Polling stall detected (no getUpdates for 109.65s); forcing restart.
[telegram] telegram sendChatAction failed: Network request for 'sendChatAction' failed!
[telegram] telegram sendMessage failed: Network request for 'sendMessage' failed!
[telegram] telegram final reply failed: HttpError: Network request for 'sendMessage' failed!

Workarounds already attempted without success:
- Fixed IPv4 entry in Windows hosts file (149.154.166.110 api.telegram.org)
- Windows Firewall rule blocking Telegram IPv6 address (2001:67c:4e8:f004::9)
- autoSelectFamily: true + dnsResultOrder: ipv4first in config
- Upgraded Node.js from v24 to v25
- Updated OpenClaw from 2026.3.13 to 2026.3.23-2
- Verified no active webhook (getWebhookInfo returns empty url)
- Direct Node fetch test: node -e "fetch('https://api.telegram.org')"OK status 200
RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (incorrect output/state without crash)

Summary

On Windows 11 with Node v25, all outbound Telegram API calls fail with "Network request failed" while inbound polling (getUpdates) works correctly.

Steps to reproduce

  1. Install OpenClaw on Windows 11
  2. Configure Telegram channel with a valid bot token
  3. Start the gateway with openclaw gateway
  4. Send a message to the bot from Telegram
  5. Observe: message is received (polling works), but no reply is sent

Expected behavior

The bot should reply to incoming messages. sendMessage, sendChatAction, and editMessageText should succeed as they do in a standalone Node fetch call.

Actual behavior

All outbound Telegram API calls fail repeatedly with:

  • "telegram sendChatAction failed: Network request for 'sendChatAction' failed!"
  • "telegram sendMessage failed: Network request for 'sendMessage' failed!"
  • "telegram final reply failed: HttpError: Network request for 'sendMessage' failed!" Polling stall is also detected periodically, triggering forced restarts. Note: node -e "fetch('https://api.telegram.org')" returns HTTP 200 — the issue is internal to the gateway process.

OpenClaw version

2026.3.23-2 (7ffe7e4)

Operating system

Windows 11 (Build 26200.8037)

Install method

npm global install

Model

openai-codex/gpt-5.4

Provider / routing chain

openai-codex (OAuth) → gpt-5.4

Additional provider/model setup details

NOT_ENOUGH_INFO

Logs, screenshots, and evidence

[telegram] autoSelectFamily=true (config)
[telegram] dnsResultOrder=ipv4first (config)
[telegram] Polling stall detected (no getUpdates for 109.65s); forcing restart.
[telegram] telegram sendChatAction failed: Network request for 'sendChatAction' failed!
[telegram] telegram sendMessage failed: Network request for 'sendMessage' failed!
[telegram] telegram final reply failed: HttpError: Network request for 'sendMessage' failed!

Workarounds already attempted without success:
- Fixed IPv4 entry in Windows hosts file (149.154.166.110 api.telegram.org)
- Windows Firewall rule blocking Telegram IPv6 address (2001:67c:4e8:f004::9)
- autoSelectFamily: true + dnsResultOrder: ipv4first in config
- Upgraded Node.js from v24 to v25
- Updated OpenClaw from 2026.3.13 to 2026.3.23-2
- Verified no active webhook (getWebhookInfo returns empty url)
- Direct Node fetch test: node -e "fetch('https://api.telegram.org')" → OK status 200

Impact and severity

Affected channel: Telegram Severity: blocks workflow — the bot receives messages but cannot reply at all Frequency: always reproducible Consequence: Telegram channel is completely unusable; all outbound communication fails

Additional information

NOT_ENOUGH_INFO

extent analysis

Fix Plan

The fix involves modifying the node configuration and the openclaw gateway to properly handle IPv6 connections.

  • Step 1: Disable IPv6 Add the following flag when starting the openclaw gateway: --ipv6=disable Example: openclaw gateway --ipv6=disable
  • Step 2: Update node Configuration Set the dnsResultOrder to ipv4only in the node configuration. Example (using JavaScript):
    process.env.NODE_DEBUG = 'dns';
    const dns = require('dns');
    dns.setLookupFunction((hostname, options, callback) => {
      options.family = 4; // ipv4only
      dns.lookup(hostname, options, callback);
    });
  • Step 3: Verify openclaw Configuration Ensure that autoSelectFamily is set to true and dnsResultOrder is set to ipv4first in the openclaw configuration. Example (using JSON configuration file):
    {
      "telegram": {
        "autoSelectFamily": true,
        "dnsResultOrder": "ipv4first"
      }
    }

Verification

To verify that the fix worked, restart the openclaw gateway with the updated configuration and test the Telegram channel by sending a message to the bot. The bot should now be able to reply successfully.

Extra Tips

  • Ensure that the Windows Firewall is configured to allow outgoing connections to the Telegram API.
  • If issues persist, try setting up a proxy server to handle the outgoing connections.
  • Keep the node and openclaw versions up to date to ensure that any known issues are fixed.

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…

FAQ

Expected behavior

The bot should reply to incoming messages. sendMessage, sendChatAction, and editMessageText should succeed as they do in a standalone Node fetch call.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING