Troubleshooting
The log fills with poll errors
Symptom: serve: poll error: … repeating in serve.log; commands stop being answered; GetSelf fails.
Usual cause: the Bearer token died. Token lifetime is unknown, and logging out of the alt, changing its password, or "log out all devices" revokes it immediately. There is no refresh flow, repeat the Token Capture and replace ROOT_TOKEN in .env, then restart the bot:
systemctl restart rootbot-musicbotOther causes to rule out: the VPS lost network egress (every API call times out), or Root changed the API (the client is pre-1.0; field numbers were mapped from client 0.9.167 and may need re-mapping after an update).
!play can't find anything / search returns nothing
Symptom: "Could not find that track." for every query.
Check Lavalink first:
curl -H "Authorization: <password>" http://127.0.0.1:2333/v4/info
tail -50 <lavalink_dir>/lavalink.logIf /v4/info fails, Lavalink is down or the password the bot reads (LAVALINK_PASSWORD, else the file named by LAVALINK_PASSWORD_FILE) doesn't match application.yml. If neither variable is set at all, the bot refuses to start with RB-E014; there is no default password file. If Lavalink is up but tracks won't load, the YouTube side is the problem, see the next two sections.
Why not just yt-dlp? (bot-check and SABR background)
The bot's fallback path (yt-dlp) fails from a server for two separate, stacked reasons:
- Bot-check on datacenter IPs. Without cookies, YouTube answers "Sign in to confirm you're not a bot" for every client. The VPS's IP reputation is the problem, not the tool, the same request from a residential IP works.
- SABR forcing on cookie sessions. With cookies the bot-check goes away, but some accounts are flagged so that web clients only receive SABR streams. yt-dlp cannot download SABR; the practical result is "only images are available", storyboard thumbnails and no audio formats, on every player client. PO tokens (e.g. via the bgutil provider) are generated and accepted, and the formats still come back URL-less.
The working route avoids both: Lavalink's youtube-source TV client with OAuth (a burner account's refresh token, no browser cookies) gets normal direct formats even from a datacenter IP. That is why the plugin must be built from the commit carrying the PlayStation 4 user-agent TV fix, see Lavalink.
Lavalink OAuth problems
- No device code in the log:
oauth.enabled: truemust be set andrefreshTokenmust be empty for the device flow to start. - Device code expired: codes are short-lived; restart Lavalink and approve the new code promptly, signed in as the burner account.
- "YouTube access token refreshed successfully" never appears after pasting the refresh token: the token was pasted with quotes/whitespace issues, or it belongs to a different flow. Redo the device step and copy the token exactly as logged.
- Tracks load but streams 403/empty: the cipher server is part of playback. If the public demo cipher (
cipher.kikkia.dev) is down or rate-limiting you, self-host yt-cipher and repointremoteCipher.url.
The bot ignores a community or channel
The bot only sees communities the alt account is a member of, and only channels returned for them. If a community is missing from the startup log, add/invite the alt there; the 60-second rescan picks it up without a restart. If the startup log says discovery=config, the ListMine call returned nothing and the bot is running on the config.json fallback list, check the token and the log lines above the startup line for the discovery error.
Commands work, but the bot won't join voice
!playanswers "Join a voice channel first, then !play.", the follow-me presence check found the command author in no voice channel of that community. Sit in a voice channel before sending!play.- "Join my voice channel to control the bot.", the bot is already playing and you are not in its voice channel. While it plays, commands (including picker digit replies) are only accepted from members of its channel. This gate fails open if the presence call itself errors.
- Join hangs or the LiveKit signal times out: the bot needs direct internet egress for LiveKit media. A host whose traffic only leaves through an HTTP proxy cannot join, the LiveKit SDK does not use the proxy for its signal socket.
Chat API quirks worth knowing
MessageListrequires limit 10–50. Outside that range the server returns HTTP 200 with an empty body andgrpc-status: 3("Limit Must be between 10 and 50") in the response headers. The library clamps for you.- Requests must omit the context field, sending it makes
MessageCreate/SessionCreatereturn an empty error. The library already omits it; if you hand-roll calls, do the same. - Messages have no
created_at; ordering comes from time-ordered message ids and newest-first List responses. If the bot replays old commands after a restart, the seen-ID priming at startup is the thing to check.
Setup errors (the RB-E table)
Setup failures carry a stable ID from the framework's error table. rootbot doctor and rootbot serve print the first failing check in this shape; the IDs never change or get reused. This section is generated from the table in rootbot.diagnostics; do not edit it by hand.
RB-E001: missing_token
When: No token in the environment, in a .env file, or in the configuration.
Message: No Root token was found. Set the ROOT_TOKEN environment variable, or put ROOT_TOKEN in a .env file (see .env.example), then try again. Use the token of the bot's throwaway Root account, never your main account.
RB-E002: bad_token
When: Root's API answers HTTP 401 or 403 for the configured token.
Message: Root rejected the token (HTTP 401/403): it is invalid, expired, or belongs to a different account. Capture a fresh token for the bot account, update ROOT_TOKEN, and try again.
RB-E003: root_unreachable
When: Connecting to Root's API fails (DNS, connection or TLS) until the retry bound is exhausted.
Message: Root's API could not be reached. Check this machine's internet connection and any proxy settings, then try again. If Root itself is down, wait and retry later.
RB-E004: invalid_config
When: Configuration validation rejects the configuration, or the config file does not contain a JSON object.
Message: The configuration is invalid: {detail}. Fix the named value and try again; config.example.json shows every key with a valid value.
RB-E005: no_ffmpeg
When: No ffmpeg binary is found on PATH.
Message: ffmpeg was not found on PATH; voice playback cannot work without it. Install ffmpeg (Windows: winget install ffmpeg; Debian/Ubuntu: apt install ffmpeg; macOS: brew install ffmpeg) and try again.
RB-E006: voice_extra_missing
When: Voice is used but the livekit package is not installed.
Message: Voice support needs the livekit package, which is not installed. Install the voice extra with: pip install "rootbot-framework[voice]" and try again.
RB-E007: lavalink_unreachable
When: Connecting to the configured Lavalink server fails.
Message: The Lavalink server could not be reached. Check that Lavalink is running and that the host and port in the music configuration point at it, then try again.
RB-E008: lavalink_wrong_password
When: Lavalink answers HTTP 401 for the configured password.
Message: Lavalink rejected the configured password (HTTP 401). Make the password in the bot's music configuration match the one in Lavalink's application.yml, then try again.
RB-E009: python_too_old
When: The running interpreter is older than Python 3.11.
Message: This Python is too old: the framework needs Python 3.11 or newer. Install a newer Python, recreate the virtual environment with it, and try again.
RB-E010: plugin_api_version_mismatch
When: A plugin's declared api_version does not equal the framework's PLUGIN_API_VERSION.
Message: A plugin declares an api_version that does not match this framework's plugin API version. Update the plugin to the current plugin API, or install a framework release the plugin was written for.
RB-E011: plugin_requires_framework_mismatch
When: A plugin's requires_framework range does not include the framework's version.
Message: A plugin's requires_framework range does not include this framework's version. Update the plugin (or its range, if you maintain it), or install a framework version inside the range.
RB-E012: community_container_unset
When: The bot starts with no community_id and no container_id configured.
Message: No community or container is configured, so the bot does not know where to listen. Set community_id and container_id in the configuration, then try again.
RB-E013: voice_join_refused
When: A voice join is refused: the account is not a member of the community, the plugin is disabled there, or the community's one voice connection is already held.
Message: The voice join was refused for this community. Check that the bot account is a member of the community, that the plugin is not disabled there, and that no other plugin is already connected, then try again.
RB-E014: lavalink_password_unconfigured
When: A Lavalink password is resolved with no password from any source: no explicit value, no LAVALINK_PASSWORD environment variable, and no password file from an explicitly configured path.
Message: No Lavalink password is configured. Set the LAVALINK_PASSWORD environment variable, or set LAVALINK_PASSWORD_FILE to the path of a file containing the password (or pass a password or password_file to the Lavalink client directly), then try again. There is no default password file.