Newer Version Available

This content describes an older version of this product. View Latest

Debugging Streaming API Applications

You must be able to see all of the requests and responses in order to debug Streaming API applications. Because Streaming API applications are stateful, you need to use a proxy tool to debug your application. Use a tool that can report the contents of all requests and results, such as Burp Proxy, Fiddler, or Firebug.

The most common errors include:
  • Browser and JavaScript issues
  • Sending requests out of sequence
  • Malformed requests that don't follow the Bayeux protocol
  • Authorization issues
  • Network or firewall issues with long-lived connections

Using these tools, you can look at the requests, headers, body of the post, as well as the results. If you must contact us for help, be sure to copy and save these elements to assist in troubleshooting.

The first step for any debugging process is to follow the instructions in the Quick Start Using Workbench, Example: Interactive Visualforce Page, Example: Visualforce Page, or Example: Subscribe to and Replay Events Using a Java Client and verify that you can implement the samples provided. The next step is to use your debug tool to help isolate the symptoms and cause of any problems.

402 Error

You may sometimes receive an error notification that contains “402::Unknown client” and looks something like this:

1Thu Mar 29 06:08:08 PDT 2012 [CHANNEL:META_CONNECT]: {"id":"78","error":"402::Unknown client","successful":false,"advice":{"interval":500,"reconnect":"handshake"}

This can be caused by various conditions including when your client connection times out. If you see this error, you should reconnect to the server with a handshake. For more information about client timeouts and Streaming API limits, see

Clients and Timeouts and Streaming API Limits.