openclaw - ✅(Solved) Fix [Bug]: Telegram extension missing src/channel.setup.js in published package [2 pull requests, 4 comments, 5 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#62880Fetched 2026-04-09 08:01:17
View on GitHub
Comments
4
Participants
5
Timeline
11
Reactions
0
Timeline (top)
commented ×4cross-referenced ×3labeled ×2closed ×1

The Telegram extension's src/channel.setup.js file is missing from the published npm package, causing OpenClaw startup crash even when the plugin is disabled.

Error Message

Observe crash with ENOENT error for telegram/src/channel.setup.js Error: bundled plugin entry "./src/channel.setup.js" failed to open

Root Cause

The Telegram extension's src/channel.setup.js file is missing from the published npm package, causing OpenClaw startup crash even when the plugin is disabled.

Fix Action

Fixed

PR fix notes

PR #62900: fix(telegram): stop setup entry from deep-importing src

Description (problem / solution / changelog)

Summary

  • point the bundled Telegram setup entry at packaged dist-facing sidecar modules instead of missing ./src/* files
  • add focused regression coverage for loading Telegram setup sidecars from a dist-only bundled plugin layout

Change Type

  • Bug fix
  • New feature
  • Breaking change
  • Refactor
  • Docs
  • Test-only

Scope

This PR is intentionally narrow.

It only changes the bundled Telegram setup entry specifiers and adds focused regression coverage around packaged bundled-entry loading.

It does not change:

  • bundled loader fallback semantics
  • non-Telegram bundled channel entries
  • plugin update flow
  • packaging behavior outside the Telegram setup entry metadata

Linked Issue/PR

  • Related #62867
  • Related #62868
  • Related #62875
  • Related #62880
  • Related #62886
  • Related #62904
  • Related #62905
  • Related #62898
  • Related #62903
  • This PR fixes a bug or regression

Root Cause / Regression History

The bundled Telegram setup-entry.ts still referenced ./src/channel.setup.js and ./src/secret-contract.js.

That works in the source tree, but the published npm package does not ship dist/extensions/telegram/src/**. It ships the dist-facing sidecar entry modules (./channel-plugin-api.js and ./secret-contract-api.js) instead.

After upgrading to 2026.4.7, bundled setup entry resolution could therefore fail during config load / gateway startup with ENOENT while trying to open the missing ./src/... files from dist/extensions/telegram.

Behavior Changes

Before:

  • the bundled Telegram setup entry tried to load ./src/channel.setup.js
  • the bundled Telegram setup entry tried to load ./src/secret-contract.js
  • packaged npm installs could fail config load or gateway startup with a bundled plugin entry ENOENT

After:

  • the bundled Telegram setup entry loads ./channel-plugin-api.js
  • the bundled Telegram setup entry loads ./secret-contract-api.js
  • setup plugin and setup secrets sidecars resolve correctly from a dist-only bundled plugin layout

Regression Test Plan

Updated:

  • src/plugin-sdk/channel-entry-contract.test.ts

Coverage:

  • creates a temporary dist-only dist/extensions/telegram plugin root
  • verifies ./channel-plugin-api.js resolves telegramSetupPlugin
  • verifies ./secret-contract-api.js resolves channelSecrets
  • keeps the contracts boundary lane green after narrowing the fix back down to Telegram only

Repro + Verification

Observed on an installed npm-global runtime:

  • config loading and plugin update were blocked by bundled plugin entry "./src/channel.setup.js" failed to open from dist/extensions/telegram/setup-entry.js

With this patch:

  • the focused contracts boundary test still passes
  • a dist-only runtime check using loadBundledEntryExportSync(...) successfully loads both Telegram setup sidecars through the new specifiers
  • the same specifier swap applied to the installed runtime unblocked config loading and let openclaw plugins update lossless-claw proceed normally

Tests

Passed locally:

  • node scripts/run-vitest.mjs run --config vitest.contracts.config.ts src/plugins/contracts/boundary-invariants.test.ts

Additional focused coverage added in this PR:

  • loads packaged telegram setup sidecars from dist-facing api modules

Did not run full repo pre-commit:

  • local git commit hooks were slow / stuck in the broader pnpm check -> tsgo chain, so I used focused validation for this narrow fix instead

Risks and Mitigations

Risk:

  • the Telegram bundled setup entry now depends on the dist-facing facade modules being the supported packaged contract

Mitigation:

  • those facade modules are already present in packaged installs
  • the new regression test exercises a dist-only bundled plugin layout directly
  • the change is limited to Telegram setup-entry metadata and does not alter shared loader behavior

AI assistance

AI-assisted: drafted and implemented with Codex, then locally reviewed and tested by me.

Changed files

  • src/plugin-sdk/channel-entry-contract.test.ts (modified, +19/-18)

PR #62990: test(plugin-sdk): cover packaged telegram setup sidecars

Description (problem / solution / changelog)

Summary

  • add focused regression coverage for packaged Telegram setup sidecar loading in loadBundledEntryExportSync
  • keep this PR test-only and scoped to src/plugin-sdk/channel-entry-contract.test.ts

Change Type

  • Bug fix
  • New feature
  • Breaking change
  • Refactor
  • Docs
  • Test-only

Scope

This PR is intentionally narrow.

It only adds one plugin-sdk contract test and does not change runtime behavior.

Linked Issue/PR

  • Follow-up to closed/superseded PR #62900
  • Related #62867
  • Related #62875
  • Related #62880

Root Cause / Context

The runtime packaging path for Telegram setup sidecars has already been fixed on main and released.

This follow-up only keeps targeted regression coverage so packaged/dist-facing setup facades (setup-plugin-api.js and secret-contract-api.js) are exercised explicitly in the plugin-sdk contract tests.

Behavior Changes

Before:

  • plugin-sdk contract tests did not explicitly assert the packaged Telegram setup facade load path

After:

  • plugin-sdk contract tests include explicit coverage that a dist-only Telegram setup entry can load:
    • telegramSetupPlugin from ./setup-plugin-api.js
    • channelSecrets from ./secret-contract-api.js

Tests

Passed locally:

  • node scripts/run-vitest.mjs run --config vitest.plugin-sdk.config.ts src/plugin-sdk/channel-entry-contract.test.ts

Risks and Mitigations

Risk:

  • very low; test-only change

Mitigation:

  • no runtime code changes; only contract test coverage added

AI assistance

AI-assisted: drafted and implemented with Codex, then locally reviewed and tested by me.

Changed files

  • src/plugin-sdk/channel-entry-contract.test.ts (modified, +47/-0)
RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

The Telegram extension's src/channel.setup.js file is missing from the published npm package, causing OpenClaw startup crash even when the plugin is disabled.

Steps to reproduce

Install OpenClaw 2026.4.7: npm install -g openclaw Start gateway: openclaw gateway start Observe crash with ENOENT error for telegram/src/channel.setup.js

Expected behavior

OpenClaw should start successfully regardless of whether bundled extensions are disabled. The published package should include all files referenced by entry points (like setup-entry.js referencing ./src/channel.setup.js).

Actual behavior

Startup crashes with:

Error: bundled plugin entry "./src/channel.setup.js" failed to open ENOENT: no such file or directory, lstat '.../telegram/src/channel.setup.js'

The src/ directory and channel.setup.js are absent from dist/extensions/telegram/ in the published package. Bootstrap phase scans all bundled extensions regardless of disabled status, triggering the crash.

OpenClaw version

2026.4.7 (5050017)

Operating system

macOS Darwin 25.2.0 (arm64) / Node v24.11.0

Install method

No response

Model

N/A - This is a startup/packaging bug, not a model issue.

Provider / routing chain

N/A - This is a plugin packaging bug, not a provider issue.

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

No response

extent analysis

TL;DR

The missing src/channel.setup.js file in the published npm package causes the OpenClaw startup crash, which can be fixed by ensuring the file is included in the package.

Guidance

  • Verify that the src/channel.setup.js file is present in the telegram extension directory before publishing the npm package.
  • Check the build or packaging script to ensure it includes the src directory and its contents in the published package.
  • Consider adding a check in the bootstrap phase to handle missing files or directories for disabled extensions to prevent crashes.
  • Review the setup-entry.js file to confirm it correctly references the ./src/channel.setup.js file.

Example

No code snippet is provided as it is not explicitly supported by the issue.

Notes

The fix may involve updating the build or packaging script to include the missing file, or modifying the bootstrap phase to handle missing files for disabled extensions.

Recommendation

Apply workaround: Ensure the src/channel.setup.js file is included in the published package by updating the build or packaging script, as this is a packaging bug that can be resolved without waiting for a new version.

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

OpenClaw should start successfully regardless of whether bundled extensions are disabled. The published package should include all files referenced by entry points (like setup-entry.js referencing ./src/channel.setup.js).

Still need to ship something?

×6

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

Back to top recommendations

TRENDING