Command channel not available

Video SDK Type and Version:

Web Video SDK UI Toolkit Version 2.1.0-1 (with Video SDK 2.1.5)

I’m developing a real-time multiplayer game component using the Zoom Video SDK. The game requires bidirectional communication between the host and participant to synchronize game state, including:

  • Game start/end events
  • Current word being displayed
  • Score updates
  • Player turn switching
  • Timer synchronization

I’ve implemented the game using two approaches:

  1. Primary approach: Using the Command Channel as recommended in documentation for real-time game state synchronization between host and participant.
  2. Fallback approach: Using Chat messages as a secondary method when the Command Channel is unavailable.

The implementation follows the pattern from the docs:

// Primary Command Channel approach
const cmdClient = zoomClient.getCommandClient();
if (cmdClient) {
  // Send game updates
  cmdClient.send(JSON.stringify({
    cmd: "GAME_STATE",
    gameSessionId: sessionId,
    gameState: { /* game state data */ }
  }));
}

// Event listener for receiving commands
client.on('command-channel-message', (payload) => {
  const message = JSON.parse(payload.text);
  // Process game command
});

Despite implementing multiple methods to access the command channel, I consistently receive:

Could not get command client from Zoom SDK - will retry
Command channel not available
No viable communication method found for session sharing
Failed to get command client after multiple retries

I’m using various approaches to get the command client:

  1. Direct access: zoomClient.getCommandClient()
  2. Through core client: zoomClient.getCoreClient().getCommandClient()
  3. With retries: Setting up a periodic retry mechanism

Troubleshooting Routes:

  1. Implemented multiple ways to access the command client
  2. Added a retry mechanism that attempts to get the command client every 2 seconds
  3. Added chat channel fallback for transmitting game state
  4. Verified the Video SDK initialization is complete before attempting to access the command channel
  5. Confirmed the appropriate permissions were enabled in the JWT token
  6. Tested with simple message sending to isolate the issue
  7. Checked SDK documentation for any initialization requirements for the command channel

How To Reproduce:

  1. Authentication method: JWT token with appropriate permissions including command channel
  2. Browser: Chrome 122 on macOS
  3. Steps:
  • Initialize Zoom Video SDK UI Toolkit
  • Join a session successfully
  • Attempt to access command channel using zoomClient.getCommandClient()
  • Observe “Could not get command client from Zoom SDK” error
  • See retry attempts fail with “Command channel not available”

My question: Is there a specific initialization step or timing requirement for the command channel that might be missing from my implementation? Are there any known issues with the command channel in the current SDK version? Any guidance on the correct way to access and use the command channel would be greatly appreciated.

Hi @6x8t7pbq7p Apologies for the wait. I’ll check this out today in my dev environment and let you know if there is anything missing here.

Hi @6x8t7pbq7p Regarding the client retrieval in 2.1.0, there was a bug where a separate VideoClient would be returned instead of the one the toolkit was using. We have since deprecated this feature. In UItoolkit version 2.1.10-1, the on and off functions are exposed so you can subscribe to the sdk events.

However, accessing the UIToolkit VideoClient directly is no longer officially supported and I do not have a roadmap on that feature currently.

In this case, you would be able to subscribe and receive commands. For sending, you would have to implement the feature outside of the UItoolkit using the base web video sdk.

This topic was automatically closed 25 hours after the last reply. New replies are no longer allowed.