Issue with node_modules

I have installed zoom video sdk new version 2.1.5,
I am always getting errors from node_modules, the errors are :
Uncaught TypeError: e.util.isSupportSendVideoFullHD is not a function and Uncaught TypeError: o.util.evaluateAudioStrategy is not a function

My node version is v18.19.0 and react version 18.2.0
I have tried various node version combinations with zoom version combs, but all give the same error

Your node version is not the LTS ( v22.14.0), which is a requirement of the SDK; Additionally the React components require a minimim React version of 18.3.1

Good luck!

I have installed the latest node version (v22.14.0), I have removed my previous node_modules and yarn.lock files, cleared cache using yarn cache clean, and installed “@zoom/videosdk”: “^2.1.10” again

Still getting the same above errorrs.

Thank you

Hey @Vinay1

Thanks for your feedback.

Could you share some problematic session IDs with us for troubleshooting purposes?

Thanks
Vic

Hi @vic.yang ,
thanks for your response.
I am not sure how to get a session Id here.
We have simply cloned the zoom sample repo from zoom/videosdk-web-sample

We have added the required files from that repo to our project and we are rendering zoom index file when the user hits a particular url (simply executing zoom components when a route is hit) and that url is created based on call time, call Id, duration etc.
Sample url:
…/#/video-call/887981ba-4177-439b-0d04-d4f42bbbd508/0/20/1741771800/30

let me know if we have done anything wrong or if you need more info

Thank you

Hey @Vinay1

Thanks for sharing the context.

There are two ways to obtain the session ID.

  • One is through the web portal → dashboard, where you can find a list of in-progress or past sessions.
  • The other is through an in-session method—after joining a session, you can call client.getSessionInfo().sessionId to retrieve the session ID.

Thanks
Vic

Hi @vic.yang , thanks for the guidance.

sharing you a failed call session Id:

ZmFt9dmzSymQBBo+3P7TZw==

Thank you.

Hey @Vinay1

Thanks for sharing the problematic session ID with us.

ZmFt9dmzSymQBBo+3P7TZw==

It seems that the issue is caused by a version mismatch between the Video SDK and its dependent assets.

Did you set the second parameter of the client.init method but forget to update the dependent assets to the corresponding version?

If you are using self-deployed dependent assets, make sure to copy the assets from the dist/lib folder of the Video SDK package to your web server for each upgrade.

Thanks
Vic

await zmClient.init(‘en-US’, ${window.location.origin}/lib, {
webEndpoint,
enforceMultipleVideos: true,
enforceVirtualBackground: galleryViewWithoutSAB,
stayAwake: true
});

This is how we have initiated.
We are not using any self-deployed dependent assets.

I have also tried the second parameter as node_modules@zoom\videosdk\dist\lib

Still didn’t work

Thank you

Hi @Vinay1

Thanks for sharing the issue context with us.

I’m not sure if you’re using our sample app.

Could you confirm whether the ${window.location.origin}/lib path is pointing to the public/lib directory in your project?

In our sample app, before running, we explicitly copy the latest lib files from node_modules to the public/lib directory.

Thanks
Vic

I have cross checked, we do have the same config-overrides.js (exact from the sample repo)

I have also checked:
ls public/lib:

    Directory: E:\Dosen-v2-FE\public\lib


Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d-----        12-03-2025  02:26 PM                vb-resources
-a----        12-03-2025  02:26 PM        2838857 audio.encode.wasm
-a----        12-03-2025  02:26 PM        2971298 audio.simd.wasm
-a----        12-03-2025  02:26 PM         188791 audio_simd.min.js
-a----        12-03-2025  02:26 PM         188642 js_audio_process.min.js
-a----        12-03-2025  02:26 PM          22658 js_audio_worklet.min.js
-a----        12-03-2025  02:26 PM         134612 js_audio_worklet_process.min.js
-a----        12-03-2025  02:26 PM         134755 js_audio_worklet_simd.min.js
-a----        12-03-2025  02:26 PM         478284 js_media.min.js
-a----        12-03-2025  02:26 PM           7442 js_sharing_audio_worklet.min.js
-a----        12-03-2025  02:26 PM       10499617 lib.zip
-a----        12-03-2025  02:26 PM         465302 qrscanner.min.js
-a----        12-03-2025  02:26 PM         319648 sharing_m.min.js
-a----        12-03-2025  02:26 PM          22658 js_audio_worklet.min.js
-a----        12-03-2025  02:26 PM         134612 js_audio_worklet_process.min.js

I am also sharing the files that we directly copied from sample repo and made some customizations:

tabs
│── Library
│── livechat
│── Matches
│── profile
│── Program
│── zoom
│   │── component
│   │── config
│   │── context
│   │── feature
│   │── hooks
│   │── utils
│   │── dev.ts
│   │── App.css
│   │── index-types.d.ts
│   │── index.css
│   │── react-app-env.d.ts
│   │── ZoomIndex.tsx
│   │── ZoomVideoWindow.tsx

