Troubleshooting
About 535 wordsAbout 2 min
Log Files
| File | Description |
|---|---|
debug/agent-bootstrap.log | Agent startup log |
maafw.log | MaaFramework runtime log (project root) |
debug/ | Debug screenshots |
Log Analysis Tools
Use MaaLogAnalyzer to visually analyze maafw.log:
- Download and launch MaaLogAnalyzer
- Open
maafw.log(project root) or thedebug/directory - Filter by task/node and inspect each recognition record's
reco_id, algorithm,box, and details; compare with thedebug/screenshots to see the actual screen state
In addition, MaaEvidenceKit is a deterministic evidence extraction and diagnostic toolkit for MaaFramework (CLI/SDK): it extracts locatable runtime and static evidence from logs and the project via MaaLogAnalyzer, outputting JSON/text for on-demand diagnosis by AI assistants such as Codex or Claude Code.
During development you can also use Maa Pipeline Support (VSCode extension) to watch recognition in real time (see Environment Setup).
Categories
Startup Issues
Agent fails to start
Error: Python >=3.13,<3.14 is required
Cause: Wrong Python version. Project requires Python 3.13.x.
Fix: Use uv for Python management, run uv sync.
Custom module not registered
Error: Custom action/recognition returns success: false
Cause: Module not added to RECOGNITION_MODULES in agent/custom/recognition/__init__.py.
Fix: Add module name, e.g. RECOGNITION_MODULES = ("farm_resources", "pvp", "stamina", "event_stage") (check agent/custom/recognition/__init__.py for the actual list).
Runtime Issues
Pipeline node stuck
Symptoms: Task hangs on a node until timeout.
Common causes:
- Stale screenshot — screen hadn't settled when captured. Use
post_wait_freezesto wait for the screen to settle, or add an intermediate recognition node to confirm the target screen appeared before continuing - ROI mismatch — Game UI changed, update ROI
- Outdated template — UI changed, re-screenshot
- Missing fallback — Critical nodes lack
on_error
JumpBack node misbehavior
Cause: JumpBack node has next field. JumpBack nodes must NOT have next.
Stamina drain mode loops
Cause: ExitStage and ExitStageConfirm override points to BattleStage instead of exit path.
Fix: Check the clear stamina mode override in tasks/farm_resources.json.
Recognition Issues
Stage not found
Symptoms: CheckResourceStage keeps failing
Common causes:
- Stage locked — update
lock_icon.pngtemplate - Stage list offset — confirm
SwipeToBeginexecuted - Wrong
stage_indexorresource_typein params
Stamina popup not recognized
Cause: no_stamina.png template missing or wrong ROI.
Schema validation fails
Error: must NOT have unevaluated properties
Cause: Using unsupported field in the current schema.
Fix: Remove unsupported fields or update tools/schema/ definitions.
Log Analysis
Runtime logs (maafw.log) contain detailed recognition results:
{
"reco_id": 400000431,
"algorithm": "Custom",
"box": null,
"detail": {"all": [], "best": null},
"name": "PVP.ReadResult"
}box: null— no matchbox: [x, y, w, h]— match founddebug/screenshots show actual screen state
Verifying a Fix
Verify your fix before committing:
- Local checks:
pnpm check(also runpnpm check:pyif Python code changed) - Re-run in the GUI: enable the affected task and run it 2–3 times to confirm the issue is gone
- Regression check: inspect
debug/screenshots andmaafw.logto confirm recognition results match expectations and no error paths (on_error) fired unexpectedly - Edge cases: if the change touches flow branches, also verify adjacent states (startup/home/popups) are unaffected
If the fix changes behavior, update the corresponding Protocol docs and their acceptance checklists (e.g. Event Stages).
