2 Z.Troublshooting
SluberskiHomeLab edited this page 2025-10-13 08:54:03 -05:00

Troubleshooting

Common Issues

  1. "Device not found" errors

    • Make sure you've completed the OAuth flow via /join
    • Check that the web player is active (visit the player URL from /status)
  2. Authentication expires

    • Tokens expire after 1 hour by default
    • Use /join again to refresh authentication
  3. Bot not responding

    • Check that the bot has proper permissions in your Discord server
    • Verify all environment variables are set correctly
  4. Spotify Premium Required

    • The Spotify Web Playback SDK requires a Spotify Premium account
    • Free accounts cannot use Connect devices

Logs

Check Docker logs:

docker-compose logs -f enspotification

For local development:

npm run dev

API Endpoints

The bot exposes a web interface on the configured port:

  • GET / - Basic bot information
  • GET /callback - Spotify OAuth callback
  • GET /player?userId=<userId> - Web playback interface
  • POST /device-ready - Internal device registration
  • GET /health - Health check endpoint

Health Monitoring

The application includes a health endpoint:

# Check application health
curl http://localhost:3000/health

# Expected response:
{
  "status": "healthy",
  "timestamp": "2025-10-13T13:40:26.752Z",
  "uptime": 177.289956876,
  "discord": "connected",
  "activeUsers": 0,
  "activeConnections": 0
}