API issues
API won't start
API won't start
If the API fails to start or crashes immediately:Check the logs:Look for error messages in the most recent log file.Verify database connection:Watch the console output for connection errors.Common causes:
- Invalid database credentials in
.env - Database server not accessible
- Missing or corrupted
.envfile - Port 5002 already in use
- Verify your
.envfile exists and has correct credentials - Test database connection manually with
psql - Check if another process is using port 5002
- Ensure PostgreSQL is running and accessible
Database connection errors
Database connection errors
If you see connection timeout or authentication errors:Verify connection string:Test connection manually:Common issues:
- Incorrect Supabase host (should include
.supabase.co) - Wrong database port (should be 5432)
- SSL mode not set to
Require - Firewall blocking database connection
- Double-check credentials from Supabase dashboard
- Ensure connection string includes
SSL Mode=Require - Verify your IP is allowed in Supabase settings
- Test connection from same environment as API
Port already in use
Port already in use
If you see Kill the process:Or use a different port:Remember to update
EADDRINUSE or port conflict errors:Find the process using the port:VITE_API_BASE_URL if you change the API port.Swagger UI not accessible
Swagger UI not accessible
If Check Swagger configuration in Solution:
/swagger endpoint doesn’t work:Check environment:
Swagger is only enabled in development mode.Verify API is running:Program.cs:- Ensure
ASPNETCORE_ENVIRONMENT=Development - Access at
http://localhost:5002/swagger - Check browser console for CORS errors
Frontend issues
Frontend can't connect to API
Frontend can't connect to API
If the frontend shows connection errors or “Network Error” messages:Verify API is running:Should return Should be
{"status":"Healthy"}.Check environment variable:http://localhost:5002 for development.Verify in browser console:- Open DevTools (F12)
- Go to Network tab
- Look for failed API requests
- Check if requests are going to correct URL
- API not running
- Wrong
VITE_API_BASE_URLvalue - CORS configuration issue
- Firewall blocking requests
- Start the API with
./dev.shor manually - Verify
.envhas correctVITE_API_BASE_URL - Check API logs for CORS errors
- Restart Vite after changing
.env
Electron window won't open
Electron window won't open
If Electron fails to launch or shows a blank screen:Check Vite dev server:Electron needs Vite to be running first.Check Electron logs:
Look for errors in the terminal where you ran Solution:
npm run dev.Verify window configuration in src/electron/main.js:- Start Vite first:
npm run dev-vite - Wait for Vite to show “ready” message
- Then start Electron:
npm run dev - Or use
./dev.shto start everything in correct order
Hot reload not working
Hot reload not working
If changes to React components don’t update automatically:Check Vite dev server:
Look for errors in the terminal running Vite.Verify HMR is enabled:
Vite should show For other issues:
[vite] connected in browser console.Common causes:- File watchers limit exceeded (Linux)
- Component not exported correctly
- Syntax errors preventing compilation
- Browser cache issues
- Check terminal for Vite errors
- Hard refresh browser (Ctrl+Shift+R)
- Restart Vite dev server
- Clear browser cache
Tailwind styles not applying
Tailwind styles not applying
If Tailwind CSS classes aren’t working:Check class names:
Ensure you’re using valid Tailwind classes.Verify Tailwind config:
Check Check for typos:
Tailwind won’t generate classes with typos.Solution:
tailwind.config.js includes your component paths:- Verify class names in Tailwind documentation
- Restart Vite after changing
tailwind.config.js - Check browser DevTools to see if styles are generated
- Use Tailwind CSS IntelliSense extension in VS Code
Database issues
Migration issues
Migration issues
If migrations fail to apply:List migrations:Try manual migration:Common errors:
- Pending migrations conflict with existing schema
- Foreign key constraint violations
- Column type mismatches
- Check migration code in
Migrations/folder - Review error message for specific constraint
- May need to rollback and fix migration
- See the Migrations guide for details
Supabase connection timeout
Supabase connection timeout
If database operations timeout:Check Supabase status:
Visit Supabase dashboard to verify database is running.Verify connection pooling:
Supabase has connection limits on free tier.Check connection string:
Ensure SSL mode is set correctly:Solution:
- Check Supabase dashboard for service status
- Reduce connection pool size in API configuration
- Upgrade Supabase plan if hitting connection limits
- Implement connection retry logic
Data not persisting
Data not persisting
If changes aren’t saved to the database:Check API logs:Verify DbContext is saving:
Look for
SaveChangesAsync() calls in controllers.Check for validation errors:
Ensure all required fields are provided.Common causes:- Missing
SaveChangesAsync()call - Validation failures
- Transaction rollback
- Foreign key constraint violations
- Add logging to controller methods
- Check for validation errors in API response
- Verify all required relationships are set
- Review Entity Framework logs
Build and deployment issues
Build fails
Build fails
If Check for TypeScript errors or missing dependencies.For .NET build errors:Look for compilation errors in C# code.Common issues:
npm run build or dotnet build fails:For React build errors:- TypeScript type errors
- Missing npm packages
- NuGet package version conflicts
- Syntax errors in code
- Fix all TypeScript errors shown in output
- Run
npm installto ensure dependencies are installed - Run
dotnet restoreto restore NuGet packages - Check for breaking changes after package updates
Missing dependencies
Missing dependencies
If you see “module not found” or package errors:For npm packages:For .NET packages:Verify package.json and .csproj:
Ensure all dependencies are listed.Solution:
- Delete
node_modulesand reinstall:rm -rf node_modules && npm install - Clear NuGet cache:
dotnet nuget locals all --clear - Check for package version conflicts
- Ensure you’re using compatible Node.js and .NET versions
Authentication issues
Cannot log in with default credentials
Cannot log in with default credentials
If default manager account (0001 / 1234) doesn’t work:Check if account exists:
Query the database directly or check API logs.Verify PIN hashing:
The system should automatically upgrade plaintext PINs to BCrypt on first login.Create default manager manually:
Run the seed data script or use Swagger to create an employee.Solution:
- Check
employeestable in database - Verify
is_active = truefor the account - Ensure role is set to “Manager”
- Try resetting PIN through admin panel
Session expires immediately
Session expires immediately
If you’re logged out right after logging in:Check auto-logout setting:
Verify
auto_logout_minutes in system_settings table.Verify session storage:
Check browser localStorage for session data.Common causes:- Auto-logout set to 0 or very low value
- Clock skew between client and server
- Session storage being cleared
- Update auto-logout setting in System Settings
- Check browser console for session errors
- Verify system time is correct
- Clear browser cache and cookies
Performance issues
Slow API responses
Slow API responses
If API endpoints take a long time to respond:Check database query performance:
Enable EF Core query logging in Profile slow endpoints:
Use browser DevTools Network tab to identify slow requests.Common causes:
appsettings.json:- Missing database indexes
- N+1 query problems
- Large dataset without pagination
- Inefficient queries
- Add indexes to frequently queried columns
- Use
.Include()to avoid N+1 queries - Implement pagination for large datasets
- Optimize LINQ queries
High memory usage
High memory usage
If the application consumes excessive memory:Check for memory leaks:
Monitor memory usage over time.Profile the application:
Use .NET diagnostic tools:Common causes:
- Large query results not being disposed
- Event listeners not being removed
- DbContext not being disposed properly
- Circular references in objects
- Ensure DbContext is used with
usingstatements - Dispose of large objects explicitly
- Implement proper pagination
- Use streaming for large file operations
Still having issues?
If you’re experiencing an issue not covered here:- Check the logs - Look in
logs/comprehensive-{date}.jsonfor detailed error information - Review the API documentation - Visit
/swaggerendpoint for API reference - Check the health endpoint - Visit
/healthto verify API is running - Search GitHub issues - Someone may have encountered the same problem
- Enable detailed logging - Set log level to “Debug” in admin settings