Skip to content

[Bug]: Telegram media fetch regression in v2026.2.17 - TypeError: fetch failed #20027

@jack-jackhui

Description

@jack-jackhui

Summary

Telegram media attachments fail to download in v2026.2.17 with TypeError: fetch failed. This is a regression from v2026.2.15 where attachments worked correctly.

Steps to reproduce

  1. Upgrade OpenClaw gateway from 2026.2.15 to 2026.2.17
  2. Send any file attachment (PDF, image, etc.) via Telegram to the bot
  3. Observe that the message is silently dropped

Expected behavior

Attachments should be downloaded and passed to the agent, as they were in v2026.2.15.

Actual behavior

The gateway fails to fetch media from Telegram's file API with:

MediaFetchError: Failed to fetch media from https://api.telegram.org/file/bot.../documents/file_XX.pdf: TypeError: fetch failed

The entire message (including any text) is silently dropped.

Diagnostic findings

Critically, the fetch works fine outside the gateway process:

  • curl downloads the file successfully ✅
  • node -e "require('https').get(...)" works ✅
  • node -e "fetch(...)" works ✅
  • OpenClaw gateway internal fetch fails ❌

This suggests something specific to the gateway's fetch context in v2026.2.17 is broken.

Log evidence

v2026.2.17 (broken):

2026-02-18T11:37:45.803Z error gateway/channels/telegram handler failed: MediaFetchError: Failed to fetch media from https://api.telegram.org/file/bot.../photos/file_27.jpg: TypeError: fetch failed
2026-02-18T11:40:42.966Z error gateway/channels/telegram handler failed: MediaFetchError: Failed to fetch media from https://api.telegram.org/file/bot.../documents/file_25.pdf: TypeError: fetch failed
2026-02-18T11:53:21.697Z error gateway/channels/telegram handler failed: MediaFetchError: Failed to fetch media from https://api.telegram.org/file/bot.../documents/file_28.pdf: TypeError: fetch failed

v2026.2.15 (working):

  • Zero MediaFetchError entries in logs
  • Attachments download and process correctly

Environment

  • OpenClaw version: 2026.2.17 (regression), 2026.2.15 (working)
  • OS: Linux 5.15.0-1076-oracle (arm64) - Oracle Cloud Ubuntu
  • Node: v24.13.0
  • Install method: npm global

Workaround

Rollback to v2026.2.15:

npm i -g [email protected]
systemctl --user restart openclaw-gateway

Related issues

This may be the same underlying issue, but the key finding here is that it's a regression — v2026.2.15 did not have this problem, and the fetch works outside the gateway process.

Metadata

Metadata

Assignees

No one assigned

    Labels

    staleMarked as stale due to inactivity

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions