#onboarding error

44 messages · Page 1 of 1 (latest)

blissful kite
#

TypeError: Cannot read properties of undefined (reading 'trim')
i get this after i enter my API key and say skip for now

tawdry patioBOT
#

Yeah, that looks like a known onboarding bug, not a bad API key.

Can you paste:

openclaw --version

There’s a fix on main for this exact Cannot read properties of undefined (reading 'trim') onboarding crash. If you want to try the fix right away:

openclaw update --tag main
openclaw doctor
openclaw gateway restart

If you have any custom provider plugins installed, that’s the likely trigger, so temporarily disabling/removing those is a good workaround too.

blissful kite
#

Update Result: ERROR
Root: /home/virt/.npm-global/lib/node_modules/openclaw
Reason: global update
Before: 2026.4.14
After: 2026.4.14

tawdry patioBOT
#

Yep, that confirms it, you’re still on 2026.4.14, so the fix is not in your build yet.

A normal openclaw update won’t help until that fix hits stable. Try this instead:

openclaw update --tag main
openclaw doctor
openclaw gateway restart
openclaw onboard

If you’d rather stay on stable, the workaround is to temporarily disable/remove any custom provider plugins, then rerun onboarding. That trim crash is coming from provider metadata during setup, not from your API key.

If openclaw update --tag main fails too, paste the full output and I’ll help from there.

blissful kite
#

i just uninstalled openclaw . can i have to current version . command please

tawdry patioBOT
#

Yep, for the fix we were talking about, install main:

curl -fsSL --proto '=https' --tlsv1.2 https://openclaw.ai/install.sh | bash -s -- --version main

Then run:

openclaw --version
openclaw onboard

If you want stable instead, use:

blissful kite
#

âś“ Git already installed
· Installing OpenClaw (main)
! npm install failed for openclaw@main
Command: env SHARP_IGNORE_GLOBAL_LIBVIPS=1 npm --loglevel error --silent --no-fund --no-audit install -g openclaw@main
Installer log: /tmp/tmp.ug4fLXXM4F
! npm install failed; showing last log lines
! npm install failed; retrying
! npm install failed for openclaw@main
Command: env SHARP_IGNORE_GLOBAL_LIBVIPS=1 npm --loglevel error --silent --no-fund --no-audit install -g openclaw@main
Installer log: /tmp/tmp.zGGKPAkv79
! npm install failed; showing last log

tawdry patioBOT
#

Ah, got it. openclaw@main via npm is what failed, not the installer itself.

Try the git install instead, that’s the better path for main anyway:

curl -fsSL --proto '=https' --tlsv1.2 https://openclaw.ai/install.sh | bash -s -- --install-method git
openclaw onboard

If that also blows up, paste the last 50 lines of the installer log it printed:

tail -50 /tmp/tmp.zGGKPAkv79

Docs:

blissful kite
#

what is thelatest version of openclaw need the command to pull

tawdry patioBOT
#

I wouldn’t guess the version number here, it moves fast.

Use one of these:

# latest stable
openclaw update
# latest main/dev
openclaw update --channel dev

If you want to check what you’re on after:

blissful kite
#

Update blocked: local files are edited in this checkout.
Git-based updates need a clean working tree before they can switch commits, fetch, or rebase.
Commit, stash, or discard the local changes, then rerun openclaw update.

tawdry patioBOT
#

That means you’re on a git checkout, and it has local edits.

Safest next step:

openclaw update status
cd ~/openclaw
git status --short

If those changes are just temp/generated stuff and you don’t need them, stash them, then update:

git stash push -u -m "before openclaw update"
openclaw update --channel dev
blissful kite
#

Update Result: SKIPPED
Root: /home/virt/openclaw
Reason: dirty
Before: 2026.4.15-beta.2

Total time: 26ms
Update blocked: local files are edited in this checkout.
Git-based updates need a clean working tree before they can switch commits, fetch, or rebase.
Commit, stash, or discard the local changes, then rerun openclaw update.
virt@virt:~/openclaw$

tawdry patioBOT
#

Good news, you already have the fix.

2026.4.15-beta.2 includes the Cannot read properties of undefined (reading 'trim') onboarding fix, so you do not need to update further for that specific bug.

Just rerun onboarding:

openclaw onboard

If it still crashes on 2026.4.15-beta.2, then it’s a different issue, and I’d want these next:

openclaw --version
openclaw status --all
#

and the full onboarding error output.

Glad we caught that, the dirty git tree was a distraction here.

blissful kite
#

how do i uninstall completly and start over

tawdry patioBOT
#

Yep. If you want a real clean restart, I’d do this.

1) Optional backup first

openclaw backup create

2) Full uninstall

openclaw uninstall --all --yes

3) If you used the git install, move the old checkout out of the way too

mv ~/openclaw ~/openclaw.old.$(date +%s)
#

4) Reinstall fresh

I’d use beta right now, because your original trim onboarding bug is fixed there:

curl -fsSL --proto '=https' --tlsv1.2 https://openclaw.ai/install.sh | bash -s -- --beta
openclaw onboard

If you want to preview what uninstall will remove first:

openclaw uninstall --all --dry-run

Docs:

blissful kite
#

why is it beta?

tawdry patioBOT
#

Because that specific onboarding fix is in beta already, but may not be in stable yet.

