Skip to content

[Bug]: Telegram channel crashes on startup - Cannot read properties of undefined (reading 'trim' #31944

@thecozmopolite

Description

@thecozmopolite

Bug type

Regression (worked before, now fails)

Summary

Description

Telegram channel fails to start with error:
Cannot read properties of undefined (reading 'trim')

This happens immediately on provider startup, before any messages can be processed.

impossible to the model to works with me in telegram, no answer...

Steps to reproduce

1. Configure Telegram channel with botToken in openclaw.json                                     
  1. Start/restart gateway
  2. Observe crash in logs
  3. Reload new bot and same issue

Expected behavior

Telegram channel should start normally and process messages.

Actual behavior

Channel crashes immediately with:
[telegram] [default] starting provider (@bot_name)
[telegram] [default] channel exited: Cannot read properties of undefined (reading 'trim')
[telegram] [default] auto-restart attempt X/10`

OpenClaw version

OpenClaw version: 2026.3.1

Operating system

Ubuntu server

Install method

Node: v22.22.0

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

  • Tried multiple bot tokens (all valid via Telegram API)
  • Tried minimal config (only enabled + botToken)
  • Issue seems related to "Telegram DM topics" feature added in v2026.3.1
  • Discord channel works fine as alternative
  • Reinstalling OpenClaw did not fix the issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingregressionBehavior that previously worked and now fails

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions