Zoom/sample-app-web: Black Screen - Cannot read property 'toString' of undefined

Using the zoom/sample-app-web located at https://github.com/zoom/sample-app-web
I’m getting the following error:

Error
zoom-meeting-1.8.0.min.js:formatted:19439 Uncaught TypeError: Cannot read property ‘toString’ of undefined
at k (zoom-meeting-1.8.0.min.js:formatted:19439)
at zoom-meeting-1.8.0.min.js:formatted:19893
at zoom-meeting-1.8.0.min.js:formatted:19899

===== zoom-meeting-1.8.0.min.js line of code failing ==========
var t = "userEmail"in e ? e.userEmail.toString() : “”
, n = e = Object.assign(e, {
meetingNumber: e.meetingNumber.toString(),
userName: e.userName.toString(),
passWord: e.passWord.toString(),
apiKey: e.apiKey.toString(),
signature: “function” !== typeof e.signature ? e.signature.toString() : e.signature,
participantId: "participantId"in e ? e.participantId.toString() : “”,
userEmail: t

Version 1.8.0

I’ve downloaded the sample; added my apikey and secret to index.js and this line of code above is failing.

1 Like

Hey @jeremysh,

Can you please try leaving the meetingNumber as a number and not a string?

Let me know if that fixes the issue! :slight_smile:

Thanks,
Tommy

hello ,
I am facing a similar problem:
Uncaught TypeError: Cannot read property ‘toString’ of undefined
at k (zoomus-websdk.umd.min.js?478e:formatted:19435)
at eval (zoomus-websdk.umd.min.js?478e:formatted:19889)
at eval (zoomus-websdk.umd.min.js?478e:formatted:19891)
The error happen in userName part:
function k(e) {
e.userName = e.userName ? e.userName : “”, <- this line is error
e.passWord = e.passWord ? e.passWord : “”;
var t = "userEmail"in e ? e.userEmail.toString() : “”
, n = e = Object.assign(e, {
meetingNumber: e.meetingNumber.toString(),
userName: e.userName.toString(),
passWord: e.passWord.toString(),
apiKey: e.apiKey.toString(),
signature: “function” !== typeof e.signature ? e.signature.toString() : e.signature,
participantId: "participantId"in e ? e.participantId.toString() : “”,
userEmail: t
})
And this is my meet config :
{
apiKey: API_KEY,

apiSecret: API_SECRET,

meetingNumber: meetingId,

userName: “”,

passWord: “”,

leaveUrl: “https://zoom.us”,

role: role

}
Could you please help me, thank you every much

Hey @joe.tzjia,

Please try passing in a value for the userName. :slight_smile:

For example,

userName: "Test"

Thanks,
Tommy

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