Started getting 'errorCode: 3008, errorMessage: “Please init meeting first!”' after updating to 1.8.0

Description
I started getting errorCode: 3008, errorMessage: “Please init meeting first!” even though I am initializing my meeting and the exact same code was working on @zoomus/websdk@1.7.10


Error

  • Console output prior to the error:
13:24:10.918 zoomus-websdk.umd.min.js:formatted:1 Zoom support you browser. Chrome/85.0.4183.83
13:24:10.918 zoomus-websdk.umd.min.js:formatted:1 You browser support below features
13:24:11.467 Zoom.jsx:50 {method: "init", status: true, errorCode: 0, errorMessage: null, result: null}
13:24:11.649 zoomus-websdk.umd.min.js:formatted:1 pre load wasm success: /zoom/lib/av/5628_audio.encode.wasm
13:24:11.751 zoomus-websdk.umd.min.js:formatted:1 pre load wasm success: /zoom/lib/av/5628_video.mt.wasm
13:24:11.766 zoomus-websdk.umd.min.js:formatted:1 pre load wasm success: /zoom/lib/av/5628_video.decode.wasm
13:24:11.777 zoomus-websdk.umd.min.js:formatted:1 pre load wasm success: /zoom/lib/av/5628_video.simd.wasm
13:24:12.468 zoomus-websdk.umd.min.js:formatted:1 {method: "init", status: false, errorCode: 3008, errorMessage: "Please init meeting first!", result: null}
  • Stacktrace
console.<computed>	@	index.js:1
error	@	Zoom.jsx:54
(anonymous)	@	zoomus-websdk.umd.min.js:2
(anonymous)	@	zoomus-websdk.umd.min.js:2
setInterval (async)		
join	@	zoomus-websdk.umd.min.js:2
success	@	Zoom.jsx:51
B	@	zoomus-websdk.umd.min.js:2
value	@	zoomus-websdk.umd.min.js:2
O	@	zoomus-websdk.umd.min.js:2
init	@	zoomus-websdk.umd.min.js:2
(anonymous)	@	Zoom.jsx:38
Promise.then (async)		
Zoom._this.join	@	Zoom.jsx:33
Zoom._this.initialize	@	Zoom.jsx:69
(anonymous)	@	Zoom.jsx:28
callCallback	@	react-dom.development.js:16433
commitUpdateEffects	@	react-dom.development.js:16472
commitUpdateQueue	@	react-dom.development.js:16460
commitLifeCycles	@	react-dom.development.js:17364
commitAllLifeCycles	@	react-dom.development.js:18736
callCallback	@	react-dom.development.js:149
invokeGuardedCallbackDev	@	react-dom.development.js:199
invokeGuardedCallback	@	react-dom.development.js:256
commitRoot	@	react-dom.development.js:18948
(anonymous)	@	react-dom.development.js:20418
unstable_runWithPriority	@	scheduler.development.js:255
completeRoot	@	react-dom.development.js:20417
performWorkOnRoot	@	react-dom.development.js:20346
performWork	@	react-dom.development.js:20254
performSyncWork	@	react-dom.development.js:20228
requestWork	@	react-dom.development.js:20097
scheduleWork	@	react-dom.development.js:19911
scheduleRootUpdate	@	react-dom.development.js:20572
updateContainerAtExpirationTime	@	react-dom.development.js:20600
updateContainer	@	react-dom.development.js:20657
push../node_modules/react-dom/cjs/react-dom.development.js.ReactRoot.render	@	react-dom.development.js:20953
(anonymous)	@	react-dom.development.js:21090
unbatchedUpdates	@	react-dom.development.js:20459
legacyRenderSubtreeIntoContainer	@	react-dom.development.js:21086
render	@	react-dom.development.js:21155
./src/index.jsx	@	index.jsx:14
__webpack_require__	@	bootstrap:784
fn	@	bootstrap:150
1	@	promise.jsx:24
__webpack_require__	@	bootstrap:784
checkDeferredModules	@	bootstrap:45
webpackJsonpCallback	@	bootstrap:32
(anonymous)	@	main.chunk.js:1

Which version?
@zoomus/websdk@1.8.0

  • package.json:
