OpenClaw 2026.4.14 Onboarding Fails with "Cannot read properties of undefined (reading 'trim')"

Published April 17, 2026 · Bug #67774 · Affects: 2026.4.14 · Platform: macOS (M1/M2), npm install

You just installed OpenClaw 2026.4.14 on a Mac and ran through setup. The onboarding wizard starts, asks a few questions — then abruptly exits with:

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

The wizard never completes. Even after a full uninstall (rm -rf ~/.openclaw) and fresh npm install, it fails the same way. You're stuck at zero.

What's Happening

This is a regression in 2026.4.14's onboarding wizard. At some point in the config flow, the wizard attempts to call .trim() on a value that came back undefined — likely a model or provider field that 2026.4.14 expects to be pre-populated but isn't during a clean first-run.

The specific trigger in confirmed reports is selecting Gemma 4 (E2B) as the model via the Ollama local route on macOS. Other model selections may not trigger it, but the onboarding code path appears fragile for any provider that returns an unexpected shape during initial probing.

Quick Diagnosis

# Check your version
openclaw --version
# If it says 2026.4.14 and you're on macOS → you're likely affected

# See the full stack trace
openclaw configure 2>&1 | tee /tmp/openclaw-onboard.log
cat /tmp/openclaw-onboard.log
# Look for: TypeError: Cannot read properties of undefined (reading 'trim')

Fixes

Fix 1: Roll Back to 2026.4.13

The simplest fix — 2026.4.13 does not have this regression:

sudo npm install -g openclaw@2026.4.13
openclaw configure

Fix 2: Use a Known-Good Model Selection

If you want to stay on 2026.4.14, avoid Gemma/E2B during initial setup. Use Anthropic Claude or OpenAI first — complete onboarding — then switch models afterward:

# Complete onboarding with a standard provider
openclaw configure
# Select: anthropic → claude-sonnet-4-6

# After onboarding completes, switch models
openclaw models set ollama/gemma4:e2b

Fix 3: Manually Bootstrap the Config

Skip the wizard entirely and create a minimal openclaw.json by hand. This bypasses the trim() crash:

mkdir -p ~/.openclaw
cat > ~/.openclaw/openclaw.json << 'EOF'
{
  "version": "1",
  "agents": {
    "main": {
      "model": "anthropic/claude-sonnet-4-6"
    }
  }
}
EOF
openclaw gateway start

Then add channels and auth via openclaw configure --channels and openclaw models auth separately.

Fix 4: Wait for 2026.4.15 Stable

The beta (2026.4.15-beta.1) may address this. Once stable ships, npm install -g openclaw@latest should resolve it. Track at issue #67774.

Full Uninstall + Reinstall Steps (If You've Already Broken State)

# Full wipe
rm -rf ~/.openclaw
rm -rf ~/.config/openclaw
rm -rf ~/.local/share/openclaw
sudo rm -f /usr/local/bin/openclaw

# Reinstall at 2026.4.13
sudo npm install -g openclaw@2026.4.13

# Verify
openclaw --version  # should show 2026.4.13

# Run setup
openclaw configure

macOS-Specific Note

On macOS 26.x (Tahoe) with Apple Silicon, npm global installs sometimes land in a path not on your $PATH. If openclaw isn't found after install:

export PATH="$(npm root -g)/../bin:$PATH"
# or permanently:
echo 'export PATH="$(npm root -g)/../bin:$PATH"' >> ~/.zshrc

Need a Hand?

If you're stuck in a broken onboarding state and want someone to just make it work, ClawReady's $99 setup tier covers exactly this — we'll remote-guide you through a clean install in under 30 minutes.

← Back to blog