We have simply kept all these files inside our src folder and ZoomIndex.tsx is the main file where we are returning the following:

 return (
    <ZoomContext.Provider value={zmClient}>
      {zmClient && meetingArgs ? <ZoomVideoWindow meetingArgs={meetingArgs as any} /> : loaderDesign}
    </ZoomContext.Provider>
  );

The config-overrides.js file is outside the src folder.

Thank you for your responses.
We are facing this issue on our production server.(we had to disable video calls for time being)

To give you more context, everything was working good but due to version enforce policy, the video crashed with the errror, minimum version not met.
So, we have upgraded it with yarn install @zoom/videosdk@latest
We removed old yarn.lock files and node_modules, did yarn cache clean and installed packages again.

Node version is v22.14.0 and zoom V^2.1.10

We are happy to share more information if needed.
I am unable to share images here, so had to use code option :slight_smile:

Thank you

Hey @Vinay1

E:\Dosen-v2-FE\public\lib

We compared the files in this folder with our latest 2.1.5 version and found that several files are missing.

Can you confirm whether the lib directory was copied from the latest version of the package?

Thanks
Vic

Hey @vic.yang , the issue with node_modules has been resolved.
I have copied the lib folder from node_modules and pasted them in public/lib folder.

But I got few type related issues from audio-video-statistic.tsx file.

ERROR in src/pages/new-designs/tabs/zoom/feature/video/components/audio-video-statistic.tsx:249:33
TS2345: Argument of type '{ avg_loss: number; fps: number; height: number; jitter: number; max_loss: number; rtt: number; width: number; sample_rate: number; }' is not assignable to parameter of type 'SetStateAction<VideoQosData | undefined>'.
  Type '{ avg_loss: number; fps: number; height: number; jitter: number; max_loss: number; rtt: number; width: number; sample_rate: number; }' is missing the following properties from type 'VideoQosData': bandwidth, bitrate
    247 |   useEffect(() => {
    248 |     if (!isStartedVideo) {
  > 249 |       setVideoEncodingStatistic(VideoQosDataShape);
        |                                 ^^^^^^^^^^^^^^^^^
    250 |     }
    251 |   }, [isStartedVideo]);
    252 |   useEffect(() => {

So, I replaced this file with the latest code from the sample repo which resolved the type issue.

Now, I am facing one other issue when clicking on camera:

{
    "type": "INVALID_OPERATION",
    "reason": "camera is closed",
    "errorCode": 6109
}
  const onCameraClick = useCallback(async () => {
    if (isStartedVideo) {
      await mediaStream?.stopVideo();
      setIsStartedVideo(false);
    } else {
      if (mediaStream?.isRenderSelfViewWithVideoElement()) {
        const videoElement = document.querySelector(`#${SELF_VIDEO_ID}`) as HTMLVideoElement;
        if (videoElement) {
          await mediaStream?.startVideo({ videoElement });
        }
      } else {
        const startVideoOptions = { hd: true, ptz: mediaStream?.isBrowserSupportPTZ() };
        if (mediaStream?.isSupportVirtualBackground() && isBlur) {
          Object.assign(startVideoOptions, { virtualBackground: { imageUrl: 'blur' } });
        }
        await mediaStream?.startVideo(startVideoOptions);
        if (!mediaStream?.isSupportMultipleVideos()) {
          const canvasElement = document.querySelector(`#${SELF_VIDEO_ID}`) as HTMLCanvasElement;
          mediaStream?.renderVideo(
            canvasElement,
            zmClient.getSessionInfo().userId,
            canvasElement.width,
            canvasElement.height,
            0,
            0,
            3
          );
        }
      }

      setIsStartedVideo(true);
    }
  }, [mediaStream, isStartedVideo, zmClient, isBlur]);

session id is: p626yjfoQKuHA2yXZmWduA==

Thank you very much @vic.yang :smiley:

Hi @Vinay1

p626yjfoQKuHA2yXZmWduA==

It seems the issue occurs when calling stream.stopVideo() while the video hasn’t started, possibly related to the isStartedVideo value.

Additionally, the logic for stream.startVideo is somewhat complex—you may refer to our latest sample app’s code for optimization.

Thanks
Vic

I have replaced my code with the code from sample repo for video-footer.tsx.

I am getting a message in my console saying:

HD support is currently limited, and comes with a number of restrictions and limitations. Please visit developerszoomus/docs/video-sdk/web/video/#720p-video for more details

The camera is on but the video feed is not coming.
I manually kept quality = VideoQuality.Video_90P in video-layout-helper.ts, still getting no feed.

I am sharing two session Ids with differnet zoom versions where we are facing similar issue:

TUWznSMkTcmnQlLKKiNb9g== (Videosdk —> v2.1.10)
X1FUlHp+RFyfo2cmVktkTA== (Videosdk —> v1.10.8)

Thanks

Hey @Vinay1

TUWznSMkTcmnQlLKKiNb9g==
X1FUlHp+RFyfo2cmVktkTA==

Thanks for your feedback.

It seems that you started capturing the video but didn’t render it. You can use the stream.attachVideo method to render it on the page.

Thanks
Vic