#TypeError: Cannot read properties of undefined (reading 'trim')
11 messages Β· Page 1 of 1 (latest)
Iβm checking the onboarding path that handles βskip channelβ so I can give you something more useful than a guess.
Skipping channels should be valid, so that looks like a bug, not you.
Can you paste these?
openclaw --version
openclaw status --all
And if you have it, the full stack trace after the reading 'trim' error.
Iβve seen similar trim crashes come from stale session/bootstrap state, especially on older builds, but I want to confirm your version first before suggesting a cleanup/reset.
Docs:
https://docs.openclaw.ai/help/faq
https://docs.openclaw.ai/gateway/troubleshooting
x@x-Mini ~ % openclaw --version
OpenClaw 2026.4.14 (323493f)
x@x-Mini ~ % openclaw status --all
π¦ OpenClaw 2026.4.14 (323493f) β I'm like tmux: confusing at first, then suddenly you can't live without me.
β
OpenClaw status --all
Overview
βββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Item β Value β
βββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Version β 2026.4.14 β
β OS β macos 26.4 (arm64) β
β Node β 22.22.2 β
β Config β ~/.openclaw/openclaw.json β
β Dashboard β http://127.0.0.1:18789/ β
β Tailscale β off β
β Channel β stable (default) β
β Update β pkg β
β Gateway β local Β· ws://127.0.0.1:18789 (local loopback) Β· unreachable β
β Security β Run: openclaw security audit --deep β
β Gateway self β unknown β
β Gateway service β LaunchAgent not installed β
β Node service β LaunchAgent not installed β
β Agents β 0 total Β· 0 bootstrapping Β· 0 active Β· 0 sessions β
β Secrets β none β
βββββββββββββββββββ΄βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Channels
ββββββββββββ¬ββββββββββ¬βββββββββ¬βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Channel β Enabled β State β Detail β
ββββββββββββΌββββββββββΌβββββββββΌβββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
ββββββββββββ΄ββββββββββ΄βββββββββ΄βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Agents
ββββββββββββββ¬βββββββββββββββββ¬βββββββββββ¬βββββββββββ¬βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Agent β Bootstrap file β Sessions β Active β Store β
ββββββββββββββΌβββββββββββββββββΌβββββββββββΌβββββββββββΌβββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
ββββββββββββββ΄βββββββββββββββββ΄βββββββββββ΄βββββββββββ΄βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Diagnosis (read-only)
Gateway connection details:
Gateway target: ws://127.0.0.1:18789
Source: local loopback
Config: /Users/x/.openclaw/openclaw.json
Bind: loopback
β Config: /Users/x/.openclaw/openclaw.json
β Secret diagnostics (0)
β Restart sentinel: none
β Port 18789
! Tailscale: off Β· unknown
β Plugin compatibility (none)
! Channel issues skipped (gateway unreachable)
Gateway health:
gateway unreachable
That helps, thanks. Iβm checking the gateway troubleshooting path, because your status output points more to βgateway never came upβ than to channel setup itself.
Thanks, this helps a lot.
Your version looks current enough. The bigger problem in that output is this part:
- Gateway: unreachable
- LaunchAgent not installed
- 0 agents / 0 sessions
So I donβt think βskip channelβ is the real blocker. It looks more like setup exited before the gateway actually came up.
Try this first:
openclaw gateway run
If you want the background service path instead, rerun onboarding with:
openclaw onboard --install-daemon
If openclaw gateway run throws the same trim error, please paste:
openclaw gateway status
openclaw logs --follow
The first 20 to 30 log lines after the failure should be enough.
Docs:
https://docs.openclaw.ai/help/faq
https://docs.openclaw.ai/gateway/troubleshooting
https://docs.openclaw.ai/start/onboarding
xx@xx-Mini ~ % openclaw gateway status
openclaw logs --follow
π¦ OpenClaw 2026.4.14 (323493f)
If it's repetitive, I'll automate it; if it's hard, I'll bring jokes and a rollback plan.
β
β
Service: LaunchAgent (not loaded)
File logs: /tmp/openclaw/openclaw-2026-04-15.log
Config (cli): ~/.openclaw/openclaw.json (missing)
Config (service): ~/.openclaw/openclaw.json (missing)
Gateway: bind=loopback (127.0.0.1), port=18789 (env/config)
Probe target: ws://127.0.0.1:18789
Dashboard: http://127.0.0.1:18789/
Probe note: Loopback-only gateway; only local clients can connect.
Runtime: unknown (Bad request.
Could not find service "ai.openclaw.gateway" in domain for user gui: 501)
RPC probe: failed
RPC target: ws://127.0.0.1:18789
gateway closed (1006):
Service unit not found.
Service not installed. Run: openclaw gateway install
File logs: /tmp/openclaw/openclaw-2026-04-15.log
Troubles: run openclaw status
Troubleshooting: https://docs.openclaw.ai/troubleshooting
π¦ OpenClaw 2026.4.14 (323493f) β Your .zshrc wishes it could do what I do.
Gateway not reachable. Is it running and accessible?
Gateway target: ws://127.0.0.1:18789
Source: local loopback
Config: /Users/xx/.openclaw/openclaw.json
Bind: loopback
Hint: run openclaw doctor.
Nice, we found the real clue. Iβm checking the docs for the exact βconfig missing / service not installedβ recovery path so I donβt send you down a bad branch.
Aha, this is the key line:
Config (cli): ~/.openclaw/openclaw.json (missing)
So the problem is not really βchannel skippedβ, itβs that onboarding never finished writing the local config. That also explains:
- service not installed
- gateway unreachable
- 0 agents / 0 sessions
For a fresh install, Iβd do the guided path again:
openclaw onboard --install-daemon
That should recreate the config, set local gateway mode, and install/start the LaunchAgent.
If you want the more manual path instead:
openclaw setup
openclaw gateway install
openclaw gateway start
If the same trim error happens again during onboarding, please paste:
tail -n 100 /tmp/openclaw/openclaw-2026-04-15.log
At that point Iβd treat it as a real onboarding bug, and itβd be worth filing an issue here:
https://github.com/openclaw/openclaw/issues