So the logic was:

  • stable = safest, but can still have your trim bug
  • beta = closest thing to stable with the fix included
  • dev/main = also has the fix, but is usually more moving-target than beta

So I recommended beta as the least-chaotic way to get past this bug.

If you want to wait for stable, that’s fine too, but beta was just the practical “fixed without going full dev” option.

blissful kite
#

can i have the most recent stable version now.

tawdry patioBOT
#

Yep.

If you want the latest stable on a fresh install:

curl -fsSL --proto '=https' --tlsv1.2 https://openclaw.ai/install.sh | bash

If OpenClaw is already installed and you just want to switch/update to stable:

openclaw update --channel stable

Then check:

#
openclaw --version

One small warning, if your original trim onboarding bug comes back, that just means stable still hasn’t picked up that fix yet.

blissful kite
#

Service: systemd (enabled)
File logs: /tmp/openclaw/openclaw-2026-04-16.log
Command: /usr/bin/node /home/virt/.npm-global/lib/node_modules/openclaw/dist/index.js gateway --port 18789
Service file: ~/.config/systemd/user/openclaw-gateway.service
Service env: OPENCLAW_GATEWAY_PORT=18789

Config (cli): ~/.openclaw/openclaw.json
Config (service): ~/.openclaw/openclaw.json

Gateway: bind=loopback (127.0.0.1), port=18789 (service args)
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: stopped (state failed, sub failed, last exit 78, reason 1)
RPC probe: failed
RPC target: ws://127.0.0.1:18789
gateway closed (1006):

Service is loaded but not running (likely exited immediately).
File logs: /tmp/openclaw/openclaw-2026-04-16.log
Logs: journalctl --user -u openclaw-gateway.service -n 200 --no-pager

Troubles: run openclaw status
Troubleshooting: https://docs.openclaw.ai/troubleshooting
virt@virt:~$

tawdry patioBOT
#

Yep, the gateway is failing on startup, but that status output still doesn’t show the real cause.

exit 78 is usually a startup/config error, so I need the logs next. Please paste these:

openclaw --version
journalctl --user -u openclaw-gateway.service -n 200 --no-pager
tail -100 /tmp/openclaw/openclaw-2026-04-16.log

If you want one more useful check too:

openclaw doctor

Once I see that, I can usually tell pretty quickly what actually broke.

blissful kite
#

back to trim error i need the fix again please should i uninstall?

tawdry patioBOT
#

No, don’t uninstall first.

That trim error usually just means you’re back on a build without the fix. Start with:

openclaw --version

If you’re on stable/latest, switch to beta and rerun onboarding:

openclaw update --channel beta
openclaw gateway restart
openclaw onboard

If update is blocked again or your install is messy, then I’d do the clean reinstall path.

#

Paste openclaw --version if you want, and I’ll tell you the exact next step.

blissful kite
#

i try to chat and get no response

tawdry patioBOT
#

That usually means the gateway isn’t actually running, especially with the errors you hit earlier.

Please paste these:

openclaw --version
openclaw status
openclaw gateway status
openclaw doctor

If you want the fastest signal, also run:

openclaw logs --follow
#

and send the first error it shows.

If openclaw gateway status says Runtime: stopped, that’s the reason you’re getting no replies.

blissful kite
#

HTTP 401 authentication_error: invalid x-api-key

tawdry patioBOT
#

That one is simpler, your Anthropic API key is invalid or it was pasted into the wrong auth slot.

You do not need to uninstall for this.

Try this:

openclaw configure

Then choose Anthropic API key again and paste a fresh key from the Anthropic Console.

A valid Anthropic key usually starts with:

sk-ant-
#

Then verify it with:

openclaw models list --provider anthropic

or:

openclaw models status

If you want, you can also rerun onboarding directly with the key:

openclaw onboard --anthropic-api-key "$ANTHROPIC_API_KEY"
blissful kite
#

22:12:41+00:00 error diagnostic {"subsystem":"diagnostic"} lane task error: lane=main durationMs=503 error="FailoverError: HTTP 401 authentication_error: invalid x-api-key"
22:12:41+00:00 error diagnostic {"subsystem":"diagnostic"} lane task error: lane=session:agent:main:main durationMs=504 error="FailoverError: HTTP 401 authentication_error: invalid x-api-key"
22:12:41+00:00 warn model-fallback/decision {"subsystem":"model-fallback/decision"} {"event":"model_fallback_decision","tags":["error_handling","model_fallback","candidate_failed"],"runId":"751bc190-9022-4c1d-abe7-e5c2c9138bb6","decision":"candidate_failed","requestedProvider":"anthropic","requestedModel":"claude-sonnet-4-6","candidateProvider":"anthropic","candidateModel":"claude-sonnet-4-6","attempt":1,"total":2,"reason":"auth","status":401,"errorPreview":"HTTP 401 authentication_error: invalid x-api-key","errorHash":"sha256:28eb7af095b8","nextCandidateProvider":"anthropic","nextCandidateModel":"claude-opus-4-7","isPrimary":true,"requestedModelMatched":true,"fallbackConfigured":true} model fallback decision

tawdry patioBOT
#

Yep, this confirms it, the problem is Anthropic auth now, not the trim bug.

Both models are failing because they use the same bad Anthropic key, so fallback won’t help.

Do this:

openclaw configure

Then either:

  • choose Anthropic API key and paste a fresh key from Anthropic, or
  • choose Claude CLI if you want to use an existing Claude login instead

After that: