openclaw - 💡(How to fix) Fix Regression: 2026.4.22 invalid thinking bundle; 2026.4.24 Telegram webhook startup fails on VPS [1 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#71834Fetched 2026-04-26 05:07:42
View on GitHub
Comments
0
Participants
1
Timeline
0
Reactions
1
Author
Participants

A production VPS node stopped responding after upgrading OpenClaw. Two upgrade blockers were observed while restoring service:

  1. [email protected] installed from npm contains an invalid generated bundle and the gateway crash-loops on startup.
  2. [email protected] fixes the syntax error and the gateway process starts, but the Telegram channel provider fails during webhook setup and exits, so the local Telegram webhook listener never comes up.

The node was restored by downgrading to [email protected] and running openclaw doctor --fix for the older config schema.

Error Message

Gateway failed to start: SyntaxError: Unexpected token ')'

Root Cause

However, because the provider had already exited and no local 8788 listener was present, the public webhook returned 502 Bad Gateway.

Fix Action

Fix / Workaround

[telegram/network] fetch fallback: enabling sticky IPv4-only dispatcher (codes=ETIMEDOUT,ENETUNREACH)
[gateway/channels/telegram] [default] starting provider
[gateway/channels/telegram] Telegram menu text exceeded the conservative 5700-character payload budget; shortening descriptions to keep 54 commands visible.
[gateway/channels/telegram] telegram setWebhook failed: Network request for 'setWebhook' failed!
[gateway/channels/telegram] [default] channel exited: Network request for 'setWebhook' failed!
[gateway/channels/telegram] [default] auto-restart attempt 1/10 in 5s

Recovery / workaround

Downgraded to 2026.4.21, then ran doctor for config compatibility:

Code Example

$ openclaw --version
OpenClaw 2026.4.22 (00bd2cf)

---

Gateway failed to start: SyntaxError: Unexpected token ')'

---

$ node --check /usr/lib/node_modules/openclaw/dist/thinking-Bh-7MqXz.js
/usr/lib/node_modules/openclaw/dist/thinking-Bh-7MqXz.js:319
        ) === true && context.normalizedProvider !== "zai" ? buildBinaryThinkingProfile(defaultLevel) : buildBaseThinkingProfile(defaultLevel);
        ^

SyntaxError: Unexpected token ')'

---

const profile = resolveProviderBinaryThinking({
  provider: context.normalizedProvider,
  context: {
    provider: context.normalizedProvider,
    modelId: context.modelId
  }
}) === true && context.normalizedProvider !== "zai" ? buildBinaryThinkingProfile(defaultLevel) : buildBaseThinkingProfile(defaultLevel);

---

$ npm i -g openclaw@2026.4.24
$ node --check /usr/lib/node_modules/openclaw/dist/thinking-C1TCb8El.js
# passed

---

[gateway] agent model: zai/glm-5.1
[gateway] ready (3 plugins: a2a-broker-adapter, openclaw-supermemory, telegram; 13.9s)

---

[telegram/network] fetch fallback: enabling sticky IPv4-only dispatcher (codes=ETIMEDOUT,ENETUNREACH)
[gateway/channels/telegram] [default] starting provider
[gateway/channels/telegram] Telegram menu text exceeded the conservative 5700-character payload budget; shortening descriptions to keep 54 commands visible.
[gateway/channels/telegram] telegram setWebhook failed: Network request for 'setWebhook' failed!
[gateway/channels/telegram] [default] channel exited: Network request for 'setWebhook' failed!
[gateway/channels/telegram] [default] auto-restart attempt 1/10 in 5s

---

$ ss -ltnp | egrep '18789|8788'
LISTEN 127.0.0.1:18789 ... openclaw-gateway
# no 127.0.0.1:8788 listener

---

getMe: ok=true
setWebhook: ok=true, result=true
getWebhookInfo: url=<configured webhook URL>

---

$ npm i -g openclaw@2026.4.21
$ openclaw doctor --fix
# removed agents.defaults.compaction.truncateAfterCompaction for 2026.4.21 compatibility
$ openclaw gateway restart

---

$ ss -ltnp | egrep '18789|8788'
LISTEN 127.0.0.1:18789 ... openclaw-gateway
LISTEN 127.0.0.1:8788  ... openclaw-gateway

$ curl -sS -o /dev/null -w '%{http_code}\n' https://<webhook-host>/telegram-webhook
404
RAW_BUFFERClick to expand / collapse

Summary

A production VPS node stopped responding after upgrading OpenClaw. Two upgrade blockers were observed while restoring service:

  1. [email protected] installed from npm contains an invalid generated bundle and the gateway crash-loops on startup.
  2. [email protected] fixes the syntax error and the gateway process starts, but the Telegram channel provider fails during webhook setup and exits, so the local Telegram webhook listener never comes up.

The node was restored by downgrading to [email protected] and running openclaw doctor --fix for the older config schema.

Environment

  • OS: Linux x64, Ubuntu-like VPS
  • Node: v22.22.2
  • npm: 10.9.7
  • Gateway mode: local loopback, 127.0.0.1:18789
  • Telegram mode: webhook, local listener expected on 127.0.0.1:8788
  • Telegram bot token and webhook secret were configured in ~/.openclaw/openclaw.json

