openclaw - ✅(Solved) Fix [Bug]: Onboard Crash When Setting Channel [2 pull requests, 2 comments, 3 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#49922Fetched 2026-04-08 01:01:12
View on GitHub
Comments
2
Participants
3
Timeline
8
Reactions
0
Author
Timeline (top)
commented ×2cross-referenced ×2labeled ×2closed ×1

Using the current main branch, commit number 3d8afb96bd903d308e4e6132b77f8f33a994ba22 caused the OpenClaw to crash during the onboard-channel stage. The error message is as follows:

Channel status ─────────────────────╮ │ │ │ Telegram: needs token │ │ WhatsApp: not linked │ │ Discord: needs token │ │ IRC: needs host + nick │ │ Google Chat: needs service account │ │ Slack: needs tokens │ │ Signal: needs setup │ │ signal-cli: missing (signal-cli) │ │ iMessage: needs setup │ │ imsg: missing (imsg) │ │ LINE: needs token + secret │ │ Accounts: 0 │ │ Feishu: installed │ │ Nostr: installed │ │ Microsoft Teams: installed │ │ Mattermost: installed │ │ Nextcloud Talk: installed │ │ Matrix: installed │ │ BlueBubbles: installed │ │ Zalo: installed │ │ Zalo Personal: installed │ │ Synology Chat: installed │ │ Tlon: installed │ │ │ ├──────────────────────────────────────╯ │ ◇ How channels work ───────────────────────────────────────────────────────────────────────╮ │ │ │ DM security: default is pairing; unknown DMs get a pairing code. │ │ Approve with: openclaw pairing approve <channel> <code> │ │ Public DMs require dmPolicy="open" + allowFrom=["*"]. │ │ Multi-user DMs: run: openclaw config set session.dmScope "per-channel-peer" (or │ │ "per-account-channel-peer" for multi-account channels) to isolate sessions. │ │ Docs: channels/pairing │ │ │ │ Telegram: simplest way to get started — register a bot with @BotFather and get going. │ │ WhatsApp: works with your own number; recommend a separate phone + eSIM. │ │ Discord: very well supported right now. │ │ IRC: classic IRC networks with DM/channel routing and pairing controls. │ │ Google Chat: Google Workspace Chat app with HTTP webhook. │ │ Slack: supported (Socket Mode). │ │ Signal: signal-cli linked device; more setup (David Reagans: "Hop on Discord."). │ │ iMessage: this is still a work in progress. │ │ LINE: LINE Messaging API webhook bot. │ │ Feishu: 飞书/Lark enterprise messaging with doc/wiki/drive tools. │ │ Nostr: Decentralized protocol; encrypted DMs via NIP-04. │ │ Microsoft Teams: Bot Framework; enterprise support. │ │ Mattermost: self-hosted Slack-style chat; install the plugin to enable. │ │ Nextcloud Talk: Self-hosted chat via Nextcloud Talk webhook bots. │ │ Matrix: open protocol; install the plugin to enable. │ │ BlueBubbles: iMessage via the BlueBubbles mac app + REST API. │ │ Zalo: Vietnam-focused messaging platform with Bot API. │ │ Zalo Personal: Zalo personal account via QR code login. │ │ Synology Chat: Connect your Synology NAS Chat to OpenClaw with full agent capabilities. │ │ Tlon: decentralized messaging on Urbit; install the plugin to enable. │ │ │ ├───────────────────────────────────────────────────────────────────────────────────────────╯ Error: LINE runtime not initialized - plugin not registered  ELIFECYCLE  Command failed with exit code 1.

Error Message

The error message is as follows: Error: LINE runtime not initialized - plugin not registered onboarding program crashed and show error message: Error: LINE runtime not initialized - plugin not registered

Root Cause

Using the current main branch, commit number 3d8afb96bd903d308e4e6132b77f8f33a994ba22 caused the OpenClaw to crash during the onboard-channel stage. The error message is as follows:

Channel status ─────────────────────╮ │ │ │ Telegram: needs token │ │ WhatsApp: not linked │ │ Discord: needs token │ │ IRC: needs host + nick │ │ Google Chat: needs service account │ │ Slack: needs tokens │ │ Signal: needs setup │ │ signal-cli: missing (signal-cli) │ │ iMessage: needs setup │ │ imsg: missing (imsg) │ │ LINE: needs token + secret │ │ Accounts: 0 │ │ Feishu: installed │ │ Nostr: installed │ │ Microsoft Teams: installed │ │ Mattermost: installed │ │ Nextcloud Talk: installed │ │ Matrix: installed │ │ BlueBubbles: installed │ │ Zalo: installed │ │ Zalo Personal: installed │ │ Synology Chat: installed │ │ Tlon: installed │ │ │ ├──────────────────────────────────────╯ │ ◇ How channels work ───────────────────────────────────────────────────────────────────────╮ │ │ │ DM security: default is pairing; unknown DMs get a pairing code. │ │ Approve with: openclaw pairing approve <channel> <code> │ │ Public DMs require dmPolicy="open" + allowFrom=["*"]. │ │ Multi-user DMs: run: openclaw config set session.dmScope "per-channel-peer" (or │ │ "per-account-channel-peer" for multi-account channels) to isolate sessions. │ │ Docs: channels/pairing │ │ │ │ Telegram: simplest way to get started — register a bot with @BotFather and get going. │ │ WhatsApp: works with your own number; recommend a separate phone + eSIM. │ │ Discord: very well supported right now. │ │ IRC: classic IRC networks with DM/channel routing and pairing controls. │ │ Google Chat: Google Workspace Chat app with HTTP webhook. │ │ Slack: supported (Socket Mode). │ │ Signal: signal-cli linked device; more setup (David Reagans: "Hop on Discord."). │ │ iMessage: this is still a work in progress. │ │ LINE: LINE Messaging API webhook bot. │ │ Feishu: 飞书/Lark enterprise messaging with doc/wiki/drive tools. │ │ Nostr: Decentralized protocol; encrypted DMs via NIP-04. │ │ Microsoft Teams: Bot Framework; enterprise support. │ │ Mattermost: self-hosted Slack-style chat; install the plugin to enable. │ │ Nextcloud Talk: Self-hosted chat via Nextcloud Talk webhook bots. │ │ Matrix: open protocol; install the plugin to enable. │ │ BlueBubbles: iMessage via the BlueBubbles mac app + REST API. │ │ Zalo: Vietnam-focused messaging platform with Bot API. │ │ Zalo Personal: Zalo personal account via QR code login. │ │ Synology Chat: Connect your Synology NAS Chat to OpenClaw with full agent capabilities. │ │ Tlon: decentralized messaging on Urbit; install the plugin to enable. │ │ │ ├───────────────────────────────────────────────────────────────────────────────────────────╯ Error: LINE runtime not initialized - plugin not registered  ELIFECYCLE  Command failed with exit code 1.

Fix Action

Fixed

PR fix notes

PR #49938: refactor(line): use setup Setup-safe config adapter

Description (problem / solution / changelog)

Here's the completed PR description:


Summary

When running openclaw onboard --install-daemon, the CLI crashes with Error: LINE runtime not initialized - plugin not registered at the channel selection step.

  • Problem: lineSetupPlugin in channel.setup.ts spreads lineConfigAdapter into its config field. The callbacks in lineConfigAdapter (listAccountIds, resolveAccount, defaultAccountId) all call getLineRuntime(). During onboard, setup plugins are loaded via defineSetupPluginEntry in setup-only registration mode, which never calls setLineRuntime(). When the wizard renders the channel list, it invokes these callbacks, triggering getLineRuntime() on an uninitialized runtime — causing the crash.
  • Why it matters: This issue blocks the entire onboard command, preventing new users from completing initial setup.
  • What changed: Replaced the runtime-dependent lineConfigAdapter in lineSetupPlugin with a standalone lineSetupConfigAdapter that uses pure core functions (listLineAccountIds, resolveLineAccount, resolveDefaultLineAccountId from runtime-api.ts) directly, without going through getLineRuntime(). This aligns LINE with all other bundled channel setup plugins (Telegram, WhatsApp, Discord, Slack, Signal, iMessage, IRC, Google Chat), none of which depend on their respective runtimes in setup mode.
  • What did NOT change (scope boundary): Any files other than extensions/line/src/channel.setup.ts. The full lineConfigAdapter in config-adapter.ts remains unchanged and is still used by the main channel plugin entry during normal operation.

Change Type (select all)

  • Bug fix
  • Feature
  • Refactor
  • Docs
  • Security hardening
  • Chore/infra

Scope (select all touched areas)

  • Gateway / orchestration
  • Skills / tool execution
  • Auth / tokens
  • Memory / storage
  • Integrations
  • API / contracts
  • UI / DX
  • CI/CD / infra

Linked Issue/PR

https://github.com/openclaw/openclaw/issues/49922

User-visible / Behavior Changes

The onboard wizard now correctly displays LINE as "needs token + secret" instead of crashing. No behavioral change for LINE during normal (non-setup) operation.

Security Impact (required)

  • New permissions/capabilities? (No)
  • Secrets/tokens handling changed? (No)
  • New/changed network calls? (No)
  • Command/tool execution surface changed? (No)
  • Data access scope changed? (No)
  • If any Yes, explain risk + mitigation:

Repro + Verification

Environment

  • OS: Ubuntu

Using the current main branch, commit number 3d8afb96bd903d308e4e6132b77f8f33a994ba22 caused the OpenClaw to crash during the onboard-channel stage. The error message is as follows:

Steps

git clone https://github.com/openclaw/openclaw.git
pnpm install
pnpm ui:build # auto-installs UI deps on first run
pnpm build
pnpm openclaw onboard --install-daemon
# set up your config step by step
# after finishing model setup, proceed to channel setup — crash happens

Actual

Error: LINE runtime not initialized - plugin not registered
 ELIFECYCLE  Command failed with exit code 1.

Expected

The channel selection list displays all channels including LINE with status hints (e.g., "needs token + secret") without crashing, allowing the user to select and configure a channel.

Evidence

Attach at least one:

  • Failing test/log before + passing after
  • Trace/log snippets
  • Screenshot/recording
  • Perf numbers (if relevant)

Human Verification (required)

What you personally verified (not just CI), and how:

  • Verified scenarios:
    • Ran openclaw onboard --install-daemon end-to-end; channel selection step now renders LINE correctly without crashing
    • Selected LINE channel in the wizard; configuration prompt appears as expected
  • Edge cases checked:
    • Audited all 8 other bundled setup plugins (Telegram, WhatsApp, Discord, Slack, Signal, iMessage, IRC, Google Chat) — none have the same runtime dependency issue; LINE was the only outlier
    • Verified that importing normalizeLineAllowFrom from config-adapter.ts does not trigger getLineRuntime() at module load time (it only appears inside callback bodies, not at top-level)
  • What you did not verify:
    • Full LINE channel messaging flow after configuration (requires actual LINE bot credentials)

Review Conversations

  • I replied to or resolved every bot review conversation I addressed in this PR.
  • I left unresolved only the conversations that still need reviewer or maintainer judgment.

If a bot review conversation is addressed by this PR, resolve that conversation yourself. Do not leave bot review conversation cleanup for maintainers.

Compatibility / Migration

  • Backward compatible? (Yes)
  • Config/env changes? (No)
  • Migration needed? (No)
  • If yes, exact upgrade steps:

Failure Recovery (if this breaks)

  • How to disable/revert this change quickly: Revert extensions/line/src/channel.setup.ts to use lineConfigAdapter spread (single file change)
  • Files/config to restore: extensions/line/src/channel.setup.ts
  • Known bad symptoms reviewers should watch for: LINE channel not appearing in the onboard wizard, or LINE channel configuration wizard failing to list/resolve accounts

Risks and Mitigations

  • Risk: The new lineSetupConfigAdapter could diverge from lineConfigAdapter if future changes are made to one but not the other.
    • Mitigation: Both adapters use the same underlying pure functions (listLineAccountIds, resolveLineAccount, resolveDefaultLineAccountId) from the shared core module. A code comment in channel.setup.ts documents why a separate adapter is needed. Long-term, lineConfigAdapter in config-adapter.ts could also be refactored to use the pure functions directly, eliminating the divergence risk entirely.

Changed files

  • extensions/line/src/channel.setup.ts (modified, +31/-2)

PR #49995: Matrix: make onboarding status runtime-safe

Description (problem / solution / changelog)

Summary

This PR fixes a Matrix onboarding/status crash by removing a hard Matrix runtime initialization dependency from status-time credential resolution.

Before this change, channel status collection in onboarding could throw:

  • Error: Matrix runtime not initialized

That broke QuickStart/status flows and caused the Area 1 regression.

Root Cause

Onboarding channel status calls Matrix setup status callbacks:

  • src/commands/onboard-channels.ts -> adapter.getStatus(...)
  • extensions/matrix/src/setup-surface.ts -> status.resolveConfigured(...)
  • extensions/matrix/src/matrix/accounts.ts -> loadMatrixCredentials(...)
  • extensions/matrix/src/matrix/credentials.ts -> getMatrixRuntime().state.resolveStateDir(...)

getMatrixRuntime() is strict and throws when runtime is not initialized, which is valid in onboarding/status contexts.

Changes

  • Added runtime-store helpers for Matrix runtime access:
    • extensions/matrix/src/runtime.ts
    • Export tryGetMatrixRuntime and clearMatrixRuntime.
  • Made Matrix credential state path resolution runtime-safe:
    • extensions/matrix/src/matrix/credentials.ts
    • Fallback precedence is now:
      1. explicit stateDir arg
      2. runtime state resolver (if runtime exists)
      3. resolveStateDir(env, os.homedir) fallback
  • Added focused regression tests:
    • extensions/matrix/src/matrix/credentials.test.ts
    • Verifies fallback precedence and no-throw behavior when runtime is absent.
  • Added onboarding parity test:
    • src/commands/onboard-channels.e2e.test.ts
    • renders the QuickStart channel picker without requiring the Matrix runtime

Validation

  • pnpm test -- src/commands/onboard-channels.e2e.test.ts
    • before: 10 failing tests (Matrix runtime not initialized)
    • after: 15 passed
  • pnpm test -- src/commands/onboard-channels.e2e.test.ts -t "QuickStart"
    • 3 passed
  • pnpm test -- extensions/matrix/src/matrix/credentials.test.ts
    • 4 passed
  • pnpm test -- extensions/matrix/src/matrix/accounts.test.ts
    • 6 passed
  • pnpm build
  • pnpm test -- src/plugin-sdk/channel-import-guardrails.test.ts
  • pnpm test -- src/plugins/contracts/runtime.contract.test.ts

Scope

This PR is intentionally scoped to crash prevention/runtime-safety for Matrix onboarding status paths only; it does not change Matrix setup semantics beyond making status resolution safe pre-runtime.

Fixes #49922

Changed files

  • CHANGELOG.md (modified, +1/-0)
  • extensions/matrix/src/matrix/credentials.test.ts (added, +73/-0)
  • extensions/matrix/src/matrix/credentials.ts (modified, +5/-2)
  • extensions/matrix/src/matrix/monitor/handler.body-for-agent.test.ts (modified, +17/-0)
  • extensions/matrix/src/runtime.ts (modified, +7/-3)
  • src/commands/onboard-channels.e2e.test.ts (modified, +26/-0)
RAW_BUFFERClick to expand / collapse

Bug type

Crash (process/app exits or hangs)

Summary

Using the current main branch, commit number 3d8afb96bd903d308e4e6132b77f8f33a994ba22 caused the OpenClaw to crash during the onboard-channel stage. The error message is as follows:

Channel status ─────────────────────╮ │ │ │ Telegram: needs token │ │ WhatsApp: not linked │ │ Discord: needs token │ │ IRC: needs host + nick │ │ Google Chat: needs service account │ │ Slack: needs tokens │ │ Signal: needs setup │ │ signal-cli: missing (signal-cli) │ │ iMessage: needs setup │ │ imsg: missing (imsg) │ │ LINE: needs token + secret │ │ Accounts: 0 │ │ Feishu: installed │ │ Nostr: installed │ │ Microsoft Teams: installed │ │ Mattermost: installed │ │ Nextcloud Talk: installed │ │ Matrix: installed │ │ BlueBubbles: installed │ │ Zalo: installed │ │ Zalo Personal: installed │ │ Synology Chat: installed │ │ Tlon: installed │ │ │ ├──────────────────────────────────────╯ │ ◇ How channels work ───────────────────────────────────────────────────────────────────────╮ │ │ │ DM security: default is pairing; unknown DMs get a pairing code. │ │ Approve with: openclaw pairing approve <channel> <code> │ │ Public DMs require dmPolicy="open" + allowFrom=["*"]. │ │ Multi-user DMs: run: openclaw config set session.dmScope "per-channel-peer" (or │ │ "per-account-channel-peer" for multi-account channels) to isolate sessions. │ │ Docs: channels/pairing │ │ │ │ Telegram: simplest way to get started — register a bot with @BotFather and get going. │ │ WhatsApp: works with your own number; recommend a separate phone + eSIM. │ │ Discord: very well supported right now. │ │ IRC: classic IRC networks with DM/channel routing and pairing controls. │ │ Google Chat: Google Workspace Chat app with HTTP webhook. │ │ Slack: supported (Socket Mode). │ │ Signal: signal-cli linked device; more setup (David Reagans: "Hop on Discord."). │ │ iMessage: this is still a work in progress. │ │ LINE: LINE Messaging API webhook bot. │ │ Feishu: 飞书/Lark enterprise messaging with doc/wiki/drive tools. │ │ Nostr: Decentralized protocol; encrypted DMs via NIP-04. │ │ Microsoft Teams: Bot Framework; enterprise support. │ │ Mattermost: self-hosted Slack-style chat; install the plugin to enable. │ │ Nextcloud Talk: Self-hosted chat via Nextcloud Talk webhook bots. │ │ Matrix: open protocol; install the plugin to enable. │ │ BlueBubbles: iMessage via the BlueBubbles mac app + REST API. │ │ Zalo: Vietnam-focused messaging platform with Bot API. │ │ Zalo Personal: Zalo personal account via QR code login. │ │ Synology Chat: Connect your Synology NAS Chat to OpenClaw with full agent capabilities. │ │ Tlon: decentralized messaging on Urbit; install the plugin to enable. │ │ │ ├───────────────────────────────────────────────────────────────────────────────────────────╯ Error: LINE runtime not initialized - plugin not registered  ELIFECYCLE  Command failed with exit code 1.

Steps to reproduce

  1. git clone https://github.com/openclaw/openclaw.git
  2. pnpm install
  3. pnpm ui:build # auto-installs UI deps on first run
  4. pnpm build
  5. pnpm openclaw onboard --install-daemon
  6. set up your config step by stop
  7. after finish model then set up channel, crash happened

Expected behavior

choose one of channels

Actual behavior

onboarding program crashed and show error message: ◇ Channel status ─────────────────────╮ │ │ │ Telegram: needs token │ │ WhatsApp: not linked │ │ Discord: needs token │ │ IRC: needs host + nick │ │ Google Chat: needs service account │ │ Slack: needs tokens │ │ Signal: needs setup │ │ signal-cli: missing (signal-cli) │ │ iMessage: needs setup │ │ imsg: missing (imsg) │ │ LINE: needs token + secret │ │ Accounts: 0 │ │ Feishu: installed │ │ Nostr: installed │ │ Microsoft Teams: installed │ │ Mattermost: installed │ │ Nextcloud Talk: installed │ │ Matrix: installed │ │ BlueBubbles: installed │ │ Zalo: installed │ │ Zalo Personal: installed │ │ Synology Chat: installed │ │ Tlon: installed │ │ │ ├──────────────────────────────────────╯ │ ◇ How channels work ───────────────────────────────────────────────────────────────────────╮ │ │ │ DM security: default is pairing; unknown DMs get a pairing code. │ │ Approve with: openclaw pairing approve <channel> <code> │ │ Public DMs require dmPolicy="open" + allowFrom=["*"]. │ │ Multi-user DMs: run: openclaw config set session.dmScope "per-channel-peer" (or │ │ "per-account-channel-peer" for multi-account channels) to isolate sessions. │ │ Docs: channels/pairing │ │ │ │ Telegram: simplest way to get started — register a bot with @BotFather and get going. │ │ WhatsApp: works with your own number; recommend a separate phone + eSIM. │ │ Discord: very well supported right now. │ │ IRC: classic IRC networks with DM/channel routing and pairing controls. │ │ Google Chat: Google Workspace Chat app with HTTP webhook. │ │ Slack: supported (Socket Mode). │ │ Signal: signal-cli linked device; more setup (David Reagans: "Hop on Discord."). │ │ iMessage: this is still a work in progress. │ │ LINE: LINE Messaging API webhook bot. │ │ Feishu: 飞书/Lark enterprise messaging with doc/wiki/drive tools. │ │ Nostr: Decentralized protocol; encrypted DMs via NIP-04. │ │ Microsoft Teams: Bot Framework; enterprise support. │ │ Mattermost: self-hosted Slack-style chat; install the plugin to enable. │ │ Nextcloud Talk: Self-hosted chat via Nextcloud Talk webhook bots. │ │ Matrix: open protocol; install the plugin to enable. │ │ BlueBubbles: iMessage via the BlueBubbles mac app + REST API. │ │ Zalo: Vietnam-focused messaging platform with Bot API. │ │ Zalo Personal: Zalo personal account via QR code login. │ │ Synology Chat: Connect your Synology NAS Chat to OpenClaw with full agent capabilities. │ │ Tlon: decentralized messaging on Urbit; install the plugin to enable. │ │ │ ├───────────────────────────────────────────────────────────────────────────────────────────╯ Error: LINE runtime not initialized - plugin not registered  ELIFECYCLE  Command failed with exit code 1.

OpenClaw version

2026.3.14 (3d8afb9)

Operating system

Ubuntu 24.04

Install method

pnpm build

Model

openrouter/z-ai/glm-4.7

Provider / routing chain

openrouter/z-ai

Config file / key location

No response

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

No response

extent analysis

Fix Plan

To resolve the issue of the OpenClaw crashing during the onboard-channel stage due to the LINE runtime not being initialized and the plugin not being registered, follow these steps:

  • Register the LINE Plugin: Ensure that the LINE plugin is properly registered in the OpenClaw configuration. This might involve adding the plugin to a list of registered plugins in a configuration file or through a command-line interface.
  • Initialize LINE Runtime: Before attempting to use the LINE channel, initialize the LINE runtime. This could involve running a specific command or ensuring that a particular service is started before the onboard-channel process.

Example code to register a plugin might look like this:

// Assuming a function to register plugins
function registerPlugin(pluginName) {
  // Logic to register the plugin
  console.log(`Registered plugin: ${pluginName}`);
}

// Register the LINE plugin
registerPlugin('LINE');

For initializing the LINE runtime, if it's a matter of starting a service, you might use a command like this:

# Start the LINE runtime service
systemctl start line-runtime

Or, if it's a programmatic initialization:

// Function to initialize the LINE runtime
function initLineRuntime() {
  // Logic to initialize the LINE runtime
  console.log('LINE runtime initialized');
}

// Initialize the LINE runtime before using the channel
initLineRuntime();

Verification

To verify that the fix worked:

  1. Restart the OpenClaw onboard-channel process.
  2. Attempt to set up the LINE channel again.
  3. Check for any error messages related to the LINE runtime or plugin registration.

If the issue persists, review the configuration and initialization steps to ensure they were correctly implemented.

Extra Tips

  • Ensure all dependencies required by the LINE plugin are installed and up-to-date.
  • Consult the OpenClaw documentation for specific instructions on registering plugins and initializing runtimes, as the exact steps may vary depending on the version and configuration of OpenClaw.
  • If using a version control system, consider creating a branch to test these changes before applying them to the main branch, to prevent any potential issues from affecting the primary codebase.

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

choose one of channels

Still need to ship something?

×6

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

Back to top recommendations

TRENDING