openclaw - ✅(Solved) Fix [Bug]: ◇ Select channel (QuickStart) │ Skip for now TypeError: Cannot read properties of undefined (reading 'trim') [3 pull requests]

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…

I the openclaw onboard menu, I encountered this error after clicking skip for now on the Select channel dialogue ◇ Select channel (QuickStart) │ Skip for now TypeError: Cannot read properties of undefined (reading 'trim')

Error Message

I the openclaw onboard menu, I encountered this error after clicking skip for now on the Select channel dialogue

Root Cause

I the openclaw onboard menu, I encountered this error after clicking skip for now on the Select channel dialogue ◇ Select channel (QuickStart) │ Skip for now TypeError: Cannot read properties of undefined (reading 'trim')

Fix Action

Fixed

PR fix notes

PR #1: fix(onboard): guard quickstart channel skip

Description (problem / solution / changelog)

<!-- CURSOR_AGENT_PR_BODY_BEGIN -->

Summary

  • Problem: QuickStart channel onboarding assumed any non-"__skip__" picker result was a real channel id, so the reported skip path could fall through with an invalid value and crash instead of continuing.
  • Why it matters: this breaks first-run onboarding in the repo's current UX focus area and makes a basic "Skip for now" flow unreliable.
  • What changed: src/flows/channel-setup.ts now validates that the returned quickstart choice matches one of the rendered channel entries before attempting setup, otherwise it treats the result like a skip.
  • What did NOT change (scope boundary): no channel-specific setup logic, plugin loading rules, or wider onboarding flow behavior changed.
  • AI-assisted: Yes. I ran the fix, tests, and changed-scope validation locally in this workspace.

Change Type (select all)

  • Bug fix
  • Feature
  • Refactor required for the fix
  • 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

  • Closes #69497
  • Related #69462
  • This PR fixes a bug or regression

Root Cause (if applicable)

  • Root cause: the quickstart channel picker trusted the prompter result too broadly and only special-cased "__skip__"; it did not verify that the returned value was one of the currently rendered channel ids.
  • Missing detection / guardrail: there was no regression test covering an invalid or undefined quickstart picker result.
  • Contributing context (if known): the issue report shows the skip path in interactive onboarding regressed to a trim crash instead of cleanly advancing.

Regression Test Plan (if applicable)

  • Coverage level that should have caught this:
    • Unit test
    • Seam / integration test
    • End-to-end test
    • Existing coverage already sufficient
  • Target test or file: src/flows/channel-setup.test.ts
  • Scenario the test should lock in: when the quickstart picker returns undefined, channel setup behaves like "Skip for now" and does not try to load or configure a channel.
  • Why this is the smallest reliable guardrail: the bug is in the selection guard inside the shared channel setup flow, so a focused flow-level unit test exercises the failing branch without bringing in a full interactive onboarding stack.
  • Existing test that already covers this (if any): none.
  • If no new test is added, why not: N/A.

User-visible / Behavior Changes

  • QuickStart onboarding no longer crashes when the channel picker produces an invalid or missing selection during the "Skip for now" path; onboarding continues instead.

Diagram (if applicable)

Before:
[QuickStart channel picker skip/invalid result] -> [assume real channel choice] -> [downstream setup path] -> [crash]

After:
[QuickStart channel picker skip/invalid result] -> [validate against rendered channels] -> [treat as skip] -> [continue onboarding]

Security Impact (required)

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

Repro + Verification

Environment

  • OS: Ubuntu Linux in Cursor Cloud
  • Runtime/container: Node 22 + pnpm workspace
  • Model/provider: N/A
  • Integration/channel (if any): onboarding channel setup flow
  • Relevant config (redacted): none

Steps

  1. Start interactive onboarding in QuickStart mode.
  2. Reach Select channel (QuickStart).
  3. Trigger the skip path / missing picker value case.

Expected

  • Onboarding should continue without configuring a channel.

Actual

  • Before this fix, the reported path crashed with TypeError: Cannot read properties of undefined (reading 'trim').

Evidence

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

Human Verification (required)

  • Verified scenarios: ran pnpm test src/flows/channel-setup.test.ts; ran pnpm check:changed.
  • Edge cases checked: invalid undefined quickstart selection now behaves like skip and does not load or configure a channel.
  • What you did not verify: interactive TTY reproduction of the original skip path in this cloud environment.

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.

