Bug Report: Telegram Plugin Fails to Poll for Updates
Version: 2026.2.9
Platform: macOS (Darwin 25.2.0, arm64)
Node.js: v22.22.0
Date: 2026-02-10
Summary
The Telegram plugin starts successfully but never enters its polling loop to receive messages. The bot is accessible via direct API calls (curl, Node.js fetch), but OpenClaw's plugin fails with "fetch failed" errors during initialization and never polls for updates.
Environment
- OpenClaw Version:
2026.2.9
- OS: macOS (Darwin 25.2.0, arm64)
- Node.js: v22.22.0
- Installation: Homebrew (
/opt/homebrew/lib/node_modules/openclaw)
Reproduction Steps
- Configure Telegram bot in
openclaw.json:
{
"channels": {
"telegram": {
"enabled": true,
"accounts": {
"default": {
"name": "MyBot",
"botToken": "1234567890:ABCdefGHIjklMNOpqrsTUVwxyz",
"dmPolicy": "allowlist",
"allowFrom": [123456789]
}
}
}
},
"plugins": {
"entries": {
"telegram": {
"enabled": true
}
}
}
}
Start OpenClaw gateway
Send a message to the bot on Telegram
Expected: Bot receives and processes message
Actual: No response, no log entries for received messages
Observed Behavior
Logs show plugin starts but fails to initialize polling:
{"subsystem":"gateway/channels/telegram","message":"[default] starting provider (@mybotusername)","time":"2026-02-10T20:31:04.553Z","level":"INFO"}
{"subsystem":"gateway/channels/telegram","message":"telegram setMyCommands failed: Network request for 'setMyCommands' failed!","time":"2026-02-10T20:28:33.045Z","level":"ERROR"}
{"message":"Non-fatal unhandled rejection (continuing): TypeError: fetch failed\n at node:internal/deps/undici/undici:14902:13","time":"2026-02-10T20:28:33.048Z","level":"WARN"}
After the startup errors, no further Telegram-related logs appear — no polling activity, no update reception, complete silence.
What Works (Network is Fine)
✅ Direct curl to Telegram API works perfectly:
$ curl -s https://api.telegram.org/bot<TOKEN>/getMe
{"ok":true,"result":{"id":1234567890,"is_bot":true,"first_name":"MyBot","username":"mybotusername",...}}
✅ Node.js fetch works perfectly:
$ node -e "fetch('https://api.telegram.org/bot<TOKEN>/getMe').then(r => r.json()).then(console.log)"
{"ok":true,"result":{"id":1234567890,"is_bot":true,"first_name":"MyBot",...}}
✅ Telegram's getUpdates endpoint is reachable:
$ curl -s "https://api.telegram.org/bot<TOKEN>/getUpdates?limit=1"
{"ok":true,"result":[]}
Conclusion: Network connectivity is perfect. DNS resolves correctly. TLS handshake works. The bot token is valid. The issue is inside OpenClaw's Telegram plugin.
What We Tried
✅ Fresh bot token — Created brand new bot via @BotFather, same issue
✅ Disable/re-enable plugin — No change
✅ Removed all secondary agents — Simplified to single-agent config, same issue
✅ Gateway restarts — Multiple restarts, always same behavior
✅ Different bot tokens (3 total) — All exhibit identical behavior
Expected Behavior
The Telegram plugin should:
Start successfully (✅ this works)
Call setMyCommands (❌ fails with "fetch failed")
Enter polling loop via getUpdates (❌ never happens)
Receive and process incoming messages (❌ never happens)
Impact
Critical: Telegram is completely unusable. The plugin initializes but never actually connects to receive messages, rendering the channel non-functional.
Additional Context
iMessage plugin works perfectly on the same system
This was working previously (confirmed via message history)
Issue appeared after config changes and gateway restarts
Tested with multiple different bot tokens (all valid, all fail identically)
Possible Root Cause
The plugin appears to be using an internal fetch implementation that's failing (undici-based, from stack trace), while Node's global fetch works fine. Possible mismatch between undici version and Telegram API requirements, or proxy/TLS configuration issue specific to the plugin's HTTP client.
Workaround
None available. Channel is completely non-functional.
Bug Report: Telegram Plugin Fails to Poll for Updates
Version:
2026.2.9Platform: macOS (Darwin 25.2.0, arm64)
Node.js: v22.22.0
Date: 2026-02-10
Summary
The Telegram plugin starts successfully but never enters its polling loop to receive messages. The bot is accessible via direct API calls (curl, Node.js fetch), but OpenClaw's plugin fails with "fetch failed" errors during initialization and never polls for updates.
Environment
2026.2.9/opt/homebrew/lib/node_modules/openclaw)Reproduction Steps
openclaw.json:{ "channels": { "telegram": { "enabled": true, "accounts": { "default": { "name": "MyBot", "botToken": "1234567890:ABCdefGHIjklMNOpqrsTUVwxyz", "dmPolicy": "allowlist", "allowFrom": [123456789] } } } }, "plugins": { "entries": { "telegram": { "enabled": true } } } } Start OpenClaw gateway Send a message to the bot on Telegram Expected: Bot receives and processes message Actual: No response, no log entries for received messages Observed Behavior Logs show plugin starts but fails to initialize polling: {"subsystem":"gateway/channels/telegram","message":"[default] starting provider (@mybotusername)","time":"2026-02-10T20:31:04.553Z","level":"INFO"} {"subsystem":"gateway/channels/telegram","message":"telegram setMyCommands failed: Network request for 'setMyCommands' failed!","time":"2026-02-10T20:28:33.045Z","level":"ERROR"} {"message":"Non-fatal unhandled rejection (continuing): TypeError: fetch failed\n at node:internal/deps/undici/undici:14902:13","time":"2026-02-10T20:28:33.048Z","level":"WARN"} After the startup errors, no further Telegram-related logs appear — no polling activity, no update reception, complete silence. What Works (Network is Fine) ✅ Direct curl to Telegram API works perfectly: $ curl -s https://api.telegram.org/bot<TOKEN>/getMe {"ok":true,"result":{"id":1234567890,"is_bot":true,"first_name":"MyBot","username":"mybotusername",...}} ✅ Node.js fetch works perfectly: $ node -e "fetch('https://api.telegram.org/bot<TOKEN>/getMe').then(r => r.json()).then(console.log)" {"ok":true,"result":{"id":1234567890,"is_bot":true,"first_name":"MyBot",...}} ✅ Telegram's getUpdates endpoint is reachable: $ curl -s "https://api.telegram.org/bot<TOKEN>/getUpdates?limit=1" {"ok":true,"result":[]} Conclusion: Network connectivity is perfect. DNS resolves correctly. TLS handshake works. The bot token is valid. The issue is inside OpenClaw's Telegram plugin. What We Tried ✅ Fresh bot token — Created brand new bot via @BotFather, same issue ✅ Disable/re-enable plugin — No change ✅ Removed all secondary agents — Simplified to single-agent config, same issue ✅ Gateway restarts — Multiple restarts, always same behavior ✅ Different bot tokens (3 total) — All exhibit identical behavior Expected Behavior The Telegram plugin should: Start successfully (✅ this works) Call setMyCommands (❌ fails with "fetch failed") Enter polling loop via getUpdates (❌ never happens) Receive and process incoming messages (❌ never happens) Impact Critical: Telegram is completely unusable. The plugin initializes but never actually connects to receive messages, rendering the channel non-functional. Additional Context iMessage plugin works perfectly on the same system This was working previously (confirmed via message history) Issue appeared after config changes and gateway restarts Tested with multiple different bot tokens (all valid, all fail identically) Possible Root Cause The plugin appears to be using an internal fetch implementation that's failing (undici-based, from stack trace), while Node's global fetch works fine. Possible mismatch between undici version and Telegram API requirements, or proxy/TLS configuration issue specific to the plugin's HTTP client. Workaround None available. Channel is completely non-functional.