Search docs...⌘/
Search docs...⌘/
DocsDiagnosticsTroubleshooting
Troubleshooting
Resolving SQLite DLL mismatch errors, database locks, and stalled crawler processes.
This guide covers common errors, recovery actions, and diagnostic steps for resolving issues in LeadForge OS.
Application Launch Failures
SQLite Binary DLL Mismatch
- Symptom: Startup crashes with the error:
text
better_sqlite3.node was compiled against a different Node.js version - Cause: The native SQLite binary was compiled for the global Node version instead of Electron's internal Node ABI.
- Solution: Force rebuild native modules for Electron:
bash
pnpm -F @leadforge/desktop exec electron-builder install-app-deps
Database & Migration Failures
Stuck or Corrupt Migrations
- Symptom: Application displays database connection errors on startup, or loops during migrations.
- Self-Healing Mechanism:
- The migration runner (
runner.ts) copies the SQLite database file toleadforge_${workspaceId}.db.migration.bakbefore applying migrations. - If a migration statement fails, the transaction is rolled back, the connection is closed, and the database is restored from the backup file.
- The migration runner (
- Manual Restoration:
- Open the Operations Center diagnostics tab and select the Restore Backup recovery action.
- Alternatively, in your workspaces directory, copy the
.migration.bakfile over your main.dbfile manually.
Scheduler & Worker Crashes
Worker Heartbeat Timeout
- Symptom: Long-running scraper jobs change status from
runningtofailedwith the errorWorker process lost heartbeat. - Cause: The child worker process failed to respond to the scheduler's ping within 30 seconds (due to out-of-memory or system sleep).
- Solution:
- Check the Error Console in the Operations Center.
- If the worker crashed due to memory bounds (e.g. Playwright scrolling infinite listings), split your scrape query into smaller geographical locations.
- Click the Retry Job action in the Cockpit to requeue.
Sync Engine Failures
Queue Stalling
- Symptom: Locally modified companies or contacts do not appear on your Hono server dashboard, and the sync queue grows.
- Diagnosis:
- Review the
lastErrorcolumn in thesync_queuetable or check the Sync Engine Status in the Operations Center. - Ensure that the Hono API server (
apps/api/) is running and accessible:bashcurl http://localhost:3000/health - Verify network proxy configurations if offline. The sync queue will resume automatically once connection is restored.
- Review the
AI Provider Issues
OpenRouter Authorization Failures
- Symptom: Lead scoring returns mock template fallbacks, and logs display authorization errors.
- Solution:
- Check your OpenRouter API key under Settings.
- Verify that the key is valid and has sufficient credits.
- Run
pnpm test:aiin the monorepo root to verify connection health.
Ollama Model Unavailable
- Symptom: Offline qualification runs fail with model not found.
- Solution:
- Verify Ollama is running:
bash
curl http://localhost:11434/api/tags - Pull the required model locally:
bash
ollama pull llama3.1
- Verify Ollama is running: