errorCode: 3008, errorMessage: "Please init meeting first!"

I tried using the zoomus-jssdk package in my app and use the demo code shown in tutorials.

import React, { Component } from 'react';
import { ZoomMtg } from 'zoomus-jssdk';

const API_KEY = '<API_KEY>';
const API_SECRET = '<API_SECRET>';

ZoomMtg.setZoomJSLib('https://dmogdx0jrul3u.cloudfront.net/1.4.2/lib', '/av');
ZoomMtg.preLoadWasm();
ZoomMtg.prepareJssdk();

export default class ZoomLive extends Component {
  componentDidMount() {
    const meetConfig = {
      apiKey: API_KEY,
      apiSecret: API_SECRET,
      meetingNumber: 1234567890,
      userName: 'Test user',
      passWord: '',
      leaveUrl: 'https://zoom.us',
      role: 0
    };

    ZoomMtg.generateSignature({
      meetingNumber: meetConfig.meetingNumber,
      apiKey: meetConfig.apiKey,
      apiSecret: meetConfig.apiSecret,
      role: meetConfig.role,
      success(res) {
        console.log('signature', res.result);
        ZoomMtg.init({
          leaveUrl: 'http://www.zoom.us',
          isSupportAV: true,
          success() {
            ZoomMtg.join({
              meetingNumber: meetConfig.meetingNumber,
              userName: meetConfig.userName,
              signature: res.result,
              apiKey: meetConfig.apiKey,
              userEmail: 'email@gmail.com',
              passWord: meetConfig.passWord,
              success() {
                console.log('join meeting success');
              },
              error(res) {
                console.log(res);
              }
            });
          },
          error(res) {
            console.log(res);
          }
        });
      }
    });
  }

  render() {
    return 'Loading';
  }
}

But keep getting error in ZoomMtg.join function. I tried the same api keys and secret in sample-web-app here (https://github.com/zoom/sample-app-web) and that seemed to work, so there doesn’t seem to be issue with my account configuration. As the code is minified I’m not able to debug much, but seems like the meeting status of object is set to empty here: if ('init' !== oe.currentMeetingInfo.status).

Hey @shahankit2313,

Are you init-ing the meeting first? Check out this: https://zoom.github.io/sample-app-web/ZoomMtg.html#init

Let me know if that helps

Yup I’m using the exact same code as in sample.

ZoomMtg.generateSignature({
  ...
  success(res) {
    ZoomMtg.init({
      ...
      success() {
        ZoomMtg.join({
          ...
          success() {
            console.log('join meeting success');
          },
          error(res) {
            console.log('join meeting error', res);
          }
        });
      },
      error(res) {
        console.log(res);
      }
    });
  }
});

Hey @shahankit2313

I found the issue,

Place these two lines above your meetConfig declaration

ZoomMtg.preLoadWasm();
ZoomMtg.prepareJssdk();

This should fix the “Please init meeting” error, but it’s possible another error could arise: “The account don’t enable API.” Which we are working on fixing.

Let me know if this fixes the “Please init meeting” error :slight_smile:

Hi @tommy ,

I had already added these two lines, but still getting the error. I updated the post with entire contents of file. Also I don’t think I would get account dont’t enable APIs because I tried scheduling a meeting from my account and use the meeting in the sample web app on github and it worked fine.

Hi @shahankit2313,

I am trying to reproduce your error. I will update you shortly.

Thanks!

@Ojus any updates? I’m still facing this issue.

@shahankit2313, we are working with our engineering team to resolve your issue.

I will respond to you once I get an update from the team. Thank you for the patience and sorry for the inconvenience caused.

Thanks.

1 Like

Hey @shahankit2313,

Are you using SDK or JWT API_KEY and API_SECRET? Try using JWT credentials if you have not already.

Also, you must have a Pro or Free trail zoom account to use the JS SDK. https://zoom.us/pricing

Let me know if this helps,
Thanks

The same issue in VueJS with zoom-jssdk 1.5.0.
I’ve got keys from pro account and they work well in the sample app.

My code and also https://github.com/xinton/vue-zoomus-jssdk-sample Vue example always returns:
{method: “init”, status: false, errorCode: 3008, errorMessage: “Please init meeting first!”, result: null}

Both signature and init calls are successful. Role (0/1) doesn’t matter.

Hey @jozo.kovac,

When trying to run npm run serve to start your project I get this syntax error,

Syntax Error: SyntaxError: /Users/tommygaessler/Code/vue-zoomus-jssdk-sample/src/components/ZoomFrame.vue: Unexpected token, expected "}" (32:6)

  30 |
  31 | export default {
> 32 |   name: "ZoomFrame",
     |       ^
  33 |   data: function() {
  34 |     return {
  35 |       src: "",

Please fix this so I can debug why you are getting the Please init meeting first error.

Thanks,
Tommy

Thanks for your efforts, it’s very appreciated.

It’s not my repo, I just hope it’s supposed to work well. I’ve tried various things and the results in VueJS are always the same: 3008.

There are 2 lines just above ‘export default {’
var API_KEY = <API_KEY>;
var API_SECRET = <API_SECRET>;

Just replace <…> them with real credentials “…”.
There’s also an issue with jQuery dependency that can be resolved with “npm install --save jQuery” (± some other dependencies)

Ultimately it works well but shows 3008 error. The same key + secret + meeting id work well in the official sample web app. Official is pure JS and I hope we can make it work in Vue as well.

I’ve finally fixed it. It was an issue with jQuery.

Steps to reproduce if anybody would be interested:

  1. Remove script tag that loads external jquery in public/index.html
  2. Add a line line to main.js just above new Vue:
    window.$ = require(‘jQuery’)
1 Like

Hey @jozo.kovac,

Glad to hear your issues was fixed!

Thanks for posting the solution! :slight_smile:

Let us know if we can help with anything else!

Thanks,
Tommy

Hi Tommy, why does the sdk need jQuery, which is deprecated and hence a bit hard to use in production?
Kamal

Hey @kamal,

jQuery is not deprecated. I will talk to the team about how we can remove jQuery as a dependency.

Thanks,
Tommy