Skip to content

Debugging Client Connections

When users experience issues connecting to the Spokes server (such as the app hanging on the loading screen, or frequent disconnects), it can be helpful to enable detailed client connection logs. These logs reveal exactly what the client’s browser or mobile app is experiencing when trying to establish a connection.

To activate client connection logging, you need to set the Spokes_SignalR_Log_Level environment variable on your Spokes server container.

For example, if you are using Docker Compose, add it to your docker-compose.yml file under the environment section:

services:
spokes:
environment:
- Spokes_SignalR_Log_Level=trace

After updating the variable, restart your container for the changes to take effect.

Once enabled, these logs are not printed to the server’s console. Instead, they are printed to the client’s browser console.

To view them:

  1. Open Spokes in a web browser (like Google Chrome, Edge, or Firefox).
  2. Open the Developer Tools (usually F12 or Ctrl+Shift+I).
  3. Navigate to the Console tab.
  4. Refresh the page to see the detailed connection logs.

You can set Spokes_SignalR_Log_Level to different values depending on how much detail you need:

  • trace (Recommended for debugging): Provides the most detailed information, including every single step of the connection handshake, transport fallbacks, and raw connection data. Use this when you are actively trying to diagnose why a client cannot connect or why it’s connecting slowly.
  • debug: Shows detailed diagnostic information, but slightly less overwhelming than trace. Good for general troubleshooting.
  • information: Shows general connection lifecycle events (connected, disconnected, reconnecting).
  • warning: Only logs unexpected events that don’t necessarily break the connection but might indicate a problem.
  • error: Only logs critical failures where the connection drops or fails to establish entirely.
  • none: Completely disables client-side connection logging.