"Join invalid parameter !"

Description

I’m getting – like many others – an error “join invalid parameter !!!” when joining a meeting.

Error

join invalid parameter !!! in my console when calling ZoomMtg.join(...). Nothing else

Which version?

1.8.0 (from https://dmogdx0jrul3u.cloudfront.net/1.8.0/lib).

To Reproduce(If applicable)

Run this script (API_SECRET redacted):

import {ZoomMtg} from '@zoomus/websdk'
import {JoinInfo, MeetConfig, Role} from './types'
import URL from 'url'

const API_KEY = ''
const API_SECRET = '...'

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

console.log(JSON.stringify(ZoomMtg.checkSystemRequirements()))

run()

async function run() {

  const url = URL.parse(document.location.href, true)

  if (url.query.join) {
    await performJoin(url.query.join as string, url.query as any)
  } else if (url.query.leave) {
    await leaveMeeting()
  } else {
    alert("Unknown action")
  }

}

async function performJoin(meetingID: string, info: JoinInfo) {

  const config = buildMeetConfig(meetingID, info)
  if (config == null) { return }

  await initializeZoom()

  console.log('-------------------------')

  await new Promise(resolve => setTimeout(resolve, 2000))

  const signature = await generateSignature(config)
  await joinMeeting(config, signature)
}

async function leaveMeeting() {

}

function buildMeetConfig(meetingID: string, info: JoinInfo): MeetConfig | null {
  if (info.name == null) {
    alert("Missing: name")
    return null
  }
  if (info.email == null) {
    alert("Missing: email")
    return null
  }
  if (info.pwd == null) {
    alert("Missing: pwd")
    return null
  }

  return {
    apiKey:        API_KEY,
    meetingNumber: meetingID,
    userName:      info.name,
    userEmail:     info.email,
    passWord:      info.pwd,
    role:          Role.ATTENDEE
  }
}

async function generateSignature(config: MeetConfig) {
  // const {meetingNumber: meetingID, role} = config

  // const query = QS.stringify({meetingID, role})
  // const response = await fetch(`/zoom/signature?${query}`)
  // if (response.status !== 200) { return null }

  // const {signature} = await response.json()

  const signature = ZoomMtg.generateSignature({
    apiKey:        API_KEY,
    apiSecret:     API_SECRET,
    meetingNumber: config.meetingNumber,
    role:          config.role
  })

  return signature
}

function initializeZoom() {
  return new Promise((resolve, reject) => {
    ZoomMtg.init({
      debug:       true,
      isSupportAV: true,
      leaveUrl:    'https://web.groundcontrol.app/zoom?leave',
      success:     resolve,
      error:       reject
    })
  })
}

function joinMeeting(config: MeetConfig, signature: string) {
  return new Promise((resolve, reject) => {
    console.log("JOIN", {signature, ...config})

    const res = ZoomMtg.join({
      signature,
      ...config,
      debug: true,
      success: (res: any) => {
        console.log("SUCCESS", res)
        resolve(res)
      },
      error:   (err: any) => {
        console.log("ERROR", err)
        reject(err)
      }
    })
    console.log("RES", res)
  })
}

Additional context

My logs show:

Zoom support you browser. Chrome/85.0.4183.102
zoomus-websdk.umd.min.js:17625 You browser support below features
index.ts:12 {"browserInfo":"Chrome/85.0.4183.102","browserName":"Chrome","browserVersion":"85.0.4183.102","features":["viewSharing","screenShare","computerVideo","computerAudio","callIn","callOut","chat","closedCaption","QA"]}

index.ts:37 -------------------------

zoomus-websdk.umd.min.js:120698 pre load wasm success: https://dmogdx0jrul3u.cloudfront.net/1.8.0/lib/av/5628_audio.encode.wasm
zoomus-websdk.umd.min.js:120698 pre load wasm success: https://dmogdx0jrul3u.cloudfront.net/1.8.0/lib/av/5628_video.mt.wasm
zoomus-websdk.umd.min.js:120698 pre load wasm success: https://dmogdx0jrul3u.cloudfront.net/1.8.0/lib/av/5628_video.decode.wasm
zoomus-websdk.umd.min.js:120698 pre load wasm success: https://dmogdx0jrul3u.cloudfront.net/1.8.0/lib/av/5628_video.simd.wasm
react_devtools_backend.js:2273 ./src/zoom/index.ts

zoomus-websdk.umd.min.js:17563 --- succesCallBack ---
zoomus-websdk.umd.min.js:17563 {method: "generateSignature", status: true, errorCode: 0, errorMessage: null, result: ""}errorCode: 0errorMessage: nullmethod: "generateSignature"result: ""status: true__proto__: Object
index.ts:106 JOIN {signature: "", apiKey: "", meetingNumber: "", userName: "", userEmail: "", …}apiKey: ""meetingNumber: ""passWord: ""role: 0signature: ""userEmail: ""userName: ""__proto__: Object
index.ts:121 RES undefined
zoomus-websdk.umd.min.js:17069 join invalid parameter !!!

Screenshot:

Hey @joost,

Can you try passing in the meetingNumber as a number and not a string?

Thanks,
Tommy

Hi Tommy,

I saw this suggestion in another post. Unfortunately, I’ve already tried that, and to no avail.

Is there no way to enable a debug mode that tells me which parameter is invalid?

Hey @joost,

You can use the debug mode by passing in debug: true to the init function.

Could you create a test meeting and share what values you are passing in to the Web SDK join function?

Thanks,
Tommy

I’ve already added {debug: true} in my example (see my posted listing), but it doesn’t show exactly which parameter is at fault…

I’m not sure what you’re asking – I had created a test meeting, and in the URL and logs you can see the values:

  • meetingNumber: ''
  • passWord: '' (I’ve tried this one, and I’ve tried the hash from the invitation URL)

I’ll copy paste the relevant section from my logs again here:

Hey @joost,

And you have tried passing in the meetingNumber as a number instead of a string?

If you provide me with a github repo that has this issue, I can debug this for you. :slight_smile:

Thanks,
Tommy

Hi Tommy,

Yes, you asked me this in the first message. I’d tried that.

The code is in a private repository. I posted the exact code I use above, and all the logs. Can you use that to reproduce the issue? Or could you at least help me to identify the failing parameter?

Alternatively, could we schedule a Zoom call or something so that we can look at this together? I’m really at the end of my wits here, I’ve tried literally everything. I could show you what’s going on.

Hey @joost,

I have just private messaged you. :slight_smile:

Thanks,
Tommy

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