-
Notifications
You must be signed in to change notification settings - Fork 2
Troubleshooting
This page covers all known issues with Total Recall and their solutions. For quick diagnostics, run totalrecall doctor or totalrecall doctor --fix.
Error: .../better_sqlite3.node: invalid ELF header
Cause: The better-sqlite3 native module was compiled for Windows but you're running inside WSL (Linux). This happens when npm is installed on the Windows filesystem (/mnt/c/...).
Fix: Install Node.js natively inside WSL:
# Check which node you're using
which node
# If it shows /mnt/c/... you're using Windows Node inside WSL
# Install Node.js natively in WSL using nvm (recommended)
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
nvm install 22
# Or use NodeSource
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
sudo apt-get install -y nodejs
# Verify — should show /home/... or /root/.nvm/...
which node
# Reinstall Total Recall
npm install -g totalrecallaiCause: If npm prefix -g returns a /mnt/c/... path, npm installs global packages on the Windows filesystem, which causes binary incompatibility in WSL.
Fix:
mkdir -p ~/.npm-global
npm config set prefix ~/.npm-global
echo 'export PATH="$HOME/.npm-global/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
npm install -g totalrecallaigyp ERR! find Python
gyp ERR! stack Error: Could not find any Python installation to use
Cause: Native modules like better-sqlite3 require C++ compilation tools.
Fix:
sudo apt-get update && sudo apt-get install -y build-essential python3
npm install -g totalrecallai --build-from-sourceIf you see compilation errors on macOS:
xcode-select --install
npm install -g totalrecallaiCause: The editor integration was not installed.
Fix:
totalrecall installCause: Another process (or a previous worker instance) is using port 3001.
Fix:
# Find what's using the port
lsof -i :3001
# Kill the process
kill -9 <PID>
# Or use a different port
export TOTALRECALL_WORKER_PORT=3002Diagnosis:
# Check if the worker is running
npm run worker:status
# Check logs for errors
npm run worker:logs
# Try restarting
npm run worker:restartIf the worker still won't start, check that the data directory exists and is writable:
ls -la ~/.totalrecall/Cause: Usually a corrupted database or incompatible native module.
Fix:
# Run diagnostics
totalrecall doctor
# Auto-fix (rebuilds FTS5 index, removes orphaned embeddings, runs VACUUM)
totalrecall doctor --fixIf the database is severely corrupted, restore from backup:
totalrecall backup list
totalrecall backup restore <backup-file>Cause: The ONNX Runtime or fastembed module may not be available on your platform.
Diagnosis:
totalrecall doctor
totalrecall embeddings statsFix:
# Auto-fix corrupted embeddings
totalrecall doctor --fix
# Regenerate all embeddings
totalrecall embeddings backfill --allCause: Embeddings are generated asynchronously. If the worker was restarted or crashed, some observations may not have embeddings.
Fix:
# Generate embeddings for unprocessed observations
totalrecall embeddings backfill 100
# Or regenerate all
totalrecall embeddings backfill --allCause: Interrupted embedding generation can leave corrupted entries (zero-length blobs or wrong types).
Fix:
totalrecall doctor --fixThe doctor --fix command specifically removes orphaned embeddings, rebuilds the FTS5 index, and runs VACUUM.
Cause: Multiple worker instances are running simultaneously.
Fix:
# Kill all worker instances
pkill -f "worker-service"
# Start a single instance
npm run worker:startCause: Accumulated observations over time.
Fix:
# Check database size
totalrecall stats
# Run decay to mark stale observations
totalrecall decay detect-stale
# Consolidate duplicates
totalrecall decay consolidate
# Or use retention policy for automatic cleanup
totalrecall decay consolidate --dry-run # Preview firstCause: The data directory or database file is not writable by the current user.
Fix:
ls -la ~/.totalrecall/
chmod -R u+rw ~/.totalrecall/Fix: Use a user-local npm prefix:
mkdir -p ~/.npm-global
npm config set prefix ~/.npm-global
echo 'export PATH="$HOME/.npm-global/bin:$PATH"' >> ~/.bashrc
source ~/.bashrcCause: Hooks may not be registered correctly.
Fix:
# Reinstall hooks
totalrecall install --claude-code
# Verify hook files exist
ls -la .claude/hooks/Cause: MCP configuration may be incorrect.
Fix:
# Reinstall
totalrecall install --cursor
# Verify config files
cat .cursor/mcp.json
cat .cursor/rules/totalrecall.mdcFix:
totalrecall install --windsurf
# Verify files
cat .windsurfrules
cat ~/.codeium/windsurf/mcp_config.jsonThe doctor command is the fastest way to diagnose issues:
# Run full diagnostics
totalrecall doctor
# Auto-fix detected issues
totalrecall doctor --fixThe doctor checks:
- Node.js version (>= 18 required)
- Build tools availability (build-essential, python3)
- WSL detection and path configuration
- Database access and integrity
- Worker status and health
- Embedding service availability
- Editor configuration
Total Recall Wiki
- Home
- Installation
- Configuration
- CLI Reference
- SDK Reference
- MCP Tools
- Architecture
- Troubleshooting
- FAQ