Troubleshooting
Common issues and solutions for WorkForce installation and operation.
Installation Issues
npm install fails
Symptoms: Errors during dependency installation.
Solutions:
- Clear npm cache:
npm cache clean --force - Delete
node_modulesandpackage-lock.json, then retry - Ensure Node.js version is 18.17+:
node --version - On Windows, run terminal as Administrator
prisma migrate fails
Symptoms: Migration errors or connection refused.
Solutions:
- Verify PostgreSQL is running:
pg_isready - Check
DATABASE_URLin.env— ensure host, port, user, password, and database are correct - Test connection:
psql -h localhost -U workforce -d workforce - Ensure the database exists and the user has permissions
Build fails with memory error
Symptoms: JavaScript heap out of memory
Solution:
export NODE_OPTIONS="--max-old-space-size=4096"
npm run build
On PowerShell:
$env:NODE_OPTIONS = "--max-old-space-size=4096"
npm run build
Runtime Issues
Application won't start
Check these in order:
.envfile exists and has all required variablesnpx prisma generatehas been runnpm run buildcompleted successfully (production)- Port is not in use:
netstat -ano | findstr :3000
"Invalid NEXTAUTH_URL"
Ensure NEXTAUTH_URL in .env matches the URL you access the app from:
- Development:
http://localhost:3000 - Production:
https://your-domain.com
Database connection errors
Symptoms: "Connection refused" or "Authentication failed"
- Verify PostgreSQL is running
- Check firewall rules allow connection on port 5432
- Verify credentials in
DATABASE_URL - For remote databases, ensure
pg_hba.confallows your IP
Attendance Issues
Check-in location not detected
- User must grant Location permission to the app
- GPS must be enabled on the device
- Check if office locations are configured (Administration → Office Locations)
- Verify the office location radius is large enough
Check-in marked as Late incorrectly
- Verify the employee's assigned shift and start time
- Check the configured grace period
- Verify the server time zone matches your organization's time zone
Approval Issues
Requests not appearing for approver
- Check if a workflow is configured for the request type
- Verify the approver is assigned in the workflow stage
- If no workflow exists, verify the employee has a department with a manager
- HR users should see all pending requests — verify the user's role is set to
hr
Stuck requests
If a request is stuck in "pending" or "in_review":
- Check if the assigned approver's account is active
- Verify workflow stages are complete and correct
- As admin/HR, you can manually update the request status
Mobile App Issues
App crashes on launch
- Ensure the app is on the latest version
- Clear app data/cache
- Uninstall and reinstall
- Check that the server URL is correct and reachable
Push notifications not received
- Check notification permission in Profile → Permissions
- On Android: verify the notification channel is enabled in device settings
- Check battery optimization isn't killing the app
- Verify the server has push notification services configured
OTA update fails
- Check internet connection
- Restart the app and try again
- If update repeatedly fails, uninstall and reinstall the app
Getting Help
If you can't resolve the issue:
- Check the application logs (
logs/directory or PM2/NSSM logs) - Check the browser developer console for JavaScript errors
- Contact your system administrator with the error details