Troubleshooting Guide

This guide helps you diagnose and resolve common issues with BoxMux.

Common Issues

Installation Problems

Rust Not Found

Problem: cargo: command not found Solution:

1
2
3
# Install Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source ~/.cargo/env

Build Failures

Problem: Compilation errors during cargo build Solution:

1
2
3
4
5
6
# Update Rust
rustup update

# Clean and rebuild
cargo clean
cargo build

Runtime Issues

Configuration File Not Found

Problem: Error: Configuration file not found Solution:

YAML Syntax Errors

Problem: Error parsing YAML Solution:

1
2
3
4
5
6
7
# Validate YAML syntax
yamllint layouts/dashboard.yaml

# Common fixes:
# - Check indentation (use spaces, not tabs)
# - Ensure proper quoting of strings
# - Verify array and object syntax

Script Execution Fails

Problem: Box scripts don’t execute Solution:

Performance Issues

High CPU Usage

Problem: BoxMux uses too much CPU Solution:

Display Issues

Corrupted Display

Problem: Interface appears broken or corrupted Solution:

Colors Not Working

Problem: Colors appear incorrect or missing Solution:

Debugging

Enable Debug Logging

1
2
3
4
5
# Run with debug output
RUST_LOG=debug ./run_boxmux.sh layouts/dashboard.yaml

# Filter specific modules
RUST_LOG=boxmux::draw_utils=debug ./run_boxmux.sh layouts/dashboard.yaml

Check Application Logs

1
2
3
4
5
# View application logs
tail -f app.log

# Search for errors
grep -i error app.log

Validate Configuration

1
2
3
4
5
# Check YAML syntax
python -c "import yaml; yaml.safe_load(open('layouts/dashboard.yaml'))"

# Or use online validator
cat layouts/dashboard.yaml | curl -X POST -H "Content-Type: application/yaml" -d @- https://yaml-validator.com/

Test Individual Components

1
2
3
4
5
# Test script execution
bash -c "your_script_command_here"

# Test socket connection
echo '{"GetStatus": {}}' | nc -U /tmp/boxmux.sock

Getting Help

Before Asking for Help

  1. Check this troubleshooting guide
  2. Search existing GitHub issues
  3. Try the solution with minimal configuration
  4. Gather relevant information

Information to Include

When reporting issues, include:

Where to Get Help

Creating a Minimal Example

When reporting issues, create a minimal configuration that reproduces the problem:

1
2
3
4
5
6
7
8
9
10
11
12
13
app:
  layouts:
    - id: 'test'
      root: true
      children:
        - id: 'problem_box'
          title: 'Problem Box'
          position:
            x1: 10%
            y1: 10%
            x2: 90%
            y2: 90%
          content: 'This demonstrates the issue'

Recovery Procedures

Reset Configuration

1
2
3
4
5
# Backup current configuration
cp layouts/dashboard.yaml layouts/dashboard.yaml.backup

# Use example configuration
cp layouts/dashboard.yaml.example layouts/dashboard.yaml

Clear Application State

1
2
3
4
5
6
# Remove temporary files
rm -f /tmp/boxmux.sock
rm -f app.log

# Clear terminal
clear

Emergency Stop

1
2
3
4
5
# Force quit BoxMux
pkill -f boxmux

# Or use Ctrl+C in terminal
# Or close terminal window