Common Issues
FromENGINEERING.md:
Database connection: CheckDATABASE_URL, Neon dashboard status, connection pool limits inserver/db.tsMigrations: Runnpm run migratemanually to debug. Checkdrizzle/migrations/exists. Failures are logged but don’t block startup. Quiz errors: Ensurequiz_answerstable exists (migrations). Verify learner has active lesson. Check browser console. Build errors:npx tsc --noEmitto check types.rm -rf client/dist server/distto clear cache.TS_NODE_TRANSPILE_ONLY=truefor deployment. Auth issues: VerifyJWT_SECRETis set. Check token expiration. Parent users scoped to own learners only.
Database Connection Problems
ECONNREFUSED
Symptom:- PostgreSQL not running
- Wrong host/port in
DATABASE_URL - Firewall blocking connection
- Local PostgreSQL
- Neon
- Railway
Authentication Failed
Symptom:SSL Required
Symptom:Connection Pool Exhausted
Symptom:server/db.ts:
AI Provider Failures
OpenRouter 401 Unauthorized
Symptom:OpenRouter 402 Insufficient Credits
Symptom:- Add credits at openrouter.ai/credits
- Fallback model will be tried automatically:
server/config/env.ts:
OpenRouter 404 Model Not Found
Symptom:Bittensor Connection Timeout
Symptom:server/config/flags.ts:
Authentication Issues
Invalid or Expired Token
Symptom:- Token expired (default 7 days)
- JWT_SECRET changed after token issued
- Malformed token
Forbidden (403)
Symptom:server/routes.ts:
Parent Can’t Access Learner Data
Symptom:Migration Problems
Migration Already Applied
Symptom:drizzle_migrations.
Solution:
Constraint Violation During Migration
Symptom:Build Errors
TypeScript Compilation Errors
Symptom:Vite Build Fails
Symptom:Deploy Build Timeout
Symptom:ENGINEERING.md:
TS_NODE_TRANSPILE_ONLY=true for deployment.
package.json:
Lesson Generation Issues
Lesson Generation Fails with 503
Symptom:- AI provider API down
- Rate limit exceeded
- Invalid API key
- Network timeout
Lesson Contains Placeholder Content
FromENGINEERING.md:
validateLessonSpec() rejects placeholder/stub content — generation failures return 503 (never save stubs)
Symptom: Lesson generation succeeds but contains “Lorem ipsum” or “[Placeholder]”.
Cause: Validation not working properly.
Solution:
Check server/services/lesson-validator.ts:
Images Not Generating
Symptom: Lessons created without images. Cause: Background image generation failing silently. Debugging:Quiz Errors
FromENGINEERING.md:
Quiz errors: Ensure quiz_answers table exists (migrations). Verify learner has active lesson. Check browser console.
Quiz Submission Fails
Symptom:Points Not Awarded
Symptom: Quiz submitted successfully but no points added. Debugging:Performance Issues
Slow Response Times
Symptom: API requests taking > 5 seconds. Debugging:- Add missing indexes:
- Optimize queries:
High Memory Usage
Symptom:Debugging Workflow
Getting Help
GitHub Issues
Report bugs or ask questions
Discussions
Community support and feature requests
Documentation
Full documentation and guides
All One Thing Labs
Contact the development team