This guide covers common issues and solutions when developing or deploying the AI Real Estate Assistant.
- Development Issues
- Docker Issues
- Backend Issues
- Frontend Issues
- Database Issues
- CI/CD Issues
- Deployment Issues
- Performance Issues
Symptom: Error: listen EADDRINUSE: address already in use :::8000
Solution:
# Windows: Find process on port 8000
netstat -ano | findstr :8000
taskkill /PID <PID> /F
# Windows: Find process on port 3000
netstat -ano | findstr :3000
taskkill /PID <PID> /F
# macOS/Linux
lsof -ti:8000 | xargs kill -9
lsof -ti:3000 | xargs kill -9Symptom:
ImportError: Unable to import required dependencies:
numpy: Error importing numpy from its source directory
Solution:
deactivate
Remove-Item -Recurse -Force .\.venv
py -3.12 -m venv .venv
.\.venv\Scripts\Activate.ps1
python -m pip install --upgrade pip setuptools wheel
python -m pip install -e .[dev]
python -c "import numpy; print('NumPy OK')"Symptom:
ModuleNotFoundError: No module named 'pandas._libs.pandas_parser'
Solution:
python -m pip install --upgrade pip setuptools wheel
python -m pip install --no-cache-dir --force-reinstall "pandas>=2.2.0,<2.3.0"Symptom:
ModuleNotFoundError: No module named 'pydantic_core._pydantic_core'
Solution:
python -m pip install "numpy>=1.24.0,<2.0.0"
python -m pip install --no-cache-dir "pydantic-core>=2.14.0,<3.0.0"
python -m pip install --no-cache-dir "pandas>=2.2.0,<2.3.0"
python -m pip install -r requirements.txtSymptom: Docker container starts and exits immediately.
Solution:
# Check logs
docker compose logs backend
# Common issue: Missing API keys
# Edit .env and add required keys
# Verify .env is loaded correctly
docker compose configSymptom: Ollama GPU container doesn't use GPU.
Solution:
# Verify NVIDIA Docker runtime
docker run --rm --gpus all nvidia/cuda:11.0-base nvidia-smi
# Install NVIDIA Container Toolkit
# See: https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html
# Check GPU is available
docker compose psSymptom: Permission denied when writing to mounted volumes.
Solution:
# Fix volume permissions
sudo chown -R $USER:$USER ./chroma_db ./data
# Or run with user flag
docker compose -f deploy/compose/docker-compose.yml --user $(id -u):$(id -g) upSymptom: Docker build fails with "no space left on device".
Solution:
# Clean unused images
docker image prune -a
# Clean unused volumes
docker volume prune
# Clean everything
docker system prune -a --volumesSymptom: 401 Unauthorized responses.
Solution:
- Ensure
.envexists in project root - Check variable name:
API_ACCESS_KEY - Restart services after editing
.env - Verify no extra spaces in
.env
Symptom: Browser console shows CORS policy errors.
Solution:
- Development: Set
ENVIRONMENT=development(allows all origins) - Production: Set
CORS_ALLOW_ORIGINSto your frontend URL
# In .env
ENVIRONMENT=production
CORS_ALLOW_ORIGINS=https://yourdomain.com,https://www.yourdomain.comSymptom: Data not persisting between restarts.
Solution:
# Reset ChromaDB
Remove-Item -Recurse -Force .\chroma_db
# Restart app - database will be recreatedSymptom:
Error adding batch: Expected metadata value of type 'string', 'number', 'boolean' or 'null'
Cause: Non-primitive values in document metadata.
Solution:
- Ensure only primitives (str/int/float/bool/None) in metadata
- Convert datetimes to ISO 8601 strings
- Avoid nesting dicts/lists
Symptom: "runtime_available=false" for LLM provider.
Solution:
- Verify API key is correct
- Check provider service status
- Verify network connectivity
- Check provider billing/quota
Symptom: Vercel or local build fails.
Solution:
# Clear cache and reinstall
cd apps/web
rm -rf node_modules .next
npm install
npm run buildSymptom: Module not found: Can't resolve '@/<module>'
Solution:
- Check
tsconfig.jsonpaths configuration - Verify file exists at expected location
- Restart TypeScript server in IDE
Symptom: "Hydration failed" or "Text content does not match".
Solution:
- Avoid using
Date()orMath.random()directly in components - Use
useEffectfor client-only values - Ensure server and client render same markup
Symptom: Settings reset on page refresh.
Solution:
- Check state is saved to localStorage/sessionStorage
- Verify state restoration logic on mount
- Check for localStorage quota exceeded
Symptom: "Pool exhausted" or "Connection timeout".
Solution:
# In .env
DB_POOL_SIZE=20
DB_MAX_OVERFLOW=40
DB_POOL_TIMEOUT_SECONDS=60Symptom: Migration fails due to conflicts.
Solution:
# Rollback to last working version
alembic downgrade base
# Resolve conflicts
# Then create new migration
alembic revision --autogenerate -m "fix conflict"
alembic upgrade headSymptom: "database is locked" errors.
Solution:
# Ensure only one process is accessing the database
# Use WAL mode for better concurrency
# In code:
# engine = create_engine("sqlite:///file.db?check_same_thread=False", connect_args={"timeout": 30})Symptom: Tests pass locally, fail in CI intermittently.
Cause: Async indexing racing with shared in-memory Chroma state.
Solution:
- CI retries integration tests once automatically
- Add explicit waits in tests
- Consider using file-backed Chroma for tests
Symptom: New code doesn't meet coverage requirements.
Solution:
# Check coverage locally
pytest tests/unit --cov=. --cov-report=html
open htmlcov/index.html
# Find uncovered lines and write testsSymptom: semgrep: command not found.
Solution:
# Install Semgrep
python -m pip install semgrep
# Or use Docker
docker pull returntocorp/semgrepSymptom: npm ci fails with EPERM.
Solution:
# Delete node_modules and reinstall
Remove-Item -Recurse -Force apps/web/node_modules
cd apps/web
npm ciSymptom: Reverse proxy returns 502.
Solution:
# Check backend is running
docker compose ps
# or
sudo systemctl status ai-backend
# Check logs
docker compose logs backend
# or
sudo journalctl -u ai-backend -n 50
# Verify port configuration
# Nginx/Apache proxy_pass should match backend portSymptom: Browser shows certificate warnings.
Solution:
# Renew certificate
sudo certbot renew
# Force renewal
sudo certbot renew --force-renewal
# Check certificate
sudo certbot certificatesSymptom: Server runs out of memory.
Solution:
- Add swap space
- Configure Redis max memory
- Set
DB_POOL_SIZEandDB_MAX_OVERFLOW - Consider adding more RAM
Symptom: API responses take >10 seconds.
Solution:
- Enable Redis caching
- Check LLM provider latency
- Consider using faster model (e.g., gpt-4o-mini)
- Add response caching
- Optimize database queries
Symptom: Memory usage increases over time.
Solution:
# Monitor memory usage
docker stats
# Restart containers periodically
# Or investigate memory leaks in Python codeSymptom: Queries take too long.
Solution:
- Add database indexes
- Use connection pooling
- Enable query logging to identify slow queries
- Consider adding Redis caching for frequent queries
Enable verbose logging:
# In .env
ENVIRONMENT=development
LOG_LEVEL=debug# System info
uname -a
docker --version
docker compose version
# Python info
python --version
pip list
# Node info
node --version
npm --version
# Logs
docker compose logs > deployment-logs.txt- Check existing GitHub Issues
- Create new issue with:
- Error message
- Steps to reproduce
- Environment details
- Logs