# Zoom web sdk leave button not working

**URL:** <https://devforum.zoom.us/t/zoom-web-sdk-leave-button-not-working/72542>\
**Category:** Web\
**Created:** [July 20, 2022, 7:38am UTC](https://devforum.zoom.us/t/zoom-web-sdk-leave-button-not-working/72542 "2022-07-20T07:38:36Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![leewonhyo](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/leewonhyo/32/39517_2.png) [@leewonhyo](https://devforum.zoom.us/u/leewonhyo)\
**Post date:** [July 20, 2022, 7:38am UTC](https://devforum.zoom.us/t/zoom-web-sdk-leave-button-not-working/72542/1 "2022-07-20T07:38:36Z")

</div>

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.

```auto
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");
    ZoomMtg.preLoadWasm();
    ZoomMtg.prepareWebSDK();
    // loads language files, also passes any error messages to the ui
    ZoomMtg.i18n.load("ko-KO");
    ZoomMtg.i18n.reload("ko-KO");
  }, []);
  const [meetingNumber, setMeetingNumber] = useState<any>(
    Object.keys(router.query)[0].substring(11, 0)
  );
  const [passWord, setPassWord] = useState<any>(
    router.query[Object.keys(router.query)[0]]
  );
  var apiKey = "MYAPIKEY";
  var role = 0;
  var leaveUrl = "/class/classList";
  var userName = "React";
  var userEmail = "";
  var registrantToken = "";

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

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

        ZoomMtg.join({
          signature: signature,
          meetingNumber: meetingNumber,
          userName: userName,
          apiKey: apiKey,
          userEmail: userEmail,
          passWord: passWord,
          tk: registrantToken,
          success: (success: any) => {
            console.log(success);
          },
          error: (error: any) => {
            console.log(error);
          },
        });
      },
      error: (error: any) => {
        console.log(error);
      },
    });
  }

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

export default Zoomcompo;

```

---

<div class="post-metadata">

**Author:** ![elisa.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/elisa.zoom/32/47836_2.png) [@elisa.zoom](https://devforum.zoom.us/u/elisa.zoom)\
**Post date:** [July 20, 2022, 10:07pm UTC](https://devforum.zoom.us/t/zoom-web-sdk-leave-button-not-working/72542/2 "2022-07-20T22:07:10Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![leewonhyo](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/leewonhyo/32/39517_2.png) [@leewonhyo](https://devforum.zoom.us/u/leewonhyo)\
**Post date:** [July 21, 2022, 12:01am UTC](https://devforum.zoom.us/t/zoom-web-sdk-leave-button-not-working/72542/3 "2022-07-21T00:01:42Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![leewonhyo](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/leewonhyo/32/39517_2.png) [@leewonhyo](https://devforum.zoom.us/u/leewonhyo)\
**Post date:** [July 21, 2022, 7:28am UTC](https://devforum.zoom.us/t/zoom-web-sdk-leave-button-not-working/72542/4 "2022-07-21T07:28:25Z")

</div>

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

```auto
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 (
    <>
      <Head>
        <link
          rel="stylesheet"
          href="https://source.zoom.us/2.5.0/css/bootstrap.css"
        />
        <link
          rel="stylesheet"
          href="https://source.zoom.us/2.5.0/css/react-select.css"
        />
      </Head>
      <Zoomcompo />
    </>
  );
};

export default Zoom;

```

---

<div class="post-metadata">

**Author:** ![j.schoenemeyer](https://avatars.discourse-cdn.com/v4/letter/j/f9ae1b/32.png) [@j.schoenemeyer](https://devforum.zoom.us/u/j.schoenemeyer)\
**Post date:** [July 21, 2022, 11:37am UTC](https://devforum.zoom.us/t/zoom-web-sdk-leave-button-not-working/72542/5 "2022-07-21T11:37:05Z")

</div>

any error message in the console?

---

<div class="post-metadata">

**Author:** ![elisa.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/elisa.zoom/32/47836_2.png) [@elisa.zoom](https://devforum.zoom.us/u/elisa.zoom)\
**Post date:** [July 21, 2022, 6:26pm UTC](https://devforum.zoom.us/t/zoom-web-sdk-leave-button-not-working/72542/6 "2022-07-21T18:26:09Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![leewonhyo](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/leewonhyo/32/39517_2.png) [@leewonhyo](https://devforum.zoom.us/u/leewonhyo)\
**Post date:** [July 22, 2022, 1:41am UTC](https://devforum.zoom.us/t/zoom-web-sdk-leave-button-not-working/72542/7 "2022-07-22T01:41:11Z")

</div>

![스크린샷 2022-07-22 오전 10.39.58](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/9/3/93298211a8ce6c1d4f97e6737864caf2f3ae5e94.png)

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

---

<div class="post-metadata">

**Author:** ![j.schoenemeyer](https://avatars.discourse-cdn.com/v4/letter/j/f9ae1b/32.png) [@j.schoenemeyer](https://devforum.zoom.us/u/j.schoenemeyer)\
**Post date:** [July 22, 2022, 7:08am UTC](https://devforum.zoom.us/t/zoom-web-sdk-leave-button-not-working/72542/8 "2022-07-22T07:08:13Z")

</div>

what did’t work exactly

here you can see, what happens normaly

> **[Zoom web api - leave meeting](https://360.articulate.com/review/content/9e9c244a-0545-4ec5-9ccd-389b713e753d/review)**

are you shure, your leave url is correct?

```auto
var leaveUrl = "/class/classList";

```

I use as leave url a ‘real’ html url

> leaveUrl: “zoomPrepare.html?ready=true”

---

<div class="post-metadata">

**Author:** ![sd30414](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/sd30414/32/39529_2.png) [@sd30414](https://devforum.zoom.us/u/sd30414)\
**Post date:** [July 22, 2022, 10:52pm UTC](https://devforum.zoom.us/t/zoom-web-sdk-leave-button-not-working/72542/9 "2022-07-22T22:52:31Z")

</div>

I have this issue too.

Are you fixed it?

---

<div class="post-metadata">

**Author:** ![leewonhyo](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/leewonhyo/32/39517_2.png) [@leewonhyo](https://devforum.zoom.us/u/leewonhyo)\
**Post date:** [July 23, 2022, 7:16am UTC](https://devforum.zoom.us/t/zoom-web-sdk-leave-button-not-working/72542/10 "2022-07-23T07:16:00Z")

</div>

Haven’t found a way yet…

---

<div class="post-metadata">

**Author:** ![leewonhyo](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/leewonhyo/32/39517_2.png) [@leewonhyo](https://devforum.zoom.us/u/leewonhyo)\
**Post date:** [July 23, 2022, 7:16am UTC](https://devforum.zoom.us/t/zoom-web-sdk-leave-button-not-working/72542/11 "2022-07-23T07:16:47Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![leewonhyo](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/leewonhyo/32/39517_2.png) [@leewonhyo](https://devforum.zoom.us/u/leewonhyo)\
**Post date:** [July 23, 2022, 7:18am UTC](https://devforum.zoom.us/t/zoom-web-sdk-leave-button-not-working/72542/12 "2022-07-23T07:18:56Z")

</div>

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

 ![스크린샷 2022-07-23 오후 3.44.10](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/e/7/e75617d6156018a6b1de7b663c13fe7045b20ff7.jpeg)

---

<div class="post-metadata">

**Author:** ![sd30414](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/sd30414/32/39529_2.png) [@sd30414](https://devforum.zoom.us/u/sd30414)\
**Post date:** [July 24, 2022, 11:47am UTC](https://devforum.zoom.us/t/zoom-web-sdk-leave-button-not-working/72542/14 "2022-07-24T11:47:27Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![leewonhyo](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/leewonhyo/32/39517_2.png) [@leewonhyo](https://devforum.zoom.us/u/leewonhyo)\
**Post date:** [July 24, 2022, 12:09pm UTC](https://devforum.zoom.us/t/zoom-web-sdk-leave-button-not-working/72542/15 "2022-07-24T12:09:50Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![sd30414](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/sd30414/32/39529_2.png) [@sd30414](https://devforum.zoom.us/u/sd30414)\
**Post date:** [July 24, 2022, 12:15pm UTC](https://devforum.zoom.us/t/zoom-web-sdk-leave-button-not-working/72542/16 "2022-07-24T12:15:29Z")

</div>

![dd](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/4/3/43bbc07770c0c8dced911bf2d155630622952af1.png)

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

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

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

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

---

<div class="post-metadata">

**Author:** ![leewonhyo](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/leewonhyo/32/39517_2.png) [@leewonhyo](https://devforum.zoom.us/u/leewonhyo)\
**Post date:** [July 24, 2022, 12:17pm UTC](https://devforum.zoom.us/t/zoom-web-sdk-leave-button-not-working/72542/17 "2022-07-24T12:17:13Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![leewonhyo](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/leewonhyo/32/39517_2.png) [@leewonhyo](https://devforum.zoom.us/u/leewonhyo)\
**Post date:** [July 24, 2022, 1:53pm UTC](https://devforum.zoom.us/t/zoom-web-sdk-leave-button-not-working/72542/18 "2022-07-24T13:53:51Z")

</div>

When the exit button is pressed, the value should change to true, but remains false.  
For what reason? Video attached.  
 ![ezgif.com-gif-maker](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/d/6d1210d2ac6275b02f587612c84dbfb8768a6094.gif)

---

<div class="post-metadata">

**Author:** ![donte.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/donte.zoom/32/24412_2.png) [@donte.zoom](https://devforum.zoom.us/u/donte.zoom)\
**Post date:** [August 15, 2022, 5:58pm UTC](https://devforum.zoom.us/t/zoom-web-sdk-leave-button-not-working/72542/19 "2022-08-15T17:58:52Z")

</div>

@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

[https://marketplace.zoom.us/docs/sdk/native-sdks/web/build/#install-from-cdn](https://marketplace.zoom.us/docs/sdk/native-sdks/web/build/#install-from-cdn)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [September 15, 2022, 3:59am UTC](https://devforum.zoom.us/t/zoom-web-sdk-leave-button-not-working/72542/20 "2022-09-15T03:59:37Z")

</div>

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