Troubleshooting¶
Common issues and solutions when using TofuSoup.
Installation Issues¶
Command not found: soup¶
Symptom: soup: command not found after installation
Solutions: 1. Verify installation:
-
Check Python bin is in PATH:
-
Try running via Python module:
-
Add Python bin to PATH (macOS/Linux):
Module import errors¶
Symptom: ModuleNotFoundError when running soup
Solution:
# For development installations
cd /path/to/tofusoup
uv sync
# For pip installations
pip install --upgrade tofusoup[all]
Harness Issues¶
Go harness build failures¶
Symptom: soup harness build fails
Solutions: 1. Check Go installation:
-
Check GOPATH:
-
Try building manually:
-
Check for Go module issues:
Harness binary not found¶
Symptom: No such file or directory: 'harnesses/bin/soup-go'
Cause: The harnesses/bin/ directory is a build artifact and not included in version control.
Solution:
# Build harnesses (this creates the directory)
soup harness build --all
# Verify
ls harnesses/bin/
./harnesses/bin/soup-go --version
Note: You must build harnesses after cloning the repository or when switching branches that update harness code.
Harness CLI verification fails¶
Symptom: soup harness verify-cli fails
Solution:
# Rebuild the harness
soup harness build soup-go
# Verify it runs
./harnesses/bin/soup-go --version
# Check logs
soup harness verify-cli soup-go --verbose
Test Failures¶
RPC connection timeouts¶
Symptom: Tests fail with "Connection timeout after 30s"
Causes & Solutions:
-
Go server not starting:
-
Firewall blocking:
- Check firewall settings
- Allow Python and Go executables
-
Test on localhost without firewall
-
Port already in use:
Wire protocol binary mismatches¶
Symptom: "Binary mismatch for test 'X'"
This is a real compatibility issue! It means Python and Go are producing different binary output.
Debug steps: 1. View the specific test:
-
Compare binary outputs:
-
Report the issue on GitHub with test details
CTY type errors¶
Symptom: 'UnrefinedUnknownValue' object is not subscriptable
Solution:
This is a known issue with unknown values. Update pyvider-cty:
Performance Issues¶
Tests running slowly¶
Solutions: 1. Run tests in parallel:
-
Run specific test suites:
-
Skip slow tests:
Harness build taking too long¶
Solution:
# Use cached builds
soup harness build --cache
# Build only what's needed
soup harness build soup-go # Instead of --all
Configuration Issues¶
soup.toml not found¶
Symptom: "Configuration not loaded" warnings
Solution:
TofuSoup searches for soup.toml in:
1. Path specified by --config-file
2. Current directory (./soup.toml)
Create one if needed:
Invalid configuration¶
Symptom: TofuSoupConfigError
Solution:
# Validate syntax
python -c "import tomllib; tomllib.load(open('soup.toml', 'rb'))"
# Check configuration
soup config show
Matrix Testing Issues¶
Matrix testing not available¶
Symptom: Error: Matrix testing requires the 'wrknv' package
Cause: Matrix testing is an optional feature that requires wrknv.
Solution:
# Install wrknv from local source (not yet on PyPI)
pip install -e /path/to/wrknv
# Or if published to PyPI
pip install wrknv
Note: Regular soup stir (without --matrix) works without this dependency.
stir command not finding tests¶
Symptom: "No tests found"
Solutions: 1. Check directory structure:
-
Verify test files have
main.tf: -
Use correct path:
Matrix versions not working¶
Symptom: Tests only run against one version
Solution:
Configure matrix in soup.toml:
Then use --matrix flag:
Getting More Help¶
Enable debug logging¶
# CLI debug mode
soup --log-level DEBUG command
# Python logging
export TOFUSOUP_LOG_LEVEL=DEBUG
soup command
Check logs¶
Report Issues¶
If you can't resolve the issue:
- Check FAQ
- Search GitHub Issues
- Create a new issue with:
- TofuSoup version (
soup --version) - Python version (
python --version) - Go version (
go version) - Full error message
- Steps to reproduce