openclaw - ✅(Solved) Fix [Bug]: Onboarding crashes if selecting "Skip for now" during Select channel (QuickStart) [1 pull requests, 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#66728Fetched 2026-04-15 06:24:41
View on GitHub
Comments
0
Participants
1
Timeline
4
Reactions
1
Author
Participants
Timeline (top)
labeled ×2closed ×1cross-referenced ×1

If doing the Quickstart onboarding, and selecting the "Skip for now" option for the channel we get a TS error: TypeError: Cannot read properties of undefined (reading 'trim') and the setup bails.

<img width="626" height="305" alt="Image" src="https://github.com/user-attachments/assets/f8511284-46d0-4818-80a2-7d53713211b2" />

Error Message

If doing the Quickstart onboarding, and selecting the "Skip for now" option for the channel we get a TS error:

Root Cause

If doing the Quickstart onboarding, and selecting the "Skip for now" option for the channel we get a TS error: TypeError: Cannot read properties of undefined (reading 'trim') and the setup bails.

<img width="626" height="305" alt="Image" src="https://github.com/user-attachments/assets/f8511284-46d0-4818-80a2-7d53713211b2" />

Fix Action

Fixed

PR fix notes

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

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

If doing the Quickstart onboarding, and selecting the "Skip for now" option for the channel we get a TS error: TypeError: Cannot read properties of undefined (reading 'trim') and the setup bails.

<img width="626" height="305" alt="Image" src="https://github.com/user-attachments/assets/f8511284-46d0-4818-80a2-7d53713211b2" />

Steps to reproduce

  1. Install OpenClaw for Mac
  2. Quickstart onboarding
  3. Skip for now channel

Expected behavior

Skipping the channel setup should not crash, and proceed with the setup

Actual behavior

Skipping the channel setup crash and quits

OpenClaw version

2026.4.14

Operating system

macOS 26.3.1

Install method

curl

Model

N/A

Provider / routing chain

N/A

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 issue can likely be fixed by ensuring that the property being accessed is not undefined before calling the trim() method.

Guidance

  • Verify that the object being accessed has the expected properties before attempting to read them.
  • Check the code that handles the "Skip for now" option to see where the trim() method is being called and ensure that the object is properly initialized.
  • Consider adding a null check or optional chaining to prevent the TypeError.
  • Review the onboarding process to ensure that all necessary properties are being set before attempting to access them.

Example

// Before
const channelName = channel.trim();

// After
const channelName = channel && channel.trim();

Notes

The provided information does not include the specific code that is causing the error, so the above example is speculative. The actual fix may vary depending on the implementation details.

Recommendation

Apply workaround: Add null checks or optional chaining to prevent the TypeError, as the root cause of the issue is likely due to an uninitialized or missing property.

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

Skipping the channel setup should not crash, and proceed with the setup

Still need to ship something?

×6

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

Back to top recommendations

TRENDING