Zoom-meeting-1.7.7.min.js:2 Uncaught TypeError: Cannot read property 'append' of null

i init web sdk what appends as

Hey @179470917,

Please fill out the post template so we have enough information to help:


Description
A clear and concise description of what the question is.

Error
The full error message or issue you are running into.

Which version?
Knowing the version can help us to identify your issue faster.

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

  1. Go to ‘…’
  2. Click on ‘…’
  3. Scroll down to ‘…’
  4. See error

Screenshots
If applicable, add screenshots to help explain your problem.

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Version: [e.g. 22]
  • Browser:[e.g. Chrome]

Additional context
Add any other context about the problem here.

Thanks,
Tommy

Description
I’m trying apply the example I found here


in particular I’m following the instruction of “Import Through CDN”
By simply including the js as it is explained in the page i get the error

Error
Error from Chrome consolle
zoom-meeting-1.7.8.min.js:2 Uncaught TypeError: Cannot read property ‘append’ of null
at zoom-meeting-1.7.8.min.js:2
at r (zoom-meeting-1.7.8.min.js:2)
at Object. (zoom-meeting-1.7.8.min.js:2)
at n (zoom-meeting-1.7.8.min.js:2)
at Object. (zoom-meeting-1.7.8.min.js:2)
at n (zoom-meeting-1.7.8.min.js:2)
at Module. (zoom-meeting-1.7.8.min.js:2)
at n (zoom-meeting-1.7.8.min.js:2)
at Module. (zoom-meeting-1.7.8.min.js:2)
at n (zoom-meeting-1.7.8.min.js:2)

Which version?
zoom-meeting-1.7.7.min.js

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

  1. follow the example in your documention
  2. The error appears on loading the https://source.zoom.us/zoom-meeting-1.7.7.min.js file
  • Device: PC
  • OS: WIN 10 pro
  • Version: 1903
  • Browser: Chrome 83 on Windows 10

Please try the latest CDN here:

Please let us know if you continue to experience this issue.

Thanks,
Tommy

In JavaScript almost everything is an object, null and undefined are exceptions. This error occurs when a property is read or a function is called on an undefined variable. Undefined means that a variable has been declared but has not been assigned a value. In JavaScript, properties and functions can only belong to objects. Since undefined is not an object type, calling a function or a property on such a variable causes the TypeError: Cannot read property of undefined.

If you are not sure a variable that will always have some value, the best practice is to check the value of variables for null or undefined before using them. To avoid getting these types of errors, you need to make sure that the variables you are trying to read do have the correct value. This can be done in various ways. You can do if checks before dealing with objects whose values are bound to change:

if (myVar !== undefined) {
    ...
}

Or

if (typeof(myVar) !== 'undefined') {
    ...
}