Error reading 'caps' when joining meeting

Meeting SDK Type and Version
Type: Web
Version: 4.0.7

Description
Error reading ‘caps’ at lM.getLocalRecordingPermissionUserList

Error?
I’m intermittently getting errors about a runtime issue:
Cannot read properties of undefined (reading ‘caps’)
at lM.getLocalRecordingPermissionUserList. Note, this error doesn’t always prevent me from successfully having a meeting-- after dismissing, the meeting seems to be working sometimes.

Here is the error:

Cannot read properties of undefined (reading 'caps')
TypeError: Cannot read properties of undefined (reading 'caps')
    at lM.getLocalRecordingPermissionUserList (http://localhost:4200/vendor.js:71193:27432)
    at http://localhost:4200/vendor.js:71382:672597
    at http://localhost:4200/vendor.js:71196:53857
    at Array.forEach (<anonymous>)
    at Object.next (http://localhost:4200/vendor.js:71196:53845)
    at e.next (http://localhost:4200/vendor.js:71187:52215)
    at t._next (http://localhost:4200/vendor.js:71187:51885)
    at t.next (http://localhost:4200/vendor.js:71187:51534)
    at http://localhost:4200/vendor.js:71187:67063
    at t.<anonymous> (http://localhost:4200/vendor.js:71187:66859)

Troubleshooting Routes
I’ve read similar issues, although I can’t seem to find one that can help me resolve this. Even when joining with my host first, I’m intermittently getting this on my host machine

How To Reproduce
Here is my code snippet, using the component instructions for the Web SDK:

  const joinMeeting = async (params: JoinMeetingParams) => {
    dismissVideoCallNotification();
    const meetingSDKElement = document.getElementById(
      params.elementId || 'meetingSDKElement'
    );
    let clientIsInitialized = false;
    try {
      const initializeResult = await client.init({
        zoomAppRoot: meetingSDKElement || undefined,
        language: 'en-US',
        patchJsMedia: true,
        customize: {
          video: {
            isResizable: true,
          },
        },
      });
      if (typeof initializeResult === 'string') {
        clientIsInitialized = true;
      }
    } catch (err) {
      console.error('Failed to initialize SDK:', err);
    }
    try {
      if (clientIsInitialized === false) {
        console.error('Zoom client is not initialized.');
        return;
      }
      await client.join({
        signature: params.jwtToken,
        meetingNumber: params.meetingNumber,
        password: params.password,
        userName: getFullName(params.user) || 'Plana Client',
        userEmail: params.user.email,
      });
    } catch (err) {
      console.error('Failed to join meeting:', err);
    }
  };
1 Like

Hi @andrew.hsu1, this is similar to a known Web SDK issue where the local-recording permission path throws “reading ‘caps’” when the host isn’t present yet or meeting metadata isn’t ready - see Error in mediaCapturePermission API: TypeError: reading ‘caps’.

If the error is consistent, it’s typically because the meeting allows join-before-host and the bot joined first; the permission request needs the host in the meeting to resolve, otherwise this exception is raised (documented in that thread’s accepted answer).

If you aren’t doing recording, skip the recording-permission helpers because the Web Meeting SDK does not support local recording.

If you do need the compliance prompt, only call mediaCapturePermission after you’re fully in-meeting and the host is present, and guard for undefined state before reading capability fields.

2 Likes