Skip to content

Debugging Client Connections

When users run into connection issues (such as the app hanging on the loading screen, slow startup times, or frequent "Reconnecting..." prompts), enabling client connection logs is the fastest way to see what the browser or mobile app is doing under the hood.

To enable detailed client-side WebSocket and SignalR connection logs, set the Spokes_SignalR_Log_Level environment variable on your Spokes server container.

For example, in your docker-compose.yml file (or .env file), add:

services:
spokes:
environment:
- Spokes_SignalR_Log_Level=trace

Restart your container (docker compose up -d) for the variable to take effect.

You can set Spokes_SignalR_Log_Level to any of the following values:

  • trace (Recommended for debugging): Logs every step of the WebSocket handshake, transport fallbacks, keep-alive pings, and raw SignalR frames.
  • debug: Detailed diagnostic information without raw payload frames.
  • information: General connection lifecycle events (connected, disconnected, reconnecting).
  • warning: Unexpected events that do not immediately drop the connection.
  • error: Connection failures and dropped circuits.
  • critical: Severe fatal connection errors only.
  • none: Disables SignalR client logging (default when the variable is not set).

These client connection logs are output on the user's device, not in the server's Docker console.

  1. Open Spokes in your browser (Chrome, Edge, Brave, Firefox, or Safari).
  2. Open the Developer Tools (F12 or Ctrl+Shift+I on Windows/Linux, Cmd+Option+I on macOS).
  3. Select the Console tab.
  4. Refresh the page to watch the connection handshake and startup timeline logs.

The native iOS and Android apps automatically capture console, startup, and push notification logs into an on-device debug log buffer:

  1. Open the Spokes mobile app.
  2. Open the Server Switcher drawer (swipe from the right edge or tap the tab pill on the side of the screen).
  3. Double-tap the header at the top of the Server Switcher drawer.
  4. The Debug Logs screen will open. Tap Copy Logs in the top right corner to copy the log output to your clipboard.

3. Enabling Detailed Server Circuit Errors (Optional)

Section titled “3. Enabling Detailed Server Circuit Errors (Optional)”

If a UI action is failing silently and you want to see the full server-side C# exception stack trace in the browser console:

  1. Sign into Spokes as an admin and go to Server Settings (/settings).
  2. Select Server Logs from the top menu.
  3. In the Diagnostics card, toggle Enable Detailed Circuit Errors ON.

(Leave this setting turned off during normal day-to-day use, and only enable it while actively troubleshooting an issue.)