Failure 1: 2026.4.22 syntax error

Installed version:

$ openclaw --version
OpenClaw 2026.4.22 (00bd2cf)

Gateway startup repeatedly failed:

Gateway failed to start: SyntaxError: Unexpected token ')'

Direct syntax check confirmed the generated bundle is invalid:

$ node --check /usr/lib/node_modules/openclaw/dist/thinking-Bh-7MqXz.js
/usr/lib/node_modules/openclaw/dist/thinking-Bh-7MqXz.js:319
        ) === true && context.normalizedProvider !== "zai" ? buildBinaryThinkingProfile(defaultLevel) : buildBaseThinkingProfile(defaultLevel);
        ^

SyntaxError: Unexpected token ')'

Relevant generated code around the failure:

const profile = resolveProviderBinaryThinking({
  provider: context.normalizedProvider,
  context: {
    provider: context.normalizedProvider,
    modelId: context.modelId
  }
}) === true && context.normalizedProvider !== "zai" ? buildBinaryThinkingProfile(defaultLevel) : buildBaseThinkingProfile(defaultLevel);

Failure 2: 2026.4.24 Telegram provider exits before webhook listener

After upgrading:

$ npm i -g [email protected]
$ node --check /usr/lib/node_modules/openclaw/dist/thinking-C1TCb8El.js
# passed

The gateway itself started and loaded plugins:

[gateway] agent model: zai/glm-5.1
[gateway] ready (3 plugins: a2a-broker-adapter, openclaw-supermemory, telegram; 13.9s)

But Telegram provider failed during startup:

[telegram/network] fetch fallback: enabling sticky IPv4-only dispatcher (codes=ETIMEDOUT,ENETUNREACH)
[gateway/channels/telegram] [default] starting provider
[gateway/channels/telegram] Telegram menu text exceeded the conservative 5700-character payload budget; shortening descriptions to keep 54 commands visible.
[gateway/channels/telegram] telegram setWebhook failed: Network request for 'setWebhook' failed!
[gateway/channels/telegram] [default] channel exited: Network request for 'setWebhook' failed!
[gateway/channels/telegram] [default] auto-restart attempt 1/10 in 5s

Observed state after that:

$ ss -ltnp | egrep '18789|8788'
LISTEN 127.0.0.1:18789 ... openclaw-gateway
# no 127.0.0.1:8788 listener

Manual Telegram Bot API calls from the same host worked shortly afterward:

getMe: ok=true
setWebhook: ok=true, result=true
getWebhookInfo: url=<configured webhook URL>

However, because the provider had already exited and no local 8788 listener was present, the public webhook returned 502 Bad Gateway.

Recovery / workaround

Downgraded to 2026.4.21, then ran doctor for config compatibility:

$ npm i -g [email protected]
$ openclaw doctor --fix
# removed agents.defaults.compaction.truncateAfterCompaction for 2026.4.21 compatibility
$ openclaw gateway restart

Final verified state on 2026.4.21 (f788c88):

$ ss -ltnp | egrep '18789|8788'
LISTEN 127.0.0.1:18789 ... openclaw-gateway
LISTEN 127.0.0.1:8788  ... openclaw-gateway

$ curl -sS -o /dev/null -w '%{http_code}\n' https://<webhook-host>/telegram-webhook
404

A GET 404 on the webhook path is expected enough to prove the reverse proxy reaches the local listener; previously this was 502 when the listener was absent.

Expected behavior

  • npm release bundles should pass node --check for generated JS files.
  • Telegram provider startup should not permanently lose the local webhook listener if setWebhook temporarily fails, especially when auto-restart is enabled.
  • A transient Bot API timeout should either retry without exiting or restart into a state where the local listener comes up before/while webhook advertisement is retried.

Notes

No secrets are included here. Config backups were kept locally before running doctor.

extent analysis

TL;DR

Downgrade to [email protected] and run openclaw doctor --fix to restore service, as [email protected] and [email protected] have issues with the generated bundle and Telegram provider setup, respectively.

Guidance

  • Verify the syntax of generated bundles using node --check before starting the gateway.
  • Check the Telegram provider logs for any errors during startup, especially related to setWebhook requests.
  • Ensure that the local webhook listener is started before attempting to set up the Telegram webhook.
  • Consider implementing retry mechanisms for transient Bot API timeouts to prevent permanent loss of the local webhook listener.

Example

No code snippet is provided as the issue is related to specific versions of the openclaw package and their generated bundles.

Notes

The provided solution is a temporary workaround, and it is recommended to wait for a fixed version of openclaw that addresses the issues with the generated bundle and Telegram provider setup.

Recommendation

Apply the workaround by downgrading to [email protected] and running openclaw doctor --fix, as this is the only known stable version that works with the current configuration.

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

  • npm release bundles should pass node --check for generated JS files.
  • Telegram provider startup should not permanently lose the local webhook listener if setWebhook temporarily fails, especially when auto-restart is enabled.
  • A transient Bot API timeout should either retry without exiting or restart into a state where the local listener comes up before/while webhook advertisement is retried.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING