Connection Issues
Cannot Connect to Server
Cannot Connect to Server
Symptoms:
- Frontend shows connection errors
- Room creation fails
- “Unable to connect” messages in browser console
- Backend server is not running
- Backend running on wrong port
- Firewall blocking connections
- Incorrect IP address
- Network isolation (different subnets)
Verify Backend is Running
Check that the backend server is running:Expected response:If this fails, start the backend:
Check Port Configuration
Verify the backend is running on port 3001:Windows:Linux/Mac:You should see a Node.js process listening on port 3001.
Verify Network Connectivity
From the guest computer, test connectivity to the host:If ping works but curl fails, it’s a firewall issue.
Room Not Found
Room Not Found
Symptoms:
- “Sala no encontrada” error message
- Unable to join room with 6-digit code
- Join attempt fails silently
- Incorrect room code
- Room was deleted or expired
- Host closed browser
- Backend was restarted
Verify Room Code
Double-check the 6-digit code:
- No typos or transposed numbers
- Correct spacing (123 456, not 12 3456)
- Code is still valid
Check Host Status
Ensure the host player:
- Has not closed their browser tab
- Is still on the room creation screen
- Can see “Esperando jugador…” message
Recreate Room
If the room was lost:
- Host clicks back to home screen
- Host creates a new room
- Host shares the new 6-digit code
- Guest joins with new code
Room Full
Room Full
Symptoms:
- “Sala llena” error message
- Cannot join existing room
- Host must create a new room for different players
- Current players must leave the room first
- Use different room codes for different pairs of players
This is by design. Elemental Battlecards is a 1v1 game, so each room is limited to 2 players.
Synchronization Issues
Actions Not Syncing
Actions Not Syncing
Symptoms:
- Cards played on one client don’t appear on the other
- Attacks or fusions don’t register
- Delayed or missing game state updates
- Turn timer out of sync
- Network latency or packet loss
- Socket.IO connection degraded
- Browser performance issues
Check Network Stability
Test network latency:Look for:
- Consistent ping times (< 10ms on LAN)
- No packet loss
- No timeout errors
Check Browser Console
Open browser developer tools (F12) and check the Console tab:Look for:
- Socket.IO connection errors
- Failed event emissions
- JavaScript errors during game actions
"Socket connected"- Good"Socket disconnected"- Connection lost"Error emitting event"- Action failed
Restart Connection
- Both players close the game tab
- Host restarts backend (Ctrl+C, then
npm start) - Host creates new room
- Both players rejoin
Turn System Not Working
Turn System Not Working
Symptoms:
- Both players can act simultaneously
- Turn timer not counting down
- “Tu turno” / “Turno del oponente” not displaying correctly
Verify Initial Sync
When both players join:
- Host should see “Tu turno” immediately
- Guest should see “Turno del oponente”
- Timer should show 12 seconds
Database Issues
Database Connection Failed
Database Connection Failed
Symptoms:
- “No se pudo conectar a la BD” error
- Backend crashes on startup
- Authentication routes not working
For SQLite Users:No configuration needed! SQLite uses in-memory storage and requires no setup.
If you’re experiencing database issues during LAN play, consider disabling authentication entirely with
DB_ENABLED=false.Performance Issues
Game Running Slowly
Game Running Slowly
Symptoms:
- Low frame rate
- Laggy card animations
- Delayed input response
Enable Hardware Acceleration
Chrome/Edge:
- Go to
chrome://settings - Search for “hardware acceleration”
- Enable “Use hardware acceleration when available”
- Restart browser
Reduce Browser Load
- Close unused tabs
- Disable resource-heavy extensions
- Clear browser cache
- Close other applications
Port Conflicts
Port Already in Use
Port Already in Use
General Debugging
Enable Verbose Logging
Enable Verbose Logging
To get more detailed error information:Backend:Frontend:
Open browser console (F12) and check:
.env
- Console tab for JavaScript errors
- Network tab for failed HTTP/WebSocket requests
- Application tab for storage issues
Clean Installation
Clean Installation
Getting Help
If you’re still experiencing issues:- Check browser console (F12) for error messages
- Review backend logs for connection or database errors
- Test the health endpoint:
curl http://localhost:3001/ping - Verify both computers are on the same network with
ping - Check firewall rules are properly configured
Most issues are related to network configuration or firewall settings. Double-check these first before investigating other causes.