# Unable to init meeting

**URL:** <https://devforum.zoom.us/t/unable-to-init-meeting/8133>\
**Category:** Web\
**Created:** [February 19, 2020, 3:12pm UTC](https://devforum.zoom.us/t/unable-to-init-meeting/8133 "2020-02-19T15:12:26Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![jvall](https://avatars.discourse-cdn.com/v4/letter/j/e56c9b/32.png) [@jvall](https://devforum.zoom.us/u/jvall)\
**Post date:** [February 19, 2020, 3:12pm UTC](https://devforum.zoom.us/t/unable-to-init-meeting/8133/1 "2020-02-19T15:12:26Z")

</div>

**Description**  
I’m experiencing the same issue as [this post](https://devforum.zoom.us/t/can-t-init-meeting/7948), where after generateSignature() is called and returns a signature, init() runs but calls neither success() nor error(); nothing happens.

**Error**  
There is no error that outputs. When I set debug: true in the init config object, this prints in the console:

```
audioPanelAlwaysOpen: false
debug: true
disableCallOut: false
disableInvite: false
disableJoinAudio: undefined
disableRecord: false
leaveUrl: "http://localhost:3000/dossier"
showMeetingHeader: true

```

**Which version?**  
1.7.0

All on latest Firefox and Chrome versions

**Code**  
Since this is proprietary software, I can’t post the full source code, but can post snippets. I’m working in a react application and in my index file, I do the following:

```
import '@zoomus/websdk/dist/css/bootstrap.css';
import '@zoomus/websdk/dist/css/react-select.css';
import { ZoomMtg } from '@zoomus/websdk';

```

Here’s the code I define in a class elsewhere

```
generateSignature = () => {
        return new Promise((resolve, reject) => {
            ZoomMtg.generateSignature({
                meetingNumber: xxxxxxxxxx, // normally an int of the meeting ID
                apiKey: zoomSdkLaunchKey(),
                apiSecret: zoomSdkLaunchSecretKey(),
                role: 0,
                success(res) {
                    resolve(res.result);
                },
                error(err) {
                    reject(err);
                }
            });
        });
    }

    initMeeting = (signature) => {
        return new Promise((resolve, reject) => {
            ZoomMtg.init({
                debug: true,
                leaveUrl: 'http://localhost:3000/post-meeting-page',
                isSupportAV: true,
                success() {
                    resolve(signature);
                },
                error(res) {
                    reject(res);
                }
            });
        });
    };

    joinMeeting = (signature) => {
        return new Promise((resolve, reject) => {
            ZoomMtg.join(
                {
                    meetingNumber: xxxxxxxxxx,
                    userName: 'John',
                    signature,
                    apiKey: zoomSdkLaunchKey(),
                    userEmail: 'john@example.com',
                    success() {
                        resolve();
                    },
                    error(res) {
                        reject(res);
                    }
                }
            );
        });
    }

```

I call those methods via the following:

```
zoomService.generateSignature()
      .then(res => zoomService.initMeeting(res))
      .then(res => zoomService.joinMeeting(res))
      .then(res => {
        $('#zmmtg-root').show();
      }).catch(err => {
        console.log(err);
      });

```

The reason for that last `$('#zmmtg-root').show();` is because I hide it in index.js initially:

`$("#zmmtg-root").hide();`

Just so the rest of the rendered UI can be visible.

**Additional notes**  
I’ve tried my API key/secret in the sample app and used a valid meeting ID and it did launch the client successfully. I’m stumped as to why this isn’t working. I didn’t include any additional tags or ones in my index.html file; I simply following the guide by including an `import { ZoomMtg } from '@zoomus/websdk';` at index.js

Assistance would be greatly appreciated.

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [February 19, 2020, 7:34pm UTC](https://devforum.zoom.us/t/unable-to-init-meeting/8133/2 "2020-02-19T19:34:58Z")

</div>

Hey @jvall,

Can you try passing in a param for the `success` function on the `ZoomMtg.init` function and see if you get a response:

```auto
initMeeting = (signature) => {
        return new Promise((resolve, reject) => {
            ZoomMtg.init({
                debug: true,
                leaveUrl: 'http://localhost:3000/post-meeting-page',
                isSupportAV: true,
                success(data) {
                    console.log(data)
                    resolve(signature);
                },
                error(res) {
                    reject(res);
                }
            });
        });
    };

```

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![jvall](https://avatars.discourse-cdn.com/v4/letter/j/e56c9b/32.png) [@jvall](https://devforum.zoom.us/u/jvall)\
**Post date:** [February 19, 2020, 7:47pm UTC](https://devforum.zoom.us/t/unable-to-init-meeting/8133/3 "2020-02-19T19:47:14Z")

</div>

Thanks for the reply @tommy, unfortunately I didn’t get a response with the code sample you provided. Same result as before.

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [February 19, 2020, 7:48pm UTC](https://devforum.zoom.us/t/unable-to-init-meeting/8133/4 "2020-02-19T19:48:38Z")

</div>

Hey @jvall,

Can you confirm the init function is being called?

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![jvall](https://avatars.discourse-cdn.com/v4/letter/j/e56c9b/32.png) [@jvall](https://devforum.zoom.us/u/jvall)\
**Post date:** [February 19, 2020, 8:01pm UTC](https://devforum.zoom.us/t/unable-to-init-meeting/8133/5 "2020-02-19T20:01:27Z")

</div>

@tommy yes, I set breakpoints and can confirm init() is being called.

I tried unminifying as much of the Zoom SDK as I could and even stepped into its init() function. It’s definitely being called but it’s still hard to make sense of it since the source is pretty blackboxed.

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [February 19, 2020, 8:07pm UTC](https://devforum.zoom.us/t/unable-to-init-meeting/8133/6 "2020-02-19T20:07:37Z")

</div>

Hey @jvall,

I wonder if the promise chain is messing things up. Can you implement the Init and Join functions similar to the [Sample App](https://github.com/zoom/sample-app-web/blob/master/Local/js/index.js#L36)?

```auto
ZoomMtg.init({
  debug: true,
  leaveUrl: 'http://localhost:3000/post-meeting-page',
  isSupportAV: true,
  success() {
    ZoomMtg.join({
      meetingNumber: xxxxxxxxxx,
      userName: 'John',
      signature,
      apiKey: zoomSdkLaunchKey(),
      userEmail: 'john@example.com',
      success() {
        resolve();
      },
      error(res) {
        reject(res);
      }
    });
  },
  error(res) {
    reject(res);
  }
});

```

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![jvall](https://avatars.discourse-cdn.com/v4/letter/j/e56c9b/32.png) [@jvall](https://devforum.zoom.us/u/jvall)\
**Post date:** [February 19, 2020, 8:14pm UTC](https://devforum.zoom.us/t/unable-to-init-meeting/8133/7 "2020-02-19T20:14:24Z")

</div>

Still the same result. I copy-and-pasted the nested-style code from the sample app and init still doesn’t hit the breakpoints on success or error.

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [February 19, 2020, 10:01pm UTC](https://devforum.zoom.us/t/unable-to-init-meeting/8133/8 "2020-02-19T22:01:11Z")

</div>

Hey @jvall,

Try adding these following lines after importing `ZoomMtg`:

```auto
ZoomMtg.preLoadWasm();
ZoomMtg.prepareJssdk();

```

> <https://github.com/zoom/sample-app-web/blob/master/Local/js/index.js#L10>

And here is the a sample react Web SDK app:

> <https://github.com/michaeldharrington/zoom-web-generate-signature/blob/master/src/App.js>

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![qiumeihui](https://avatars.discourse-cdn.com/v4/letter/q/9fc29f/32.png) [@qiumeihui](https://devforum.zoom.us/u/qiumeihui)\
**Post date:** [March 6, 2020, 8:28am UTC](https://devforum.zoom.us/t/unable-to-init-meeting/8133/9 "2020-03-06T08:28:26Z")

</div>

Hi, jvall. Did you find any resolution to this? I’m experiencing the same issue in a React app I’m working on. Hope your help

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [March 6, 2020, 5:25pm UTC](https://devforum.zoom.us/t/unable-to-init-meeting/8133/10 "2020-03-06T17:25:14Z")

</div>

Hey @qiumeihui,

Please provide more details about your issue.

Make sure to include the following lines:

```auto
ZoomMtg.preLoadWasm();
ZoomMtg.prepareJssdk();

```

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![jvall](https://avatars.discourse-cdn.com/v4/letter/j/e56c9b/32.png) [@jvall](https://devforum.zoom.us/u/jvall)\
**Post date:** [March 6, 2020, 5:40pm UTC](https://devforum.zoom.us/t/unable-to-init-meeting/8133/11 "2020-03-06T17:40:14Z")

</div>

What ended up solving it was calling those two lines that Tommy posted and then including all of the required assets via the CDN

The information contained in this E-mail message and its attachments is privileged and/or confidential, and may be protected from disclosure. Please be aware that any other use, printing, copying, disclosure or dissemination of this communication may be subject  
to legal restriction or sanction.

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [March 6, 2020, 5:46pm UTC](https://devforum.zoom.us/t/unable-to-init-meeting/8133/12 "2020-03-06T17:46:17Z")

</div>

Hey @jvall,

Glad using the CDN solved the issue! 🙂

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![qiumeihui](https://avatars.discourse-cdn.com/v4/letter/q/9fc29f/32.png) [@qiumeihui](https://devforum.zoom.us/u/qiumeihui)\
**Post date:** [March 8, 2020, 8:27am UTC](https://devforum.zoom.us/t/unable-to-init-meeting/8133/14 "2020-03-08T08:27:09Z")

</div>

Hey @tommy.  
I’m sure use the following lines:

```auto
ZoomMtg.preLoadWasm();
ZoomMtg.prepareJssdk();
ZoomMtg.setZoomJSLib('https://jssdk.zoomus.cn/1.7.0/lib', '/av');

```

But When the function `ZoomMtg.init()` executes, it directly jumps out and there are no errors here. I want to know what causes the init function to jump out.

Thanks,  
Qiumeihui

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [March 9, 2020, 3:58pm UTC](https://devforum.zoom.us/t/unable-to-init-meeting/8133/15 "2020-03-09T15:58:09Z")

</div>

Hey @qiumeihui,

Are there any errors in the browser console?

Can you try having the `setZoomJSLib` function first?

```auto
ZoomMtg.setZoomJSLib('https://jssdk.zoomus.cn/1.7.0/lib', '/av');
ZoomMtg.preLoadWasm();
ZoomMtg.prepareJssdk();

```

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![qiumeihui](https://avatars.discourse-cdn.com/v4/letter/q/9fc29f/32.png) [@qiumeihui](https://devforum.zoom.us/u/qiumeihui)\
**Post date:** [March 10, 2020, 5:37am UTC](https://devforum.zoom.us/t/unable-to-init-meeting/8133/16 "2020-03-10T05:37:20Z")

</div>

@tommy Hey tommy.  
I find a strange phenomenon here.  
I used Web SDK in React.

```auto
  openLive() {
        ZoomMtg.setZoomJSLib('https://jssdk.zoomus.cn/1.7.0/lib', '/av');
        ZoomMtg.preLoadWasm();
        ZoomMtg.prepareJssdk();
        // chinese
        $.i18n.reload('zh-CN');

        const meetConfigs = {
            apiKey: API_KEY,
            apiSecret: API_SECRET,
            meetingNumber:,
            role: 0, // 0 to join the meeting, 1 to start the meeting
            leaveUrl: '', 
            userName: 'test WebSDK', 
        };

        const signature = ZoomMtg.generateSignature({
            meetingNumber: meetConfigs.meetingNumber,
            apiKey: meetConfigs.apiKey,
            apiSecret: meetConfigs.apiSecret,
            role: meetConfigs.role,
            success(res) {
                console.log(res.result);
            },
        });

        ZoomMtg.init({
            debug: true, // optional
            leaveUrl: '', // required
            isSupportAV: true, // optional,
            success: () => {
                console.log('init success！！！！');
                ZoomMtg.join({
                    signature,
                    meetingNumber: meetConfigs.meetingNumber,
                    userName: meetConfigs.userName,
                    userEmail: '',
                    passWord: '',
                    apiKey: meetConfigs.apiKey,
                    success(res) {
                        console.log(res);
                    },
                    error: error => {
                        console.log(error);
                    },
                });
            },
            error: error => {
                console.log(error);
            },
        });
    }

```

When I use the code in the `componentDidMount` method of some components, the init method can execute normally and successfully join the meeting, but when used in the componentDidMount method of some components, the init method will directly jump It has been executed and no errors are printed. I want to know if this good and bad phenomenon is related to the execution time node of `componentDidMount` and the loading order of the dependency js library of the Web SDK

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [March 10, 2020, 4:07pm UTC](https://devforum.zoom.us/t/unable-to-init-meeting/8133/17 "2020-03-10T16:07:43Z")

</div>

Hey @qiumeihui,

> [@qiumeihui](#):
>
> When I use the code in the `componentDidMount` method of some components, the init method can execute normally and successfully join the meeting, but when used in the componentDidMount method of some components

Did you mean to say a different method? What is the difference between the two scenarios?

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![qiumeihui](https://avatars.discourse-cdn.com/v4/letter/q/9fc29f/32.png) [@qiumeihui](https://devforum.zoom.us/u/qiumeihui)\
**Post date:** [March 12, 2020, 10:31am UTC](https://devforum.zoom.us/t/unable-to-init-meeting/8133/18 "2020-03-12T10:31:29Z")

</div>

Hey @tommy.  
In React, I used the `Zoomtg.init` method in `componentDidmount` of different components, but some of them succeeded and some failed. I don’t know if this is related to the order of the React life cycle mount.

Thanks,  
Qiumeihui

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [March 12, 2020, 6:20pm UTC](https://devforum.zoom.us/t/unable-to-init-meeting/8133/19 "2020-03-12T18:20:12Z")

</div>

Hey @qiumeihui,

I am guessing this is due to the Zoommtg.init being called before the resources load.

Maybe add a few second timeout to see if that fixes the issue.

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![qiumeihui](https://avatars.discourse-cdn.com/v4/letter/q/9fc29f/32.png) [@qiumeihui](https://devforum.zoom.us/u/qiumeihui)\
**Post date:** [March 13, 2020, 3:01am UTC](https://devforum.zoom.us/t/unable-to-init-meeting/8133/20 "2020-03-13T03:01:45Z")

</div>

Hey @tommy .  
I put the `Zoomtg.init` method in `setTimeout`, it working now.  
Thank you very much for your suggestions. 😁

Thanks,  
Qiumeihui

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [March 13, 2020, 4:13pm UTC](https://devforum.zoom.us/t/unable-to-init-meeting/8133/21 "2020-03-13T16:13:27Z")

</div>

Glad that worked! 🙂

Happy to help!

Thanks,  
Tommy

[Next page](https://devforum.zoom.us/t/unable-to-init-meeting/8133.md?page=2)
