# Component View, Host can't create new meeting after "End Meeting for All"

**URL:** <https://devforum.zoom.us/t/component-view-host-cant-create-new-meeting-after-end-meeting-for-all/83600>\
**Category:** Web\
**Tags:** api\
**Created:** [February 23, 2023, 12:27am UTC](https://devforum.zoom.us/t/component-view-host-cant-create-new-meeting-after-end-meeting-for-all/83600 "2023-02-23T00:27:14Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![abarras](https://avatars.discourse-cdn.com/v4/letter/a/e99b99/32.png) [@abarras](https://devforum.zoom.us/u/abarras)\
**Post date:** [February 23, 2023, 12:27am UTC](https://devforum.zoom.us/t/component-view-host-cant-create-new-meeting-after-end-meeting-for-all/83600/1 "2023-02-23T00:27:14Z")

</div>

Continuing the discussion from [Can't rejoin a webinar using Component View in React App](https://devforum.zoom.us/t/cant-rejoin-a-webinar-using-component-view-in-react-app/68505):

* * *

**Description**  
My Zoom Component View WebSDK, can successfully create & join meetings. Upon Creating a meeting and leaving by clicking “End Meeting for All”, the host is able to continue to create meetings from Zoom’s API, but Joining the newly created meeting does not possible by the host on the webpage. The Component View window Disappears, and EmbededClient on connection-change event ‘Connected’ is never triggered; Despite no error from the joining process.

Upon leaving any meeting in Component view it throws issue 1; 4 times.  
When creating a second meeting after “End Meeting for All”, no error is throw, but no meeting is joined.  
If a join is attempted again, issue 2 is thrown;

**Browser Console Error**

> [@Can't rejoin a webinar using Component View in React App](https://devforum.zoom.us/t/cant-rejoin-a-webinar-using-component-view-in-react-app/68505/1):
>
> Issue 1.  
> `zoomus-websdk-embedded.umd.min.js:2 Uncaught (in promise) {type: 'IMPROPER_MEETING_STATE', reason: 'closed'}`
> 
> Issue 2  
> {type: ‘INVALID\_OPERATION’, reason: ‘Duplicated join operation’}`

**Which Web Meeting SDK version?**  
v2.6.0  
v2.9.5  
v2.9.7

**Meeting SDK Code Snippets**

How I’m importing zoom’s libraries:

```auto
 <script src="https://source.zoom.us/2.9.5/lib/vendor/react.min.js"></script>
  <script src="https://source.zoom.us/2.9.5/lib/vendor/react-dom.min.js"></script>
  <script src="https://source.zoom.us/2.9.5/lib/vendor/redux.min.js"></script>
  <script src="https://source.zoom.us/2.9.5/lib/vendor/redux-thunk.min.js"></script>
  <script src="https://source.zoom.us/2.9.5/lib/vendor/lodash.min.js"></script>
  <script src="https://source.zoom.us/2.9.5/zoom-meeting-embedded-2.9.5.min.js"></script>

```

How I am joining the meeting (after creating it from Zoom’s API)

```auto
    function JoinMeeting(data) {

      options = {
        sdkKey: data.sdkKey,
        signature: data.signature,
        meetingNumber: data.id,
        password: data.pass,
        userName: data.userName,
        userEmail: data.userEmail,
        tk: data.registrantToken,
        error: () => { console.log('error') }
      };

      console.log(options);
      client.join(options);
    }

```

**To Reproduce(If applicable)**  
Steps to reproduce the behavior:

1. Create meeting with Zoom’s API
2. Join meeting as host
3. leave with “End Meeting for All”
4. Repeat steps 1 & 2

**Troubleshooting Routes**  
The troubleshooting attempt types you’ve already exhausted, including testing with the appropriate sample app (found on [Zoom · GitHub](https://github.com/zoom)).

**Device (please complete the following information):**

- Device: Desktop
- OS: Windows 10
- Browser: Chrome & FireFox
- Browser Version: Chrome - Version 110.0.5481.104 (Official Build) (64-bit)

**Additional context**  
When joining I also get the error:  
Failed to load resource: the server responded with a status of 404 (Not Found)  
[https://rwcdv2.dv.zoom.us/wc/ping/88234295875?ts=1677108565613&auth=b1-MUZcGqswTB3AhycXCU9U8qcAe8uO18AcX-JBtyew&rwcToken=SyDEt0q-qn\_S9UqUn\_x5n4fkIeDAol9WiJhOslKqpwg&dmz=1](https://rwcdv2.dv.zoom.us/wc/ping/88234295875?ts=1677108565613&auth=b1-MUZcGqswTB3AhycXCU9U8qcAe8uO18AcX-JBtyew&rwcToken=SyDEt0q-qn_S9UqUn_x5n4fkIeDAol9WiJhOslKqpwg&dmz=1)

Aswell as never having the Error & Success Callbacks for Client.join() trigger.

These have seemed to be less consequential as the client joins either way.

---

<div class="post-metadata">

**Author:** ![chunsiong.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/chunsiong.zoom/32/35488_2.png) [@chunsiong.zoom](https://devforum.zoom.us/u/chunsiong.zoom)\
**Post date:** [February 23, 2023, 8:42am UTC](https://devforum.zoom.us/t/component-view-host-cant-create-new-meeting-after-end-meeting-for-all/83600/2 "2023-02-23T08:42:07Z")

</div>

Hi @abarras ,

have you tried this sample app?

> **[GitHub - zoom/meetingsdk-javascript-sample: Use the Zoom Meeting SDK in a...](https://github.com/zoom/meetingsdk-javascript-sample)**
>
> Use the Zoom Meeting SDK in a JavaScript App. Contribute to zoom/meetingsdk-javascript-sample development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![abarras](https://avatars.discourse-cdn.com/v4/letter/a/e99b99/32.png) [@abarras](https://devforum.zoom.us/u/abarras)\
**Post date:** [February 23, 2023, 11:18pm UTC](https://devforum.zoom.us/t/component-view-host-cant-create-new-meeting-after-end-meeting-for-all/83600/3 "2023-02-23T23:18:34Z")

</div>

That is where my project started. I have also restarted once more with the sample app’s code.

I’ve made slight modifications,

- Oauth

- Contacting server for Zoom’s API (for creating and returning the meeting password to the client)

- Simplified signature process for testing (see below)

Signature process:

```auto
    function MakeSignature() {

      const iat = Math.round(new Date().getTime() / 1000) - 30;
      const exp = iat + 60 * 60 * 2

      const oHeader = {
        alg: 'HS256',
        typ: 'JWT'
      }

      const oPayload = {
        sdkKey: ' *********',
        mn: meetingNumber,
        role: role,
        iat: iat,
        exp: exp,
        appKey: ' *****************',
        tokenExp: iat + 60 * 60 * 2
      }

      const sHeader = JSON.stringify(oHeader)
      const sPayload = JSON.stringify(oPayload)
      const signature = KJUR.jws.JWS.sign('HS256', sHeader, sPayload, ' *****************')

      return signature;
    }

```

The sdk & app key has of course been replaced.

All to similar effect with the same problem.

---

<div class="post-metadata">

**Author:** ![jmd11](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jmd11/32/17615_2.png) [@jmd11](https://devforum.zoom.us/u/jmd11)\
**Post date:** [February 24, 2023, 1:39pm UTC](https://devforum.zoom.us/t/component-view-host-cant-create-new-meeting-after-end-meeting-for-all/83600/5 "2023-02-24T13:39:10Z")

</div>

Hey

If it is any help my solution was to create a custom end webinar button and use `client.leaveMeeting` instead of `client.endMeeting` . I still see the same issue on 2.9.7 if I use `client.endMeeting` . I hide the zoom component end meeting button.

---

<div class="post-metadata">

**Author:** ![abarras](https://avatars.discourse-cdn.com/v4/letter/a/e99b99/32.png) [@abarras](https://devforum.zoom.us/u/abarras)\
**Post date:** [February 24, 2023, 9:39pm UTC](https://devforum.zoom.us/t/component-view-host-cant-create-new-meeting-after-end-meeting-for-all/83600/6 "2023-02-24T21:39:18Z")

</div>

Thanks Jason.

It feels a little hack-y but it might be the closest solution I’ve come across.  
Through doing this I found it nessesary to use some creative CSS, differing for both Guests & Hosts, which requires me switching out the style sheet depending on the state of the SDK.

An example: (host.css)

```auto
button[class^='zmwebsdk-makeStyles-danger'], button[class*=' zmwebsdk-makeStyles-danger']{
    visibility: hidden;
}

button[class^='zmwebsdk-makeStyles-default'], button[class*=' zmwebsdk-makeStyles-default']{
    margin-top: -15px;
}

.zmwebsdk-MuiPaper-root.zmwebsdk-makeStyles-paper-65.zmwebsdk-MuiPaper-elevation1.zmwebsdk-MuiPaper-rounded{
    height: 50px;
}

```

Result:  
 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/7/6/764cc04c7ff452351239d73d73d88e2ad3e1f317.png)

Is there a more elegant way to keep its default method to leave, while removing the endMeeting button?  
What was your process?

---

<div class="post-metadata">

**Author:** ![jmd11](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jmd11/32/17615_2.png) [@jmd11](https://devforum.zoom.us/u/jmd11)\
**Post date:** [February 25, 2023, 9:39am UTC](https://devforum.zoom.us/t/component-view-host-cant-create-new-meeting-after-end-meeting-for-all/83600/7 "2023-02-25T09:39:01Z")

</div>

Yeah it’s a bit hacky for sure but its the only thing I could come up with to avoid a refresh. I removed the red button altogether so users will need to use the custom button. That was ok for my use case but maybe you need to show the red hangup button for leaving meetings

this removes the red button for me

```auto
div[class^='zmwebsdk-makeStyles-container'] {
  display: none !important;
}

```

and then when i initialize zoom i add the custom button

```auto
 toolbar: {
   buttons: [
     {
        text: 'End Lesson',
        onClick: client.leaveMeeting
      },
    ],
}

```

---

<div class="post-metadata">

**Author:** ![abarras](https://avatars.discourse-cdn.com/v4/letter/a/e99b99/32.png) [@abarras](https://devforum.zoom.us/u/abarras)\
**Post date:** [February 28, 2023, 11:40pm UTC](https://devforum.zoom.us/t/component-view-host-cant-create-new-meeting-after-end-meeting-for-all/83600/8 "2023-02-28T23:40:28Z")

</div>

Thanks for the suggestion, I implementing a similar solution to you.

In the meantime I’ve also found a work around for the issue, for those who might still need the functionality of “End Meeting for All” without shutting down the Component SDK’s ability to start meetings.

Using Zoom’s API with Oauth, You can List the user’s ongoing live meetings, and update their state to ended. (essentially “End Meeting for All”)

[https://marketplace.zoom.us/docs/api-reference/zoom-api/methods/#operation/meetings](https://marketplace.zoom.us/docs/api-reference/zoom-api/methods/#operation/meetings)  
[https://marketplace.zoom.us/docs/api-reference/zoom-api/methods/#operation/meetingStatus](https://marketplace.zoom.us/docs/api-reference/zoom-api/methods/#operation/meetingStatus)

Through implementing the custom buttons and adequate usage of their API, you can essentially recreate the functionality without the issues, from my tests thus far.

More work on the developer, but its something.

---

<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:** [March 31, 2023, 9:40am UTC](https://devforum.zoom.us/t/component-view-host-cant-create-new-meeting-after-end-meeting-for-all/83600/9 "2023-03-31T09:40:39Z")

</div>

Closed on March 31, 2023, 9:40am UTC

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