Page stuck on "Joining Meeting"

Description
I’m trying to implement the web sdk inside my rails application. I’m generating the signature in my controller and then, inside my javascript file I’m running this:

import { Controller } from "stimulus"
import { ZoomMtg } from '@zoomus/websdk'

export default class extends Controller {
  static targets = ['container']

  connect() {
    this.initZoom()
  }

  initZoom() {
    ZoomMtg.setZoomJSLib('https://source.zoom.us/1.8.3/lib', '/av')

    ZoomMtg.preLoadWasm()
    ZoomMtg.prepareJssdk()
    
    const {signature, apiKey} = this.containerTarget.dataset

    ZoomMtg.init({
      leaveUrl: 'https://google.com',
      isSupportAV: true,
      success: function() {
        ZoomMtg.join({
          signature,
          meetingNumber: 'xxxxxxxxx',
          password: 'xxxxx',
          userName: 'ilrock',
          apiKey,
          role: 1,
          success: (success) => {
            console.log(success)
          },
          error: (error) => {
            console.log(error)
          }
        })
      }
    })
  }
}

When the page loads, it gets stuck on “Joining Meeting”. No log messages or errors are shown.

Error
No error messages are shown

Which version?
1.8.3

Screenshots
Tried to upload a screenshot and it gives me an error. Just wanted to show you the page stuck on “Joining Meeting” and the console showing the following:

pre load wasm success: https://source.zoom.us/1.8.3/lib/av/5793_audio.encode.wasm
zoomus-websdk.umd.min.js:122860 pre load wasm success: https://source.zoom.us/1.8.3/lib/av/5793_video.decode.wasm

Device (please complete the following information):

  • Device: Razer Blade stealth
  • OS: Windows 10
  • Browser: Chrome

Hey @ilrock,

I know this is a strange edge case, but please use passWord instead of password. Let me know if that fixes the issue for you. :slight_smile:

Thanks,
Tommy

Hey Tommy. That was just a test on my end. I get the same result using passWord

Hey @ilrock,

Can you also try removing the role property? If anything is incorrect in the ZoomMtg.join object, you will experience this issue. You can see the valid properties for the join object here:

Thanks,
Tommy

Thanks! That worked, somehow I had found the role property in some documentation page. Maybe it was out of date.

I am now getting another error now. It says that the “Signature is expired”. I’m generating my signature on the fly for every page load inside of a rails controller.

This is the code

hash = Digest::SHA256.base64digest(ENV['ZOOM_SDK_SECRET'])
plain_signature = "#{ENV['ZOOM_SDK_KEY']}.XXXXXXX.#{Time.now.to_i}.1.#{hash}"

@zoom_signature = Base64.encode64(plain_signature)

Any idea of what this maybe due to? I wrote the above code using the js/python snippets as guideline.

I also tried generating the timestamps using Time.now.to_i - 30000 but the result is identical.

1 Like

Hey @ilrock,

Happy to hear we got the original issue sorted out! The role is required when generating the Web SDK signature, so maybe that is where you saw the role in the docs. :slight_smile:

Now, for your Signature Expired issue, checkout this post here and let me know if it fixes the problem:

Thanks,
Tommy

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