Troubleshooting
Solutions to common issues encountered during Auto Commerce installation.
Installation Wizard Issues
Wizard Not Loading
Symptom: The installation wizard page doesn't load or shows a blank screen.
Solutions:
- Verify the API is reachable by visiting
{API_URL}/api/v1/install/status - Check that
NEXT_PUBLIC_API_URLis correctly set in the frontend.env - Verify CORS is configured to allow requests from your frontend domain
- Check browser console for JavaScript errors
Wizard Redirects to Login
Symptom: Instead of showing the wizard, you're redirected to the login page.
Cause: The application thinks it's already installed.
Solutions:
- Check if
storage/.installedfile exists and delete it - Verify the database is empty or drop and recreate it
- Clear application cache:
php artisan cache:clear
Database Issues
Database Connection Failed
Symptom: "SQLSTATE[HY000] [2002] Connection refused" or similar.
Solutions:
- Verify database credentials in
.env - Ensure the database server is running
- Check if the database port is accessible
- For Docker: ensure containers are on the same network
# Test database connection
php artisan db:show
Migration Errors
Symptom: Migrations fail with syntax or constraint errors.
Solutions:
- Ensure you're using PostgreSQL 14+ or MySQL 8+
- Check if previous migrations partially ran:
php artisan migrate:status - For fresh start:
php artisan migrate:fresh(deletes all data)
Redis Issues
Redis Connection Failed
Symptom: "Connection refused" or "NOAUTH" errors for Redis.
Solutions:
- Verify Redis is running:
redis-cli ping - Check Redis password matches
.envconfiguration - For Docker: ensure Redis container is on the same network
- Check Redis port (default 6379) is not blocked
# Test Redis connection
redis-cli -h 127.0.0.1 -p 6379 ping
Authentication Issues
Passport Keys Error
Symptom: "Key path does not exist or is not readable" for OAuth.
Cause: Laravel Passport encryption keys are missing.
Solutions:
- Generate keys manually:
php artisan passport:keys - Verify keys exist:
ls -la storage/oauth-*.key - Set correct permissions:
chmod 600 storage/oauth-private.key chmod 644 storage/oauth-public.key
Personal Access Client Missing
Symptom: "Personal access client not found" when generating tokens.
Solution:
php artisan passport:client --personal --name="Auto Commerce Personal Access Client"
Permission Issues
Permission Denied Errors
Symptom: "Permission denied" when writing to storage or cache directories.
Solutions:
- Set correct ownership:
chown -R www-data:www-data storage bootstrap/cache - Set correct permissions:
chmod -R 775 storage chmod -R 775 bootstrap/cache
Log File Permission Errors
Symptom: Cannot write to log files.
Solution:
touch storage/logs/laravel.log
chmod 664 storage/logs/laravel.log
chown www-data:www-data storage/logs/laravel.log
Queue Worker Issues
Jobs Not Processing
Symptom: Background jobs remain in queue and don't process.
Solutions:
- Verify queue worker is running:
# Docker docker compose ps # Manual systemctl status autocom-queue - Check worker logs for errors
- Restart the queue worker:
php artisan queue:restart
Frontend Issues
API Requests Failing
Symptom: Frontend can't communicate with the API.
Solutions:
- Verify
NEXT_PUBLIC_API_URLis set correctly - Check CORS configuration allows your frontend origin
- Ensure the API is accessible from the frontend's network
- Check for SSL/TLS issues if using HTTPS
Build Errors
Symptom: npm run build fails.
Solutions:
- Clear npm cache:
npm cache clean --force - Delete node_modules and reinstall:
rm -rf node_modules && npm ci - Check Node.js version (18+ required):
node --version
Docker-Specific Issues
Container Won't Start
Symptom: Docker containers fail to start or keep restarting.
Solutions:
- Check logs:
docker compose logs -f - Verify
.envfiles exist and are configured - Check port conflicts:
netstat -tlnp | grep -E '(3000|8000)' - Rebuild containers:
docker compose build --no-cache
Volume Permission Issues
Symptom: Permission denied errors inside Docker containers.
Solution: Add user mapping in docker-compose.yml:
services:
app:
user: "1000:1000"
Getting Help
If you're still experiencing issues:
- Check the application logs:
storage/logs/laravel.log - Review Docker logs:
docker compose logs - Enable debug mode temporarily:
APP_DEBUG=truein.env - Search existing issues on GitHub
- Open a new issue with detailed error messages and environment info