Skip to content

Troubleshooting

Start with wx daemon doctor if the daemon won’t start or you aren’t sure which local daemon owns a data folder. If the daemon is running, start with wx accounts status. It shows whether you’re logged in (authenticated), connected (connection), and whether any work is stuck.

Install

wx says no native runtime is installed

Cause: The npm package couldn’t fetch the binary, or install scripts were skipped. Fix: Run wx-native-install, or with pnpm, pnpm approve-builds -g. On Linux, check that glibc is 2.36 or newer (ldd --version).

Starting the daemon

Check the data folder with wx daemon doctor

Run it on the machine that holds the data folder. When the daemon is stopped, it only reads files: it never opens a database for writing, never starts a daemon and never contacts WeChat.

Terminal window
wx daemon doctor
Target: /home/you/.local/share/agent-wechat (chosen from: default)
Listen: http://127.0.0.1:6174 State: stopped (read-only check)
Status Check Summary
OK server_config Using default server settings
OK data_dir Data folder is owned by UID 1000 with mode 0700
OK sqlite.registry registry.sqlite OK (schema v4/4, 36.0 KiB)
OK disk.space 42.3 GiB free of 100.0 GiB
OK media_tools FFmpeg and FFprobe available
FlagWhat it does
--allCheck every local daemon data folder (wx daemon, systemd, desktop hub and running wx serve processes).
--fixApply only safe cleanup, such as removing a leftover daemon/process.json for a dead process. Never changes, moves or deletes database files.

Use --data-dir PATH or --server-config FILE to check a non-default folder, and --json for machine-readable output. For a daemon in Docker, run docker exec CONTAINER wx daemon doctor. If wx itself looks broken, wx feedback prints a pre-filled bug-report link.

Address already in use

Cause: Another daemon is already running, perhaps under wx daemon, systemd, Docker or OpenClaw managed mode. Fix: Run wx daemon doctor to see which process holds the port. Stop that one, or connect to it instead (Reach it from other machines). Don’t kill a process you don’t recognize just because it holds the port.

Old serverUrl or backend settings are rejected

Cause: You’re using a 0.x configuration. Fix: Follow Migrate from the old container.

”cannot open … database WAL …; existing files preserved”

Cause: One of the daemon’s databases doesn’t match its log (the -wal file beside it), or its -shm index file is unrecognized. This usually follows a sudden stop of the computer, VM or WSL, or a full disk. Run wx daemon doctor to inspect the files without changing them. The daemon repairs the common cases itself, including an out-of-date index or a 3-byte -shm left by an interrupted start, and keeps a copy of the original files in a .sqlite-recovery-… folder beside the database. It starts normally, without a copy, when another SQLite program emptied the -wal after saving all its changes. Fix: If the daemon still won’t start, stop it and copy the database with its -wal and -shm files somewhere safe. If the message says commits from a newer log generation, index exceeds log or published frame is not a verified commit, the log is missing the latest changes: move the -shm file out of the folder and start the daemon again. For any other message, the log or index file is damaged or unrecognized: restore the data directory from a backup (Maintain your install), or open an issue with the redacted bug report that wx daemon doctor prints.

Login

”Account mismatch” or the database won’t unlock

Cause: You logged in with a different WeChat account from the one the profile belongs to. Fix: Log in with the profile’s own account. A new QR code won’t get around this.

The QR code expired

Fix: Run wx auth login again for a fresh one.

Phone approval stalls

Cause: Some approvals need the phone to reach the daemon over the local network. Fix: Put both on the same network, and check the firewall and Wi-Fi client isolation.

wx says login is needed after a restart

Cause: WeChat rejected the saved session. Fix: Run wx auth login. Usually you only need to approve on your phone.

Signing in to an existing account fails at once, with no QR code

Cause: WeChat refused the saved sign-in, and trying again repeats the refusal. Fix: In the desktop app, choose Sign in with a QR code instead. From the CLI, run wx --account ACCOUNT_ID auth login --force-qr. Both keep the same account and its chats. Don’t use Add WeChat account for this: it creates a new, empty account. If you report the problem, include the Details line from the sign-in screen, or the service and serviceCode that wx auth login prints.

Profile

”Unsupported schema”

Cause: The profile’s database layout isn’t one the daemon knows how to write. Fix: Keep the profile as it is, don’t open WeChat on it, and check for a newer wx.

”Permission denied” on the profile

Cause: The user running the daemon (UID 10001 in Docker) can’t read or write the profile folders. Fix: Give that user read and write access to the profile folders.

Media and sends

Media stays pending, or shows failed or expired

Cause: pending means the download is queued or still running. failed means this attempt didn’t finish. expired means WeChat no longer has the file. Fix: For pending, check later with wx jobs get JOB_ID. For failed, request the media again when it’s marked retryable (the app shows Retry); that starts a fresh download. For expired, no retry will help.

A send says needs_review

Cause: WeChat may or may not have received the message. Fix: Check the chat on your phone before sending again. See Sends and recovery.

OpenClaw

The agent never replies

Cause: dmPolicy and groupPolicy both default to disabled. Or the sender isn’t in allowFrom, or in a group they didn’t @mention you. Fix: Set the policies and lists as described in Which chats the agent answers. Then check the Gateway log for token errors.

Messages stay unread

Cause: This is expected for ignored messages and with readPolicy: "never". With on_model_dispatch, read receipts follow the strict mode rules. Fix: To change when messages are marked read, see strict mode.

Reporting a bug

Include wx --json version, wx accounts status, and what you ran. Remove tokens, phone numbers and message content first. Open an issue.