Troubleshooting¶
Common issues and solutions when using Fakestack.
Installation Issues¶
Binary Not Found¶
Error:
Cause: The pre-built binary is missing or not in the expected location.
Solutions:
-
Reinstall the package:
-
Check binary location:
-
Verify your platform is supported:
- darwin-amd64 (macOS Intel)
- darwin-arm64 (macOS Apple Silicon)
- linux-amd64 (Linux 64-bit)
- windows-amd64 (Windows 64-bit)
- windows-386 (Windows 32-bit)
Permission Denied¶
Error:
Cause: Binary doesn't have execute permissions.
Solution:
# Python
chmod +x <python-site-packages>/fakestack/bin/fakestack-*
# Node.js
chmod +x node_modules/fakestack/bin/fakestack-*
# Homebrew
brew reinstall 0xdps/fakestack/fakestack
Import Error (Python)¶
Error:
Solution:
# Check Python version (3.8+ required)
python --version
# Reinstall
pip install --force-reinstall fakestack
# Clear cache
pip cache purge
pip install fakestack
Schema Issues¶
Invalid JSON¶
Error:
Cause: Malformed JSON schema.
Solutions:
-
Validate JSON syntax:
-
Common JSON mistakes:
Missing Required Fields¶
Error:
Cause: Schema is missing required sections.
Solution:
{
"database": { // ✅ Required
"dbtype": "sqlite",
"drivername": "sqlite",
"database": "test.db"
},
"tables": [], // ✅ Required (can be empty)
"populate": [] // ✅ Required (can be empty)
}
Invalid Column Type¶
Error:
Cause: Unknown or incorrectly formatted column type.
Solutions:
// ❌ Wrong
{"name": "age", "type": "number"}
// ✅ Correct
{"name": "age", "type": "integer"}
// ❌ String without length
{"name": "username", "type": "string"}
// ✅ String with length
{"name": "username", "type": {"name": "string", "args": {"length": 50}}}
Foreign Key Reference Error¶
Error:
Cause: Referenced table doesn't exist or isn't populated yet.
Solutions:
-
Define tables in correct order:
-
Populate in correct order:
Database Issues¶
SQLite¶
Database Locked¶
Error:
Causes & Solutions:
-
Another process is using the database:
-
Increase busy timeout (schema modification):
-
Delete and recreate:
File Permission Issues¶
Error:
Solution:
MySQL¶
Connection Refused¶
Error:
Causes & Solutions:
-
MySQL not running:
-
Wrong port:
-
Wrong host:
Access Denied¶
Error:
Solutions:
-
Check credentials:
-
Create/grant permissions:
-
Reset root password:
Database Does Not Exist¶
Error:
Solution:
PostgreSQL¶
Connection Refused¶
Error:
Solutions:
-
PostgreSQL not running:
-
Wrong port:
Authentication Failed¶
Error:
Solutions:
-
Check pg_hba.conf:
-
Reset password:
Performance Issues¶
Slow Generation¶
Symptoms: Takes too long to generate data.
Solutions:
-
Reduce record count:
-
Use indexes:
-
Optimize database:
-
Batch processing: Fakestack uses batches of 1000 records automatically.
High Memory Usage¶
Symptoms: Process uses too much memory.
Solutions:
- Reduce batch size (requires modifying Go core)
- Split into multiple schemas:
Platform-Specific Issues¶
macOS¶
"Binary cannot be opened" Security Warning¶
Error:
Solution:
# Remove quarantine attribute
xattr -d com.apple.quarantine /path/to/fakestack/bin/fakestack-*
# Or via System Preferences:
# System Preferences > Security & Privacy > General > "Allow Anyway"
Windows¶
PowerShell Execution Policy¶
Error:
Solution:
# Run PowerShell as Administrator
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
Path Length Limit¶
Error:
Solution:
# Enable long paths in Windows
# Run as Administrator:
reg add HKLM\SYSTEM\CurrentControlSet\Control\FileSystem /v LongPathsEnabled /t REG_DWORD /d 1 /f
Linux¶
CGO / glibc Version¶
Error:
Solution:
# Check glibc version
ldd --version
# If too old, upgrade system or use Docker
docker run -v $(pwd):/app -w /app python:3.11 \
sh -c "pip install fakestack && fakestack schema.json"
Getting Help¶
If you're still experiencing issues:
- Check existing issues: GitHub Issues
- Create a new issue: Include:
- Operating system and version
- Python/Node.js version
- Complete error message
- Minimal schema that reproduces the issue
- Community support: GitHub Discussions
Common Debugging Steps¶
-
Verify installation:
-
Test with minimal schema:
-
Enable verbose output:
-
Check binary directly:
See Also¶
- Getting Started - Basic usage guide
- Schema Reference - Complete schema documentation
- Database Support - Database-specific information
- API Reference - Python and Node.js APIs