Skip to content

Debug the integration process

This section describes the steps that are required to verify that our SDK was integrated correctly with your application of choice.

Before you start debugging our SDK, please check if the integration with the player is working properly by removing it and adjusting the player's configuration.

Launch one of the compatible browsers and open a Developer Tools Console. (The required steps to open it vary depending on the browser.)

Make sure that Developer Tools Console Context is open on the environment that is using Our SDK. Debug logs will appear in the Console. For example:

09:03:51.618Z [TrackerV3] - Connected successfully to the Tracker, with ID = 9a146161-f769-4973-b2ad-a2a275739463  Will fetch from CDN.

Enable debug messages

In order to print debug messages in the browser's console log, you need to instruct the SDK instance to enable logging. Please add the following configuration options to achieve it:

var s73Config = {
  apiKey: '<YOUR_API_KEY>', // mandatory
  debug: 'info'
};

How to debug:

Connection to System73 SDK

System73 Edge Intelligence SDK Service.

If everything is correct, you should see one the following messages in the log:

  • When connected to fetch content from a CDN: Connected successfully to the Tracker, with ID = (...). Will fetch from CDN.
  • When connected to fetch content from a peer: Connected successfully to the Tracker, with ID = (...). Will fetch from P2P (parent ID = ...).

You can look for the node ID, parent ID in the System73 Dashboard, to verify that the nodes are connected.

If the connection with Tracker cannot be opened due to a malformed apiKey, look for: Check your API Key. If problem persists, contact support at support@system73.com. in the console log, you can handle this PolyNetException with the codes: -600, -601.

If an issue with the Tracker Handshake occurs, look for: The PolyNet SDK is not compatible with the Tracker. Tracker code: {handshake_rejected_code}. This may happen in transitions to newer versions. If problem persists, contact support at support@system73.com.in the console log, you can handle this PolyNetException with the code: -701.

If connection to Tracker Metrics Endpoint fails look for: Error communicating with Tracker metrics endpoint. Detail: HTTP code: *{http_status_code}*, URL: *{tracker_metrics_url}*. If problem persists, contact support at support@system73.comin the console log, you can handle this PolyNetException with the code: -703.

Note

The trace will contain an embedded exception detailing the network problem that caused it. You should verify that networking is available and the provided API key is the correct one.

Our SDK content requests

Warning

It is very important to verify that the video player is requesting content from the SDK, and not directly from the Internet.

You can confirm that the System73 SDK functions properly, when in the console log, you can spot one of the following type of messages:

Content request URL = ...

If you don't find one in the log, it means that the player is not using System73 SDK to download the content.

Please verify that you initialized the video player with the correct manifest URL. For example, for videojs player, you would use the property MANIFEST_URL inside the object player.src:

  var player = videojs("video", playerConfig);

  player.ready(function() {
    player.src({
      src: '<MANIFEST_URL>',
      type: 'application/vnd.apple.mpegURL'
    });
  });

P2P

To verify that peers are able to connect to each other, look for the following messages in the console log, that show connections and disconnections from peers:

Connected to P2P parent with ID = ...
Disconnected from P2P parent with ID = ...
Connected to P2P child with ID = ...
Disconnected from P2P child with ID = ...

You can see peers come and go by inspecting the parent ID and child ID on the our Dashboard.

Reconnections

If the SDK needs to reconnect to the Tracker, search the console log for an exception containing the message: Connection to the Tracker was unexpectedly closed.

If the SDK is commanded to connect to a different parent by the Tracker, search the console log for one of the following messages:

  • When reconnecting to fetch content from CDN: Node is moving, ID = (...). Will fetch from CDN.
  • When reconnecting to fetch content from a peer: Node is moving, ID = (...). Will fetch from P2P (parent ID = ...).

You can look for the node ID, or the parent ID on the System73 Dashboard, to verify that those nodes are connected.

Example of the debugging process

The following is an example of a debugging session where 2 devices are connected, and the operation is completed successfully:

1. Use an exclusive channel

You will need an exclusive channel for debugging, which is not used by anyone else. Ensure that no other device is connected to the channel. You can verify that on the System73 Dashboard.

2. Connect the first device to the channel

The device should be playing video. Check that its node ID shows up on the System73 Dashboard, connected to the CDN. Look for the following messages in the console's log:

  Connected successfully to the Tracker, with ID = (...). Will fetch from CDN.

  Content request URL = ...

3. Connect a second device

The device should be playing video within a few seconds. It should become a child node of the first device. Check that its node ID shows up on the System73 Dashboard, and that it is connected to the first device.

Look for the following messages in the console's log:

In the parent's log:

  Connected to P2P child with ID = ...

In the child's log:

  Connected successfully to the Tracker, with ID = (...). Will fetch from P2P (parent ID = ...).

  Connected to P2P parent with ID = ...

  Content request URL = ... 

This section was last updated 2024-11-18