Compatibility / Migration

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

Risks and Mitigations

  • Risk: an unexpected but valid future picker value could be ignored if it is not included in the rendered entries list.
    • Mitigation: the guard intentionally only accepts currently rendered channel ids, which matches the setup flow contract and is covered by the new regression test.
<!-- CURSOR_AGENT_PR_BODY_END --> <div><a href="https://cursor.com/agents/bc-a225a134-d59a-46cf-a2c4-14c5aaa6297d"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-web-light.png"><img alt="Open in Web" width="114" height="28" src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a>&nbsp;<a href="https://cursor.com/background-agent?bcId=bc-a225a134-d59a-46cf-a2c4-14c5aaa6297d"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img alt="Open in Cursor" width="131" height="28" src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a>&nbsp;</div>

Changed files

  • src/flows/channel-setup.test.ts (modified, +67/-0)
  • src/flows/channel-setup.ts (modified, +6/-1)

PR #22: fix: handle undefined in trim call (#69547, #69497)

Description (problem / solution / changelog)

问题

#69547 和 #69497 都是对 undefined 调用 .trim() 导致的 TypeError。

修复

normalizeOptionalLowercaseString 中添加类型守卫:在调用 .toLowerCase() 之前先检查值是否为字符串类型。避免当传入非字符串值(如 undefined)时,先传给 normalizeOptionalString(返回 undefined),然后对 undefined 调用 .toLowerCase() 导致的 TypeError。

测试覆盖

新增 src/shared/string-coerce.test.ts,覆盖了 normalizeOptionalLowercaseStringundefinednull、非字符串值、空字符串、空格字符串的处理。

