symptom · cause · fix
Troubleshooting
upb-moodle troubleshooting starts from two commands: upb-moodle doctor and upb-moodle auth-status. They say what is installed, what token exists and where it is, without printing the token.
The first check
| Command | What it shows |
|---|---|
upb-moodle auth-status | whether the saved token works, with a real call |
upb-moodle doctor | the platforms, the installed scopes, the token source, .env, the MCP processes, the version |
upb-moodle whoami | the connected account, the site and the number of available functions |
Sign-in
“The token is missing.” You have not run upb-moodle login, or the token was deleted. Run upb-moodle login again.
The browser login times out. The window opened, but you did not sign in or did not reach the token page. Run it again and sign in with UPB Login, including the one-time code. You can raise the timeout with upb-moodle login --timeout 600.
“The browser for login is not installed.” On Linux and macOS, Playwright needs Chromium. The error message contains the exact command, with the Python of the environment where upb-moodle runs. Run that command, not some python from PATH.
The manual method cannot find the token. On Moodle 5.3, the Security keys page shows only the RSS key, not the mobile token. The manual method is useful only if you have the token from elsewhere, for example from the platform administrator. On Linux it needs xclip, xsel or wl-paste.
auth-status says the token does not work. The token was reset or expired. Get a new one with upb-moodle login.
Install and clients
upb-moodle-mcp is not in PATH. The package is not installed, or the pipx executables folder is not in PATH. Run pipx install --force git+https://github.com/FiredMosquito831/upb-moodle-mcp.git, then pipx ensurepath, and open a new terminal.
pipx install fails on Windows with “Access denied” on the executable. An MCP client is running and holds the file. Close Claude Code, Codex, opencode or Antigravity, then run it again. doctor counts the processes.
Claude Code does not see the update or the project server. Restart Claude Code from the project folder and run /mcp. Then check from a terminal: upb-moodle claude doctor --project-dir <folder>. .claude/settings.json must contain upb-moodle@upb-moodle-marketplace in enabledPlugins.
Codex does not load the project server. Codex asks you to mark the folder as a trusted project. Without that, .codex/config.toml is not loaded. Also check that the file contains [mcp_servers.upb-moodle].
opencode.json is not valid JSON. The installer stops and does not modify it. Fix the file and run again; the .bak copy from the previous run is still there. --mode mcp does not bring the skills: the mcp mode adds only the server.
Writes and confirmations
needs_confirmation (code 2). The write has no confirmation. If you run the command yourself, add --yes after checking what you send. If an agent runs it, the agent must show you the content and ask for approval.
“Assignment N has no drafts.” Saving would send the file immediately. Choose a final submission (--submit), or --allow-direct only if you really want a direct save.
Quiz: “Unknown fields.” The field names in quiz-answer do not match the ones from quiz-questions. Copy the names exactly. “The attempt could not be started” means the quiz is closed or you hit the attempt limit.
Download
Missing materials. Run it again: files of the same size are skipped, the missing ones are downloaded. Check _rezumat.json in the download folder for errors and warnings. A course with no files is normal if it only has forums or links.
FAILED on a file. The link expired or you do not have access. The exact message is in _rezumat.json.
VPL activities appear in index.md but are not downloaded. Normal: mod_vpl has no Web Service functions. The package lists them in the course structure, but cannot open, read or submit them.
npm and Linux
After npm install, upb-moodle login says the Python package is missing. The install script did not succeed (pipx, git or network). Run npm install -g --foreground-scripts upb-moodle-mcp to see the message, fix the cause, then retry with npm rebuild -g upb-moodle-mcp.
upb-moodle-mcp login prints nothing. The Python package is older than 0.2.1 and ignores the arguments, starting the MCP server. Press Ctrl+C and update the Python package.
xclip, xsel or wl-paste is missing. Install it from the package manager: sudo apt install xclip for X11 or sudo apt install wl-clipboard for Wayland.