IMPROPER_MEETING_STATE Error (5002)

Issue 1: IMPROPER_MEETING_STATE Error (5002) - Call Dropped During Connection

Description

During a video call connection attempt, the call starts to connect but then immediately drops with an IMPROPER_MEETING_STATE error (error code 5002). The error appears briefly in the upper right corner of the user interface before disappearing. This error has occurred multiple times (3rd or 4th occurrence) and is concerning as the error code 5002 guidelines are not present in the official Zoom Video SDK documentation.

Additionally, the socket connection appears to be disconnected as the watchdog service shows no heartbeat logs during this time period, suggesting a complete disconnection from the Zoom service.

Session ID: mo/w881xQWiTgEGl4f4TYg==

Browser Console Error

The full error message or issue you are running into:

  • Error Code: 5002
  • Error Type: IMPROPER_MEETING_STATE

Which Web Video SDK version?

2.1.10

Video SDK Code Snippets

The code snippets that are causing the error / issue so we can reproduce:

Desktop Application (Electron-react):

const videoCallSetUp = async (signature: string, session: string, agentName: string) => {
  try {
    // create and initialize zoom client
    zoomClient = ZoomVideo.createClient();
    
    await zoomClient?.init('en-US', 'CDN', {
      stayAwake: true
    });

    // Join session
    await zoomClient?.join(session, signature, `${agentName}`);
    
    const mediaStream = zoomClient?.getMediaStream();
    stream = mediaStream;
    const usersInRoom = zoomClient.getAllUser();
    return usersInRoom;
  } catch (error) {
    // Error handling
    console.error('error occurred: videoCallSetup', error);
  }
};

Web Application:

const videoCallSetUp = async (data: { signature: string; session: string }, imgURL: string) => {
  try {
    zoomClient = ZoomVideo.createClient();
    
    await zoomClient?.init('en-US', 'CDN', {
      stayAwake: true,
      enforceVirtualBackground: true
    });

    await zoomClient?.join(
      data.session,
      data.signature,
      `User Display Name`
    );

    const mediaStream = zoomClient?.getMediaStream();
    stream = mediaStream;
    
    // Add listener for peer video
    if (zoomClient) {
      zoomClient.on('peer-video-state-change', peerVideoLister);
      zoomClient.on('user-updated', onUserUpdated);
      zoomClient.on('user-removed', onUserRemoved);
    }

    await mediaStream?.startAudio();
    await mediaStream?.startVideo({
      hd: true,
      videoElement,
      virtualBackground: { imageUrl: imgURL }
    });
  } catch (error) {
    console.error('error occurred', error);
  }
};

To Reproduce

Steps to reproduce the behavior:

  1. Initialize the Zoom Video SDK client
  2. Call zoomClient.init() with ‘en-US’, ‘CDN’, and configuration options
  3. Attempt to join a session using zoomClient.join() with valid session and signature
  4. The call begins to connect
  5. The call is immediately dropped with IMPROPER_MEETING_STATE error (5002)
  6. Socket connection is lost (no heartbeat logs from watchdog)

Note: This issue occurs intermittently and has been observed multiple times. The first several calls may connect successfully before this error occurs.

Troubleshooting Routes

The troubleshooting attempt types you’ve already exhausted:

  1. Verified that the error code 5002 is not documented in the official Zoom Video SDK error codes documentation: Meeting SDK - web - client view - Error codes
  2. Checked logs for socket disconnection issues
  3. Verified that session and signature are valid (other calls work successfully)
  4. Confirmed that the issue is intermittent (not consistent across all calls)

Device:

Desktop Application:

  • Device: Windows Desktop Application
  • OS: Windows 10
  • Browser: Electron (Chromium-based)
  • Browser Version: Electron 38.2.2

Web Application:

  • Device: Desktop/Laptop
  • OS: Windows 10 / macOS
  • Browser: Chrome
  • Browser Version: Latest

Additional context

  • This error has occurred 3-4 times in our testing in past 10 days.
  • The error code 5002 (IMPROPER_MEETING_STATE) is not documented in the official Zoom Video SDK documentation
  • The issue occurs after several successful calls, indicating it’s not a configuration issue
  • We are using Zoom Video SDK version 2.1.10
1 Like

Hey @meet-jeavio

Thanks for your feedback.

mo/w881xQWiTgEGl4f4TYg==

After analyzing the logs, we did not find any log entries with errorCode 5002.

This log usually appears when a method that requires the user to be in-session—such as startAudio or startVideo—is called before the user has joined the session or while the session is in failover (connection-change state is Reconnecting, Closed, or Fail).

Thanks
Vic