Changed files

  • .agents/maintainers.md (removed, +0/-1)
  • .agents/skills/openclaw-parallels-smoke/SKILL.md (modified, +15/-0)
  • .agents/skills/openclaw-qa-testing/SKILL.md (modified, +10/-10)
  • .agents/skills/openclaw-release-maintainer/SKILL.md (modified, +12/-0)
  • .agents/skills/openclaw-secret-scanning-maintainer/SKILL.md (modified, +31/-12)
  • .agents/skills/openclaw-secret-scanning-maintainer/scripts/secret-scanning.mjs (modified, +274/-15)
  • .agents/skills/openclaw-test-performance/SKILL.md (added, +134/-0)
  • .agents/skills/openclaw-test-performance/agents/openai.yaml (added, +6/-0)
  • .github/actionlint.yaml (modified, +2/-0)
  • .github/actions/setup-node-env/action.yml (modified, +6/-6)
  • .github/actions/setup-pnpm-store-cache/action.yml (modified, +3/-16)
  • .github/instructions/copilot.instructions.md (modified, +3/-3)
  • .github/workflows/ci.yml (modified, +1247/-353)
  • .github/workflows/codeql.yml (modified, +8/-7)
  • .github/workflows/control-ui-locale-refresh.yml (modified, +2/-2)
  • .github/workflows/docker-release.yml (modified, +23/-15)
  • .github/workflows/docs-sync-publish.yml (modified, +2/-2)
  • .github/workflows/install-smoke.yml (modified, +14/-11)
  • .github/workflows/macos-release.yml (modified, +0/-1)
  • .github/workflows/openclaw-cross-os-release-checks-reusable.yml (added, +472/-0)
  • .github/workflows/openclaw-live-and-e2e-checks-reusable.yml (added, +658/-0)
  • .github/workflows/openclaw-npm-release.yml (modified, +12/-3)
  • .github/workflows/openclaw-release-checks.yml (modified, +113/-37)
  • .github/workflows/openclaw-scheduled-live-checks.yml (added, +74/-0)
  • .github/workflows/parity-gate.yml (modified, +11/-2)
  • .github/workflows/plugin-clawhub-release.yml (modified, +0/-3)
  • .github/workflows/plugin-npm-release.yml (modified, +0/-3)
  • .github/workflows/sandbox-common-smoke.yml (modified, +4/-1)
  • .github/workflows/workflow-sanity.yml (modified, +3/-1)
  • .oxlintrc.json (modified, +29/-2)
  • .pre-commit-config.yaml (modified, +2/-2)
  • .vscode/settings.json (modified, +2/-1)
  • AGENTS.md (modified, +199/-318)
  • CHANGELOG.md (modified, +283/-1)
  • CONTRIBUTING.md (modified, +5/-2)
  • Dockerfile (modified, +7/-1)
  • Dockerfile.sandbox (modified, +1/-1)
  • Dockerfile.sandbox-browser (modified, +1/-1)
  • README.md (modified, +252/-384)
  • SECURITY.md (modified, +5/-0)
  • appcast.xml (modified, +116/-0)
  • apps/android/app/build.gradle.kts (modified, +2/-2)
  • apps/android/app/src/main/java/ai/openclaw/app/gateway/GatewayDiscovery.kt (modified, +36/-35)
  • apps/android/app/src/main/java/ai/openclaw/app/ui/CanvasScreen.kt (modified, +2/-8)
  • apps/ios/CHANGELOG.md (modified, +16/-0)
  • apps/ios/Config/Version.xcconfig (modified, +2/-2)
  • apps/ios/Sources/Gateway/GatewayConnectionController.swift (modified, +2/-1)
  • apps/ios/Sources/Gateway/GatewaySettingsStore.swift (modified, +3/-1)
  • apps/ios/Sources/HomeToolbar.swift (modified, +4/-1)
  • apps/ios/Sources/Model/NodeAppModel.swift (modified, +79/-48)
  • apps/ios/Sources/Onboarding/OnboardingWizardView.swift (modified, +3/-1)
  • apps/ios/Sources/Services/WatchConnectivityTransport.swift (modified, +7/-4)
  • apps/ios/Sources/Services/WatchMessagingService.swift (modified, +11/-3)
  • apps/ios/Sources/Voice/TalkModeManager.swift (modified, +6/-2)
  • apps/ios/fastlane/metadata/en-US/release_notes.txt (modified, +1/-1)
  • apps/ios/version.json (modified, +1/-1)
  • apps/macos/Sources/OpenClaw/AppState.swift (modified, +52/-66)
  • apps/macos/Sources/OpenClaw/ChannelsStore+Lifecycle.swift (modified, +2/-1)
  • apps/macos/Sources/OpenClaw/CommandResolver.swift (modified, +7/-3)
  • apps/macos/Sources/OpenClaw/ExecApprovalCommandDisplaySanitizer.swift (modified, +15/-1)
  • apps/macos/Sources/OpenClaw/ExecApprovalsSocket.swift (modified, +2/-4)
  • apps/macos/Sources/OpenClaw/GeneralSettings.swift (modified, +3/-1)
  • apps/macos/Sources/OpenClaw/NodeMode/MacNodeModeCoordinator.swift (modified, +1/-0)
  • apps/macos/Sources/OpenClaw/NodeMode/MacNodeRuntime.swift (modified, +32/-4)
  • apps/macos/Sources/OpenClaw/NodeMode/MacNodeRuntimeMainActorServices.swift (modified, +22/-0)
  • apps/macos/Sources/OpenClaw/NodeMode/MacNodeScreenCommands.swift (modified, +9/-0)
  • apps/macos/Sources/OpenClaw/NodePairingApprovalPrompter.swift (modified, +1/-2)
  • apps/macos/Sources/OpenClaw/OnboardingView+Pages.swift (modified, +3/-1)
  • apps/macos/Sources/OpenClaw/RemoteGatewayProbe.swift (modified, +21/-12)
  • apps/macos/Sources/OpenClaw/RemotePortTunnel.swift (modified, +1/-3)
  • apps/macos/Sources/OpenClaw/Resources/Info.plist (modified, +2/-2)
  • apps/macos/Sources/OpenClaw/ScreenSnapshotService.swift (added, +109/-0)
  • apps/macos/Sources/OpenClawProtocol/GatewayModels.swift (modified, +18/-0)
  • apps/macos/Tests/OpenClawIPCTests/AppStateRemoteConfigTests.swift (modified, +56/-49)
  • apps/macos/Tests/OpenClawIPCTests/CommandResolverTests.swift (modified, +3/-0)
  • apps/macos/Tests/OpenClawIPCTests/ExecApprovalCommandDisplaySanitizerTests.swift (modified, +33/-0)
  • apps/macos/Tests/OpenClawIPCTests/MacNodeRuntimeTests.swift (modified, +101/-0)
  • apps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatComposer.swift (modified, +37/-25)
  • apps/shared/OpenClawKit/Sources/OpenClawKit/ScreenCommands.swift (modified, +25/-0)
  • apps/shared/OpenClawKit/Sources/OpenClawProtocol/GatewayModels.swift (modified, +18/-0)
  • apps/shared/OpenClawKit/Tests/OpenClawKitTests/ChatComposerTextViewTests.swift (added, +15/-0)
  • docs/.generated/config-baseline.sha256 (modified, +4/-4)
  • docs/.generated/plugin-sdk-api-baseline.sha256 (modified, +2/-2)
  • docs/.i18n/glossary.zh-CN.json (modified, +24/-0)
  • docs/automation/cron-jobs.md (modified, +7/-1)
  • docs/automation/hooks.md (modified, +3/-1)
  • docs/automation/tasks.md (modified, +1/-1)
  • docs/channels/bluebubbles.md (modified, +49/-0)
  • docs/channels/groups.md (modified, +2/-2)
  • docs/channels/index.md (modified, +1/-1)
  • docs/channels/matrix.md (modified, +5/-3)
  • docs/channels/pairing.md (modified, +6/-0)
  • docs/channels/telegram.md (modified, +6/-2)
  • docs/channels/troubleshooting.md (modified, +10/-8)
  • docs/channels/wechat.md (added, +168/-0)
  • docs/ci.md (modified, +42/-28)
  • docs/cli/config.md (modified, +28/-0)
  • docs/cli/devices.md (modified, +9/-2)
  • docs/cli/gateway.md (modified, +21/-7)
  • docs/cli/hooks.md (modified, +1/-0)

