Skip to main content

What to do if the Javascript SDK doesnt seem to collect any data?

Validate the following:

  1. watchRTC.init() MUST be called before any call to RTCPeerConnection or those connection will not be captured
    • Using a CPaaS SDK or any other third party WebRTC library? Make sure to include it AFTER you include AND call watchRTC.init()
    • That said, do note that until a peer connection is actually opened, you won’t see any network traffic related to watchRTC
  2. Are you sure the HTML page the session is running from is in the domains captured by watchRTC?
    • When you onboarded, you were asked which domains you wish to cover
    • If the domain used is not in that list, then it will simply be ignored

Now that we covered the basics, follow these debugging steps.

Enable additional debugging

Add to the URL of your web application /?watchrtc=debug

This will add additional debug messages that will make it easier for you and our support figure out the issue faster.

Find the connection ID

In Chrome, open the dev console and filter for watchrtc messages. Search for a connection established message. It should look similar to this:

What you’re looking for is the watchRTCConnectionId and the sdkVersion. When contacting our support, you should provide these values.

Are you connected to our servers?

In Chrome, on the dev tools, open the Network tab. See if you can find a connection to a watchRTC / testRTC server.

It should look similar to this:

What we want here is to make sure that there’s a websocket connection opened (wss:// one).

Found it? Great!

Now go to the Messages tab. We want to make sure that there are periodic messages on that connection going towards the server. The information there will be compressed, so the content is less important than just seeing that there are messages.

Assume these will occur anywhere between once a second to once a minute or two, depending on how your account is configured.

Enable verbose console logs

You can enable verbose console logs which can greatly help with debugging. Our support may occasionally ask for it if you reach out for assistance around connectivity.

To do so, just open the URL of your application and add watchrtc=debug to it.

If your application’s website is then you can use

Common integration issues

  • Calling watchRTC.init() after opening a peer connection
  • Calling watchRTC.init() after including a third party WebRTC SDK (such as Vonage’s opentok)
  • Setting the peerId and roomId only after opening a peer connection
  • Using the wrong API key
  • Not loading the SDK dynamically when using server side rendering frameworks like Next.js

Was this article helpful?

0 out of 0 found this helpful