Hello Zoom Developers,
I am trying to integrate the Zoom Meeting SDK (Client View) into a new Next.js application using the App Router, but I’m consistently encountering a blocking error during initialization.
Goal: Embed the Zoom Meeting SDK (using @zoom/meetingsdk
npm package) within a Next.js component to allow users to join meetings.
Environment:
- Framework: Next.js v15.3.2 (using App Router)
- React: v18.2.0 (pinned exact version)
- React DOM: v18.2.0 (pinned exact version)
- Zoom Meeting SDK: Tried v3.13.1, v3.12.0, and v3.5.1 (currently using v3.5.1 as per React 18 support in changelog)
- Node.js: v22.15.0
- Browser: [Specify Your Browser, e.g., Chrome vXXX]
- OS: [Specify Your OS, e.g., Windows 11]
Problem: After setting up the project, installing dependencies, handling asset loading, and attempting to initialize the SDK via ZoomMtg.init()
, I consistently receive the following runtime error in the browser console:
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'ReactCurrentBatchConfig') at [some line/char offset] (zoomus-websdk-zoommtgMain.umd.min.js:2:...) at i (zoomus-websdk.umd.min.js:2:...) at ... (further stack trace within Zoom SDK code)
This error occurs specifically when ZoomMtg.init()
is called, preventing the SDK from initializing successfully.
My Setup & Troubleshooting Steps:
- Project Structure: Using Next.js App Router. The Zoom embedding logic is within a Client Component (
'use client';
). - Dynamic Import: The Client Component responsible for Zoom is dynamically imported in the page using
next/dynamic
withssr: false
to ensure client-side only rendering. `JavaScript// Example from page.tsx using a wrapper client component
import MeetingPageClient from ‘./MeetingPageClient’;
// …
<MeetingPageClient {…props} />
// Example from MeetingPageClient.tsx
‘use client’;
import dynamic from ‘next/dynamic’;
const ZoomMeetingEmbed = dynamic(() => import(‘@/components/zoom/ZoomMeetingEmbed’), { ssr: false });
// … renders <ZoomMeetingEmbed … />3. **Initialization Timing:** Tried initializing
ZoomMtg.init()` both:
- Immediately within
useEffect(() => { ... }, []);
after theZoomMeetingEmbed
component mounts. - Delayed, triggered by a button click (similar to the official React sample).
- The error occurs in both scenarios during the
init
call.
- SDK & React Versions:
- Started with SDK
3.13.1
and React 19, encountered the error. - Downgraded React/ReactDOM to
18.2.0
(pinned exact version) based on SDK v3.5.1 requirements. - Tried SDK
3.13.1
,3.12.0
, and3.5.1
with React18.2.0
. The error persists across these SDK versions. - Performed clean installs (deleted
node_modules
,package-lock.json
, rannpm install
) after each version change. - Updated
@types/react
and@types/react-dom
to^18
.
- Asset Loading:
- Using
ZoomMtg.setZoomJSLib(\
https://source.zoom.us/{SDK_VERSION}/lib, '/av');
in a utility function called beforeinit
, pointing to the correct SDK version (e.g.,3.5.1
or3.12.0
). Verified Wasm/core libs load successfully from CDN via network tab/logs. - Resolved initial 404 errors for UI assets (e.g.,
zoomus-websdk-zoommtgMain.umd.min.js
,*.css
) by copying the necessary files/folders fromnode_modules/@zoom/meetingsdk/dist/
into thepublic/zoom-sdk-assets/ui/
directory and ensuring they are served correctly (verified via network tab - these now load with 200 OK).
- Debug Mode: Enabled
debug: true
inZoomMtg.init()
, but no additional helpful logs appear before theReactCurrentBatchConfig
error occurs. - Official Sample Comparison: Checked the official
meetingsdk-react-sample
on GitHub. It uses SDK^3.13.1
and React^18.3.1
(which matches my environment closely when using SDK 3.13.1) but uses Vite as the build tool. The sample appears to work correctly, suggesting the issue is specific to the Next.js 15 environment or the integration pattern required within it. The sample also notably does not usesetZoomJSLib
, relying on Vite’s handling of assets.
Request:
Could you please provide guidance on resolving this ReactCurrentBatchConfig
error when using the Meeting SDK (specifically Client View) within a Next.js 15 / React 18.2.0 environment? Is this a known incompatibility, or is there a specific configuration required for Next.js that differs from the official sample or standard documentation?
Thank you!