"dependencies": {
  "@zoomus/websdk": "1.8.0",
  "core-js": "3.6.5",
  "query-string": "5.1.1",
  "react": "16.8.6",
  "react-app-polyfill": "1.0.6",
  "react-dom": "16.8.6",
  "react-scripts": "3.4.3"
}
  • html:
    <script src="https://source.zoom.us/1.8.0/lib/vendor/jquery.min.js"></script>
    <script src="https://source.zoom.us/1.8.0/lib/vendor/lodash.min.js"></script>

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

  1. Open the index (where my component is running)
  2. See error

Hi @evnts,

We’re happy to look into this for you. As a first step, can you provide your web SDK code snippet, or a Github repo link? This will help us to debug on our end.

Thanks, and looking forward to your sample!

Best,
Will

This is our current component. This code works with @zoomus/websdk@1.7.10 and simply stops working when we change the lib to @zoomus/websdk@1.8.0

import queryString from 'query-string'
import { ZoomMtg } from '@zoomus/websdk'
import { get } from '../utils/promise' // This is simply a wrapper for a request using promise
import '@zoomus/websdk/dist/css/bootstrap.css'
import '@zoomus/websdk/dist/css/react-select.css'
import './css/zoom.css'

export default class Zoom extends Component {
  constructor () {
    super()
    this.state = {
      botaoHabilitado: true,
      naoCarregou: true,
      meeting: {}
    }
  }

  componentDidMount () {
    const opcoes = queryString.parse(window.location.search)
    if (opcoes.meetingNumber && opcoes.userName && opcoes.userEmail) {
      const meeting = {
        meetingNumber: opcoes.meetingNumber,
        userName: opcoes.userName,
        userEmail: opcoes.userEmail,
        passWord: opcoes.passWord || ''
      }
      this.setState({ meeting }, () => { this.initialize() })
    }
  }

  join = () => {
    get(`/api/v1/autenticar/zoom/${this.state.meeting.meetingNumber}`).then(resposta => {
      if (!resposta || !resposta.success || !resposta.data) {
        throw new Error('Não foi possível conectar ao Zoom')
      }

      ZoomMtg.init({
        leaveUrl: window.location.href,
        isSupportChat: false,
        isSupportQA: false,
        showMeetingHeader: false,
        videoHeader: false,
        disableInvite: true,
        inviteUrlFormat: 'hide',
        error: erro => { erro && console.error(erro) },
        success: () => {
          ZoomMtg.join({
            ...this.state.meeting,
            ...resposta.data, /* This response contains apiKey and signature */
            error: erro => { erro && console.error(erro) }
          })
        }
      })
    })
  }

  initialize = () => {
    if (!ZoomMtg.checkSystemRequirements()) throw new Error('O Zoom não é suportado neste navegador')

    ZoomMtg.setZoomJSLib('/zoom/lib', '/av') // I made the lib available in the public folder
    ZoomMtg.preLoadWasm()
    ZoomMtg.prepareJssdk()
    this.join()
  }

  render () {
    return <div id='zmmtg-root' />
  }
}

Hey @evnts,

Thanks for getting back to me with your sample—after taking a quick look, I would recommend moving the following lines to immediately follow your import statements:

ZoomMtg.setZoomJSLib('/zoom/lib', '/av') // I made the lib available in the public folder
ZoomMtg.preLoadWasm()
ZoomMtg.prepareJssdk()

While this is not exactly the same, you’ll notice in our Angular sample app a similar approach:

It’s likely this will do the trick, but let us know if not!

Best,
Will

1 Like

Tried it. That specific error stopped. But now nothing happens after loading the /av files:

I tried using our local copies with ZoomMtg.setZoomJSLib('/zoom/lib', '/av') as well as source.zoom.us, with ZoomMtg.setZoomJSLib('https://source.zoom.us/1.8.0/lib', '/av') to the same result. Nothing happens after loading the /av files…


There are console.log inside both init and join success callback functions and there are console.error inside both init and join error callback functions. This is all the output I get:

19:43:15.009 zoomus-websdk.umd.min.js:2 Zoom support you browser. Chrome/85.0.4183.83
19:43:15.011 zoomus-websdk.umd.min.js:2 You browser support below features
19:43:15.716 zoomus-websdk.umd.min.js:2 pre load wasm success: /zoom/lib/av/5628_audio.encode.wasm
19:43:15.796 zoomus-websdk.umd.min.js:2 pre load wasm success: /zoom/lib/av/5628_video.decode.wasm
19:43:15.883 zoomus-websdk.umd.min.js:2 pre load wasm success: /zoom/lib/av/5628_video.simd.wasm
19:43:15.904 zoomus-websdk.umd.min.js:2 pre load wasm success: /zoom/lib/av/5628_video.mt.wasm

