# Does the ComponentView's join() method have to wait with await?

**URL:** <https://devforum.zoom.us/t/does-the-componentviews-join-method-have-to-wait-with-await/61830>\
**Category:** Web\
**Tags:** faq\
**Created:** [December 23, 2021, 6:48pm UTC](https://devforum.zoom.us/t/does-the-componentviews-join-method-have-to-wait-with-await/61830 "2021-12-23T18:48:51Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![daichi.kakimoto](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/daichi.kakimoto/32/33560_2.png) [@daichi.kakimoto](https://devforum.zoom.us/u/daichi.kakimoto)\
**Post date:** [December 23, 2021, 6:48pm UTC](https://devforum.zoom.us/t/does-the-componentviews-join-method-have-to-wait-with-await/61830/1 "2021-12-23T18:48:51Z")

</div>

**Description**  
The reference states that the join () method requires the success parameter.  
But after joining the meeting, the success function is not processed.

[Reference](https://marketplacefront.zoom.us/sdk/meeting/web/components/modules/EmbeddedClient.html#join)

In the `zoom-meeting-embedded-2.1.1.min.js` source code, the join () method was defined as async.  
(screen shot)

 ![screen](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/d/4/d4e97c446ffb2a5deec5ee10f549889311aead87.png)

**Which Web Meeting SDK version?**  
2.1.1

**Meeting SDK Code Snippets**  
bad code

```auto
client.join({
          apiKey: meetingConfig.apiKey,
          signature: signature,
          meetingNumber: meetingConfig.meetingNumber,
          password: meetingConfig.passWord,
          userName: meetingConfig.userName,
          
          success: function (res) {
            console.log("join meeting success");
          },
          error: function (res) {
            console.log(res);
          },
        });

```

success code

```auto
 await client.join({
  apiKey: meetingConfig.apiKey,
  signature: signature,
  meetingNumber: meetingConfig.meetingNumber,
  password: meetingConfig.passWord,
  userName: meetingConfig.userName,   
});

console.log("join meeting success");

```

---

<div class="post-metadata">

**Author:** ![MaxM](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/maxm/32/42303_2.png) [@MaxM](https://devforum.zoom.us/u/MaxM)\
**Post date:** [January 3, 2022, 10:18pm UTC](https://devforum.zoom.us/t/does-the-componentviews-join-method-have-to-wait-with-await/61830/2 "2022-01-03T22:18:37Z")

</div>

Hey @daichi.kakimoto,

Thank you for reaching out to the Zoom Developer Forum. I haven’t seen this behavior just yet. Does this happen even using the [Sample Web App](https://github.com/zoom/sample-app-web)? I’m wondering if there is a change to the implementation that will fix this.

Thanks,  
Max

---

<div class="post-metadata">

**Author:** ![daichi.kakimoto](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/daichi.kakimoto/32/33560_2.png) [@daichi.kakimoto](https://devforum.zoom.us/u/daichi.kakimoto)\
**Post date:** [January 7, 2022, 2:09am UTC](https://devforum.zoom.us/t/does-the-componentviews-join-method-have-to-wait-with-await/61830/3 "2022-01-07T02:09:31Z")

</div>

Hey MaxM,

I tried using the sample Web App.

The source code below is the sample WebApp SourceCode.

```auto
          apiKey: meetingConfig.apiKey,
          signature: signature,
          meetingNumber: meetingConfig.meetingNumber,
          password: meetingConfig.passWord,
          userName: meetingConfig.userName,
          
          success: function (res) {
            console.log("join meeting success");
          },
          error: function (res) {
            console.log(res);
          },
        });

```

The log “join meeting success” was not displayed.

Thanks,  
Daichi Kakimoto.

---

<div class="post-metadata">

**Author:** ![MaxM](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/maxm/32/42303_2.png) [@MaxM](https://devforum.zoom.us/u/MaxM)\
**Post date:** [January 14, 2022, 9:45pm UTC](https://devforum.zoom.us/t/does-the-componentviews-join-method-have-to-wait-with-await/61830/4 "2022-01-14T21:45:27Z")

</div>

Hey @daichi.kakimoto,

Thanks for following up on this. I tested with version 2.1.1 of the [Web SDK](https://marketplace.zoom.us/docs/sdk/native-sdks/web#zoom-web-sdk) using the [Sample Web App](https://github.com/zoom/sample-app-web) but wasn’t able to see this same issue:

 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/d/2/d2c8325187b8bf791f48b0aaac484af87b19a3a6.png)

Here’s the init function that was being used from the sample:

```javascript
ZoomMtg.init({
    debug: false,
    leaveUrl: meetingConfig.leaveUrl,
    disableCORP: !window.crossOriginIsolated, // default true
    // disablePreview: false, // default false
    success: function () {
      console.log(meetingConfig);
      console.log("signature", signature);
      ZoomMtg.i18n.load(meetingConfig.lang);
      ZoomMtg.i18n.reload(meetingConfig.lang);
      ZoomMtg.join({
        meetingNumber: meetingConfig.meetingNumber,
        userName: meetingConfig.userName,
        signature: signature,
        apiKey: meetingConfig.apiKey,
        userEmail: meetingConfig.userEmail,
        passWord: meetingConfig.passWord,
        success: function (res) {
          console.log("join meeting success");
          console.log("get attendeelist");
          ZoomMtg.getAttendeeslist({});
          ZoomMtg.getCurrentUser({
            success: function (res) {
              console.log("success getCurrentUser", res.result.currentUser);
            },
          });
        },
        error: function (res) {
          console.log(res);
        },
      });
    },
    error: function (res) {
      console.log(res);
    },
  });

```

If you call join() from the success callback of init() you shouldn’t need to use `await` and the messages should appear.

Let me know if that helps.

Thanks,  
Max

---

<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:** [February 14, 2022, 7:46am UTC](https://devforum.zoom.us/t/does-the-componentviews-join-method-have-to-wait-with-await/61830/5 "2022-02-14T07:46:09Z")

</div>

Closed on February 14, 2022, 7:46am UTC

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