openclaw - ✅(Solved) Fix [Bug]: Installer always crashes after “Select channel (QuickStart)” with TypeError: Cannot read properties of undefined (reading 'trim') [2 pull requests, 3 comments, 4 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#66641Fetched 2026-04-15 06:25:11
View on GitHub
Comments
3
Participants
4
Timeline
13
Reactions
3
Author
Timeline (top)
cross-referenced ×4commented ×3referenced ×3closed ×1

During installation of openclaw 2026.4.14, the installer always crashes right after the Select channel (QuickStart) step. This issue is consistently reproducible. It happens whether I select a channel or choose Skip for now.

Error message:

TypeError: Cannot read properties of undefined (reading 'trim')

Error Message

Error message: 5.The installer throws the following error:

Root Cause

The installation should continue normally after this step, regardless of whether a channel is selected or Skip for now is chosen. It should not crash because trim() is being called on an undefined value.

Fix Action

Fixed

PR fix notes

PR #66649: fix(wizard): avoid setup crash on missing provider ids

Description (problem / solution / changelog)

## Summary

Prevent setup wizard crashes when provider plugin metadata is incomplete.

The setup flow compares provider ids using .trim(); if a provider entry is missing id, it crashed with TypeError: Cannot read properties of undefined (reading 'trim').

  • Guard provider id comparisons when selecting the preferred provider for an auth choice.
  • Add regression coverage.

Fixes #66641. Fixes #66619.

Test plan

  • pnpm exec vitest run src/wizard/setup.test.ts

Changed files

  • CHANGELOG.md (modified, +1/-0)
  • src/wizard/setup.test.ts (modified, +56/-0)
  • src/wizard/setup.ts (modified, +9/-3)

PR #66882: fix(wizard): guard text-input prompts against undefined clack results

Description (problem / solution / changelog)

Summary

Fixes the widespread onboarding crash:

TypeError: Cannot read properties of undefined (reading 'trim')

that kills openclaw onboard / openclaw configure during channel selection and channel-specific text-input steps (Telegram, Slack, Discord, etc.).

Root cause

@clack/prompts text() can resolve to undefined in some edge cases (e.g. submitting an empty value when neither initialValue nor placeholder is set), even though WizardPrompter.text is declared as Promise<string>. The wrapper in src/wizard/clack-prompter.ts passes the value through guardCancel but does not coerce the non-cancel path, so undefined leaks out to callers. buildChannelSetupWizardAdapterFromSetupWizard in src/channels/plugins/setup-wizard.ts then calls rawValue.trim() directly and crashes.

Fix

  • src/wizard/clack-prompter.ts — enforce the declared Promise<string> contract by coercing nullish results to "" after guardCancel. This covers every prompter.text caller in one place.
  • src/channels/plugins/setup-wizard.ts — belt-and-suspenders rawValue ?? "" at the existing call site so the same symptom can't be reintroduced by a future prompter swap.
  • src/wizard/clack-prompter.test.ts — unit tests for the wrapper covering both the undefined → "" coercion and the string passthrough.

Related issues

  • #66693 [Bug]: While onboarding: TypeError: Cannot read properties of undefined (reading 'trim')
  • #66718 [Bug] openclaw configure TypeError: Cannot read properties of undefined (reading 'trim')
  • #66848 [Bug]: TypeError: Cannot read properties of undefined (reading 'trim')
  • #66677 [Bug]: Select channel (QuickStart)
  • #66624 (closed) same symptom, v2026.4.14
  • #66728 (closed) Skip for now variant
  • #66641 (closed) installer crashes after Select channel (QuickStart)
  • #66619 (closed) Telegram setup variant

Test plan

  • New unit tests in src/wizard/clack-prompter.test.ts pass locally against the patched wrapper.
  • CI: pnpm test:unit / channel plugin tests.
  • Manual: openclaw onboard, pick Telegram, step through the text-input steps without hitting the TypeError.

Changed files

  • src/channels/plugins/setup-wizard-helpers.ts (modified, +7/-7)
  • src/channels/plugins/setup-wizard.ts (modified, +1/-1)
  • src/wizard/clack-prompter.test.ts (modified, +40/-2)
  • src/wizard/clack-prompter.ts (modified, +7/-1)
RAW_BUFFERClick to expand / collapse

Bug type

Crash (process/app exits or hangs)

Beta release blocker

No

Summary

During installation of openclaw 2026.4.14, the installer always crashes right after the Select channel (QuickStart) step. This issue is consistently reproducible. It happens whether I select a channel or choose Skip for now.

Error message:

TypeError: Cannot read properties of undefined (reading 'trim')

Steps to reproduce

1.Start the installation of openclaw 2026.4.14 2.Proceed to the Select channel (QuickStart) step 3.Either select any channel or click Skip for now 4.Continue the installation 5.The installer throws the following error: TypeError: Cannot read properties of undefined (reading 'trim')

Expected behavior

The installation should continue normally after this step, regardless of whether a channel is selected or Skip for now is chosen. It should not crash because trim() is being called on an undefined value.

Actual behavior

The installation fails immediately after the Select channel (QuickStart) step and cannot proceed.

OpenClaw version

2026.4.14 (323493f)

Operating system

Ubuntu24.04

Install method

curl -fsSL https://get.casaos.io | sudo bash

Model

claude-sonnet-4-6

Provider / routing chain

openclaw

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

high Affected users/systems/channels

Additional information

The previous version installed normally

extent analysis

TL;DR

The installer crash is likely due to an undefined value being passed to the trim() function, which needs to be fixed or handled in the installation script.

Guidance

  • Verify that the trim() function is being called on a variable that is expected to be a string, and check why it's undefined at that point.
  • Review the installation script to ensure that all possible paths (selecting a channel or clicking "Skip for now") handle the input values correctly and do not lead to undefined variables being passed to trim().
  • Check the differences between the current version (2026.4.14) and the previous version that installed normally to identify any changes that might have introduced this issue.
  • Consider adding a null check before calling trim() to prevent the crash, as a temporary workaround.

Example

No specific code example can be provided without the exact installation script, but a general example of how to safely call trim() would be:

if (variable !== undefined && variable !== null) {
  variable = variable.trim();
}

Notes

The root cause seems to be related to how the installer handles input after the "Select channel (QuickStart)" step, but without the exact code, it's difficult to provide a precise fix. The issue might be specific to the version 2026.4.14 or the "claude-sonnet-4-6" model.

Recommendation

Apply a workaround by adding null checks before calling trim() to prevent the crash, as the root cause needs further investigation to provide a permanent fix.

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

The installation should continue normally after this step, regardless of whether a channel is selected or Skip for now is chosen. It should not crash because trim() is being called on an undefined value.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING

openclaw - ✅(Solved) Fix [Bug]: Installer always crashes after “Select channel (QuickStart)” with TypeError: Cannot read properties of undefined (reading 'trim') [2 pull requests, 3 comments, 4 participants]