I also tried the same thing (moving those 3 lines to immediately follow the import statements) with the version that was working (1.7.10) and the behavior was the same. After loading the /av files nothing happens. So I don’t think that the problem is the position of those lines…

Hey @evnts,

Can you please provide your github repo link so we can reproduce and debug the issue locally? :slight_smile:

Thanks,
Tommy

The code is available for download here:

You’ll have to replace the part where the app access /api/v1/autenticar/zoom/${this.state.meeting.meetingNumber} to get the apiKey and signature, because that part is not available in that code.

The app homepage is located at /zoom and the meeting info is retrieved via query parameters
Sample URL:
passWord is optional (the code assumes passWord='' when not informed

Hey @evnts,

Can you double check the download link? It downloaded an invalid file.

If you could put this on a GitHub repo it would be easier for me to get it up and running.

Thanks,
Tommy

Hey @evnts,

I am having trouble starting your project. I am getting the following error/warning:

Here is the project structure, I have not changed anything in the public directory:

Thanks,
Tommy

That’s because the map file for the JS is not available. (webim.min.js.map)
Even when we use ZoomMtg.setZoomJSLib('https://source.zoom.us/1.8.0/lib', '/av') that happens.
Even when using 1.7.10 that happened.

That is not the problem. That’s a warning stating that the browser couldn’t find the map file for webim.min.js and that’s simply because you guys don’t provide a map file for your minified javascripts.
Like I said. That’s a warning. That does not stop the code from running.

The trouble you’re having is exactly the trouble I was having after I did what @will.zoom instructed here (Moving setZoomJSLib, preLoadWasm and prepareJssdk to immediately follow the import statements)

After the page loads the wasm files, nothing else happens.

Hey @evnts,

Gotcha, I will take another look at this and report back when I find the issue.

Thanks,
Tommy

Hey @evnts,

I was able to get it working! :slight_smile:

I just moved the Zoom pre and set lib functions to the top of the file like so:

import React, { Component } from 'react'
import queryString from 'query-string'
import { ZoomMtg } from '@zoomus/websdk'
import { get } from '../utils/promise'
import '@zoomus/websdk/dist/css/bootstrap.css'
import '@zoomus/websdk/dist/css/react-select.css'
import './css/zoom.css'

ZoomMtg.setZoomJSLib('/zoom/lib', '/av')
ZoomMtg.preLoadWasm()
ZoomMtg.prepareJssdk()

Please try that and let me know if it works! :slight_smile:

Thanks,
Tommy

1 Like

@tommy I just noticed that the code I posted on github is using @zoomus/websdk@1.7.10 and I’m having trouble with version @zoomus/websdk@1.8.0

I’m sorry about that. I updated the repo to use @zoomus/websdk@1.8.0

What I reported earlier is still happening:

  • When setZoomJSLib, preLoadWasm and prepareJssdk are inside the initialize function I get the “Please init meeting first!” error.
  • When I move them to the top I get a few “pre load wasm success” on the console, but then nothing else happens

Hey @evnts,

Are you able to put console logs so you can see exactly where the code stops? Are their any errors in the browser console?

Thanks,
Tommy

No errors. Only the logs “pre load wasm success” and nothing else.

Even with console.log inside init.success and join.success and console.error inside init.error and join.error

Did you tried running the code with SDK version 1.8.0? Did it work?

I am running into same issue in React.

It was working fine with prev version but as soon as i upadated to 1.8.0, I faced the issue : please init meeting first.

Then, as @will.zoom suggested, i moved
ZoomMtg.preLoadWasm(); ZoomMtg.prepareJssdk()
these to top

Now, ZoomMtg.init() itself is not working (there is no success or error message)

1 Like

Hey @evnts,

Yes, I got it to work. Are you sure you are calling your start/join meeting function to execute the Web SDK init and join code?

Thanks,
Tommy

Hey @saurssaurav33,

Can you please provide steps to reproduce the issue and your Web SDK code so we can take a look? :slight_smile:

Thanks,
Tommy

1 Like

Hello @tommy,
I haved created Repo to re-create the issue. Here is the link,

https://github.com/isaurssaurav/react-zoom-websdk-1.8.1

And i have also created another branch v.1.7.8 (everything is same, only the version is different) on the repo where the zoomsdk runs perfectly.

Thank you for your time.