Zoom web sdk leave button not working

All functions work fine.
But the leave button and the view button don’t work. Why?
Nothing appears in the log.
The development environment is Next.js.

import React, { useState, useEffect } from "react";
import { ZoomMtg } from "@zoomus/websdk";
import { useRouter } from "next/router";

// @ts-ignore
const Zoomcompo = () => {
  const router = useRouter();
  useEffect(() => {
    ZoomMtg.setZoomJSLib("https://source.zoom.us/2.5.0/lib", "/av");
    // loads language files, also passes any error messages to the ui
  }, []);
  const [meetingNumber, setMeetingNumber] = useState<any>(
    Object.keys(router.query)[0].substring(11, 0)
  const [passWord, setPassWord] = useState<any>(
  var apiKey = "MYAPIKEY";
  var role = 0;
  var leaveUrl = "/class/classList";
  var userName = "React";
  var userEmail = "";
  var registrantToken = "";

  const getSignature = (e: any) => {
    return new Promise((resolve, reject) => {
      try {
        const signature = ZoomMtg.generateSignature({
          meetingNumber: meetingNumber,
          apiKey: "MYAPIKEY",
          apiSecret: "MYAPIKEYSCRT",
          // @ts-ignore
          role: role,
      } catch (e) {
        reject(Error("generate signature rejected"));

  // @ts-ignore
  function startMeeting(signature: any) {
    // @ts-ignore
    document.getElementById("zmmtg-root").style.display = "block";
      leaveUrl: leaveUrl,
      success: (success: any) => {

          signature: signature,
          meetingNumber: meetingNumber,
          userName: userName,
          apiKey: apiKey,
          userEmail: userEmail,
          passWord: passWord,
          tk: registrantToken,
          success: (success: any) => {
          error: (error: any) => {
      error: (error: any) => {

  return (
        <h1>Zoom Meeting SDK Sample React</h1>
        <button onClick={getSignature}>Join Meeting</button>

export default Zoomcompo;

Hi @leewonhyo
Are you still experiencing this issue?
So you can not leave the meeting when clicking the “Leave” button?

yes it keeps happening.
Leave button and view button do not work.

The rest of the functions work fine.

You can also view the gallery.

Why does nothing happen when I click the leave button?
Maybe it should change to true when the button is pressed, but it seems to keep getting false. please solve

I imported this as a component to use in the next environment. Is the problem caused by this method?
But I can’t think of any other good way other than this one.
It’s not that all of the functions don’t work, only the exit button doesn’t work, so I don’t know more. please let me know

import React from "react";
// import { ZoomMtg } from "@zoomus/websdk";
import dynamic from "next/dynamic";
import Headinfo from "../../components/Headinfo";
import Head from "next/head";
// @ts-ignore
const Zoomcompo = dynamic((): any => import("../../components/zoomcompo"), {
  ssr: false,

const Zoom = () => {
  return (
      <Zoomcompo />

export default Zoom;

any error message in the console?

Thanks for sharing more details, as @j.schoenemeyer asked, are you seeing any error messages on your console?

As you can see, no console error occurs. But still the exit button doesn’t work.

what did’t work exactly

here you can see, what happens normaly

are you shure, your leave url is correct?

var leaveUrl = "/class/classList";

I use as leave url a ‘real’ html url

leaveUrl: “zoomPrepare.html?ready=true”

I have this issue too.

Are you fixed it?

Haven’t found a way yet…

thank you I’ll give it a try and let you know later. Thanks for continuing to help.

I got this error when trying in my local environment. Why?

원효님 한국분이셨군요 저는 원인을 찾았습니다…ㅋㅋ 원인 찾으셨어요?

아고 안녕하세요 ㅎㅎ 원인을 찾지 못했어요… 혹시 원인좀 알수있을까요…? ㅠ


나가기 버튼을 누르면 바로 나가지는줄 알았는데 그 위에 div가 하나 더 생기더라구요.

근데 앱 전체 div에 overflow: inherit을 걸어놨더니 저게 안보였던거였어요 저는.

그래서 div에 overflow: visible로 바꿔주니까 생기더라구요.

혹시나 저랑 같은 현상이시면 한번 크롬에서 요소 확인해보시면 될 것 같아요.

아고 감사합니다… 한번 도전해볼게요. 친절하게 알려주셔서 감사합니다!!

When the exit button is pressed, the value should change to true, but remains false.
For what reason? Video attached.

@leewonhyo , @sd30414 ,

How are you importing the meeting SDK locally or CDN? I’ve encountered this issue as well and found I was able to get the button working when using the CDN.

Install from CDN

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