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

**URL:** <https://devforum.zoom.us/t/zoom-sample-app-web-black-screen-cannot-read-property-tostring-of-undefined/29084>\
**Category:** Web\
**Created:** [September 3, 2020, 6:58pm UTC](https://devforum.zoom.us/t/zoom-sample-app-web-black-screen-cannot-read-property-tostring-of-undefined/29084 "2020-09-03T18:58:30Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeremysh](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jeremysh/32/14581_2.png) [@jeremysh](https://devforum.zoom.us/u/jeremysh)\
**Post date:** [September 3, 2020, 6:58pm UTC](https://devforum.zoom.us/t/zoom-sample-app-web-black-screen-cannot-read-property-tostring-of-undefined/29084/1 "2020-09-03T18:58:30Z")

</div>

Using the zoom/sample-app-web located at [https://github.com/zoom/sample-app-web](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.

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [September 8, 2020, 10:35pm UTC](https://devforum.zoom.us/t/zoom-sample-app-web-black-screen-cannot-read-property-tostring-of-undefined/29084/2 "2020-09-08T22:35:10Z")

</div>

Hey @jeremysh,

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

Let me know if that fixes the issue! 🙂

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![joe.tzjia](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/joe.tzjia/32/13335_2.png) [@joe.tzjia](https://devforum.zoom.us/u/joe.tzjia)\
**Post date:** [September 19, 2020, 3:01pm UTC](https://devforum.zoom.us/t/zoom-sample-app-web-black-screen-cannot-read-property-tostring-of-undefined/29084/3 "2020-09-19T15:01:10Z")

</div>

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](https://zoom.us)”,

role: role

}  
Could you please help me, thank you every much

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [September 22, 2020, 6:51am UTC](https://devforum.zoom.us/t/zoom-sample-app-web-black-screen-cannot-read-property-tostring-of-undefined/29084/4 "2020-09-22T06:51:51Z")

</div>

Hey @joe.tzjia,

Please try passing in a value for the `userName`. 🙂

For example,

`userName: "Test"`

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [October 22, 2020, 4:52pm UTC](https://devforum.zoom.us/t/zoom-sample-app-web-black-screen-cannot-read-property-tostring-of-undefined/29084/5 "2020-10-22T16:52:15Z")

</div>

Closed on October 22, 2020, 4:52pm UTC

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