Troubleshooting
Troubleshooting
Section titled “Troubleshooting”This guide covers common issues you might encounter when using Arxo.
Installation Issues
Section titled “Installation Issues”Installing the Arxo CLI
Section titled “Installing the Arxo CLI”Arxo is distributed as a closed-source pre-built binary. You do not need Rust to run it. Download the latest release for your platform from GitHub Releases and add the arxo binary to your PATH. See Installation for details.
Analysis Issues
Section titled “Analysis Issues”No Files Found / Empty Graph
Section titled “No Files Found / Empty Graph”Symptoms:
- “0 files analyzed”
- Empty import graph
- No metrics computed
Causes & Solutions:
-
Wrong directory:
Terminal window # Check current directorypwd# Specify correct patharxo analyze --path /path/to/project -
Excluded by patterns:
# Check .arxo.yaml exclude patternsimport_graph:exclude:- "**/*" # ❌ Excludes everything!Remove or fix overly broad exclusions.
-
Unsupported file types: Arxo only parses:
.ts,.tsx,.js,.jsx,.mjs.py.rs.java.kt,.kts.go
Check you have source files in these languages.
-
Files in node_modules:
# Ensure node_modules is excludedimport_graph:exclude:- "**/node_modules/**"
Analysis Too Slow
Section titled “Analysis Too Slow”Symptoms: Analysis takes >5 minutes on small projects
Solutions:
-
Use quick mode:
Terminal window arxo analyze --quick -
Exclude test/build directories:
import_graph:exclude:- "**/test/**"- "**/tests/**"- "**/dist/**"- "**/build/**"- "**/*.test.ts"- "**/*.spec.ts" -
Limit languages:
import_graph:languages:- typescript # Only analyze TypeScript -
Use caching:
Terminal window # Ensure caching is enabled (default)arxo analyze # First run: slowarxo analyze # Subsequent: fast -
Clear corrupted cache:
Terminal window arxo cache clear
High Memory Usage
Section titled “High Memory Usage”Symptoms: Process killed, OOM errors
Solutions:
-
Limit graph size:
import_graph:max_nodes: 5000max_edges: 20000 -
Exclude large dependencies:
import_graph:exclude:- "**/node_modules/**"- "**/vendor/**" -
Use file-level grouping (less memory than folder grouping):
import_graph:group_by: file -
Analyze in parts:
Terminal window # Analyze frontend separatelyarxo analyze --path ./frontend# Analyze backend separatelyarxo analyze --path ./backend
Parsing Errors
Section titled “Parsing Errors”Error: “Failed to parse file: src/example.ts”
Causes & Solutions:
-
Invalid syntax: Fix syntax errors in your source files:
Terminal window # Check with native toolstsc --noEmit # TypeScriptpython -m py_compile file.py # Pythoncargo check # Rust -
Unsupported syntax: Some bleeding-edge language features might not be supported yet.
Workaround: Exclude problematic files:
import_graph:exclude:- "**/problematic-file.ts" -
Encoding issues: Ensure files are UTF-8 encoded:
Terminal window file -I src/example.ts# Should show: charset=utf-8
Policy Violations
Section titled “Policy Violations”False Positives
Section titled “False Positives”Symptoms: Policy violations that seem incorrect
Solutions:
-
Check grouping: File-level grouping might show false cycles. Try folder grouping:
import_graph:group_by: foldergroup_depth: 2 -
Inspect actual violations:
Terminal window # Get detailed JSON reportarxo analyze --format json --output report.json# Extract violationsjq '.violations' report.json -
Adjust thresholds:
policy:invariants:- metric: propagation_cost.system.ratioop: "<="value: 0.20 # Was 0.15, too strict -
Exclude specific patterns:
import_graph:exclude:- "**/legacy/**" # Exclude legacy code temporarily
Cannot Reproduce Locally
Section titled “Cannot Reproduce Locally”Symptoms: CI fails, but local run passes
Solutions:
-
Cache differences:
Terminal window # Clear cachearxo cache clear# Run analysisarxo analyze -
Git history depth: CI might have shallow clone:
# GitHub Actions- uses: actions/checkout@v4with:fetch-depth: 0 # Full history for git-based metrics -
Config file location:
Terminal window # Explicitly specify config in CIarxo analyze --config .arxo.yaml -
Environment differences:
Terminal window # Check arxo versionarxo --version# Ensure same version in CI and locally
Configuration Issues
Section titled “Configuration Issues”Invalid Configuration
Section titled “Invalid Configuration”Error: “Invalid config: unknown field ‘foo’”
Solution: Validate config:
arxo config validate --config .arxo.yamlCommon mistakes:
-
Typos:
# ❌ Wrongmetriks: # Typo- id: scc# ✅ Correctmetrics:- id: scc -
Indentation:
# ❌ Wrong (2 spaces required)policy:invariants: # 4 spaces# ✅ Correctpolicy:invariants: # 2 spaces -
Invalid operators:
# ❌ Wrongpolicy:invariants:- metric: scc.max_cycle_sizeop: "less_than" # Invalid# ✅ Correctpolicy:invariants:- metric: scc.max_cycle_sizeop: "<=" # Use: ==, !=, <, <=, >, >=
Config Not Found
Section titled “Config Not Found”Error: “Config file not found: .arxo.yaml”
Solutions:
-
Create config:
Terminal window arxo init # Creates .arxo.yaml -
Specify path:
Terminal window arxo analyze --config path/to/config.yaml -
Check working directory:
Terminal window pwd # Should be project rootls -la # Should show .arxo.yaml
Metric Issues
Section titled “Metric Issues”Metric Not Found
Section titled “Metric Not Found”Error: “Unknown metric: foo”
Solution: List available metrics:
arxo metrics listCheck metric ID spelling:
# ❌ Wrongmetrics: - id: strong_connected_components
# ✅ Correctmetrics: - id: sccMetric Returns Zero
Section titled “Metric Returns Zero”Symptoms: Metric always returns 0 or empty
Causes:
-
Missing required data: Some metrics need specific graphs:
sccneeds import_graph- Call graph metrics need call_graph
Enable required data:
data:import_graph:enabled: truecall_graph:enabled: true -
No violations found: Zero might be correct! Check if your code is actually healthy:
Terminal window # Get full reportarxo analyze --format json | jq '.results[] | select(.id=="scc")'
Output Issues
Section titled “Output Issues”Cannot Parse JSON Output
Section titled “Cannot Parse JSON Output”Error: “Unexpected token in JSON”
Solution: Ensure quiet mode:
# ❌ Wrong (includes progress output)arxo analyze --format json
# ✅ Correct (JSON only)arxo analyze --format json --quietOr redirect to file:
arxo analyze --format json --output report.jsonHTML Report Not Opening
Section titled “HTML Report Not Opening”Issue: HTML report is empty or doesn’t render
Solutions:
-
Open in browser:
Terminal window arxo analyze --format html --output report.htmlopen report.html # macOSxdg-open report.html # Linuxstart report.html # Windows -
Check file size:
Terminal window ls -lh report.html# Should be > 1KB -
Validate HTML:
Terminal window head -n 20 report.html# Should start with <!DOCTYPE html>
Caching Issues
Section titled “Caching Issues”Stale Cache Results
Section titled “Stale Cache Results”Symptoms: Changes not reflected in analysis
Solution: Clear cache:
# Clear all cachearxo cache clear
# Or disable cachearxo analyze --no-analysis-cacheCache Too Large
Section titled “Cache Too Large”Issue: ~/.cache/arxo using too much disk space
Solutions:
-
Clear old entries:
Terminal window arxo cache clear -
Set custom cache location:
run_options:cache_path: /tmp/arxo-cache -
Disable cache:
run_options:disable_cache: true
Language-Specific Issues
Section titled “Language-Specific Issues”TypeScript: Cannot Resolve Paths
Section titled “TypeScript: Cannot Resolve Paths”Issue: Path mappings not recognized
Solution: Ensure tsconfig.json is present:
{ "compilerOptions": { "baseUrl": ".", "paths": { "@/*": ["src/*"] } }}Arxo reads tsconfig.json for path resolution.
Python: Imports Not Resolved
Section titled “Python: Imports Not Resolved”Issue: Python imports not found
Solutions:
-
Add
__init__.pyto packages:Terminal window touch src/__init__.pytouch src/utils/__init__.py -
Check PYTHONPATH:
.arxo.yaml languages:python:paths:- src- lib
Rust: Workspace Not Detected
Section titled “Rust: Workspace Not Detected”Issue: Rust workspace members not analyzed
Solution: Ensure Cargo.toml has workspace config:
[workspace]members = [ "crates/*",]Performance Debugging
Section titled “Performance Debugging”Enable timing reports:
arxo analyze --report-timingsOutput shows time spent on each stage:
Parsing: 2.3sImport graph: 1.1sCall graph: 0.8sSCC: 0.2sPropagation cost: 1.5s...Getting Help
Section titled “Getting Help”Generate Debug Report
Section titled “Generate Debug Report”# Environment infoarxo doctor
# Full analysis with JSON output (use RUST_LOG=debug for verbose logs)arxo analyze --format json --output debug-report.jsonCheck Logs
Section titled “Check Logs”CLI Logs:
# Enable verbose loggingRUST_LOG=debug arxo analyzeMCP Server Logs:
If using the MCP server in Cursor or another IDE:
- Open the MCP server logs panel in your IDE
- Select “Arxo” server
- Set log level to debug:
--log-level debugin MCP config - Review tool execution, cache hits, and errors
See MCP Configuration for log settings.
Report Issues
Section titled “Report Issues”When reporting issues, include:
- Arxo version:
arxo --version - OS and Rust version:
rustc --version - Project type (TypeScript/Python/etc.)
- Error message or unexpected behavior
- Config file (if applicable)
- Debug report:
arxo doctor
Common Error Messages
Section titled “Common Error Messages”| Error | Meaning | Solution |
|---|---|---|
Failed to parse | Syntax error | Fix source file syntax |
Config validation failed | Invalid YAML | Run arxo config validate |
Metric not found | Wrong metric ID | Run arxo metrics list |
No files analyzed | Wrong path/excludes | Check path and exclusions |
Policy violation | Threshold exceeded | Adjust policy or fix code |
Out of memory | Graph too large | Limit nodes or exclude files |
Next Steps
Section titled “Next Steps”- Configuration Guide - Full config reference
- CLI Reference - Command options
- MCP Workflows - AI-assisted debugging
- Policy Examples - Real-world policies
- CI Integration - Set up CI