> For the complete documentation index, see [llms.txt](https://docs.mobb.ai/mobb-user-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mobb.ai/mobb-user-docs/getting-started/mobb-cli/troubleshoot.md).

# Mobb CLI Troubleshooting Guide

This guide describes how to troubleshoot common issues with the Mobb CLI.

## Network and Connection Issues

### WebSocket Connection Failures

By default, the Mobb CLI uses WebSockets to receive real-time updates about the analysis status. In some network environments—such as those behind strict corporate proxies, firewalls, or VPNs—long-lived WebSocket connections may be blocked or terminated unexpectedly.

**Symptoms:**

* The CLI appears to hang or "spin" indefinitely during the analysis phase without updating.
* You receive timeout errors waiting for the analysis to complete.
* WebSocket connection errors appear in the debug logs.

**Solution: Use Polling Mode**

The Mobb CLI provides a `--polling` flag that forces the CLI to use HTTP polling instead of WebSockets. This method checks the analysis state every 5 seconds via standard HTTP requests and is generally more friendly to proxies and firewalls.

**How to use:**

Append the `--polling` flag to your `analyze`, `review`, or `scan` commands:

```bash
# Analyze mode
npx mobbdev analyze --polling ...

# Review mode
npx mobbdev review --polling ...

# Scan mode
npx mobbdev scan --polling ...
```

**Verifying the Mode:**

You can confirm which connection mode is being used by checking the console output or logs:

* **WebSocket Mode (Default):**

  ```
  🔌 [WebSocket Mode] Using WebSocket subscription for status updates
  ```
* **Polling Mode:**

  ```
  🔄 [Polling Mode] Using HTTP polling instead of WebSocket for status updates
  ```

**Technical Details:**

* **Polling Interval:** 5 seconds
* **Timeout:** 30 minutes