PR #69586: fix(onboard): handle undefined labels in channel setup selection

Description (problem / solution / changelog)

The formatSetupSelectionLabel function would throw 'Cannot read properties of undefined (reading trim)' when the label or fallback was undefined. This could happen when selecting 'Skip for now' in the onboard flow, as the quick start channel might not have a defined label.

This fix adds null/undefined guards before calling sanitizeTerminalText, matching the pattern already used in formatSetupSelectionHint.

Fixes #69497

Changed files

  • src/flows/channel-setup.status.ts (modified, +6/-6)
  • src/tasks/task-registry.audit.ts (modified, +4/-0)
RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

I the openclaw onboard menu, I encountered this error after clicking skip for now on the Select channel dialogue ◇ Select channel (QuickStart) │ Skip for now TypeError: Cannot read properties of undefined (reading 'trim')

Steps to reproduce

go through onboard menu, click skip for now on channel setup

Expected behavior

Go to the next dialogue

Actual behavior

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

OpenClaw version

OpenClaw 2026.4.14 (323493f)

Operating system

Ubuntu: OpenClaw 2026.4.14 (323493f)

Install method

curl

Model

none

Provider / routing chain

OpenClaw 2026.4.14 (323493f)

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 error "TypeError: Cannot read properties of undefined (reading 'trim')" suggests that the code is trying to access a property of an undefined object, which can be fixed by ensuring the object is defined before trying to access its properties.

Guidance

  • The error occurs when clicking "Skip for now" on the Select channel dialogue, indicating that the issue might be related to the handling of this specific button click event.
  • To mitigate this, verify that the object being accessed is properly initialized and defined before the "Skip for now" button is clicked.
  • Check the code that handles the "Skip for now" button click event to ensure it does not try to access properties of an undefined object.
  • Consider adding error handling or checks to ensure that the object is defined before trying to access its properties.

Example

No code snippet can be provided without more context, but the fix might involve something like checking if an object is defined before trying to access its properties:

if (object !== undefined && object !== null) {
  // safely access object properties
}

Notes

The provided information does not include the specific code that is causing the error, so the guidance is based on general principles of handling undefined objects.

Recommendation

Apply workaround: The issue seems to be related to a specific code path, so applying a workaround to handle the undefined object might be the most straightforward solution.

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

Go to the next dialogue

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]: ◇ Select channel (QuickStart) │ Skip for now TypeError: Cannot read properties of undefined (reading 'trim') [3 pull requests]