# Error ZoomMtg is not defined

**URL:** <https://devforum.zoom.us/t/error-zoommtg-is-not-defined/61145>\
**Category:** Web\
**Created:** [December 7, 2021, 6:55am UTC](https://devforum.zoom.us/t/error-zoommtg-is-not-defined/61145 "2021-12-07T06:55:30Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![abhimanyu.sikarwar](https://avatars.discourse-cdn.com/v4/letter/a/7feea3/32.png) [@abhimanyu.sikarwar](https://devforum.zoom.us/u/abhimanyu.sikarwar)\
**Post date:** [December 7, 2021, 6:55am UTC](https://devforum.zoom.us/t/error-zoommtg-is-not-defined/61145/1 "2021-12-07T06:55:30Z")

</div>

Hi Admin,

After running web app I got error “Uncaught ReferenceError: ZoomMtg is not defined at websdkready (index.js:12) at index.js:3”

I am not sure where to keep which code, please guide.

Error screenshot: [error-showing-in-console — ImgBB](https://ibb.co/TTN3CWG)  
Code screenshot: [code-for-CDN-based-Component-view-Webinar — ImgBB](https://ibb.co/hK1cFWH)

Kind regards,  
Amzad

---

<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:** [December 8, 2021, 4:17pm UTC](https://devforum.zoom.us/t/error-zoommtg-is-not-defined/61145/2 "2021-12-08T16:17:43Z")

</div>

Hey @abhimanyu.sikarwar ,

Please fill out the post template so we have enough info to support you. 🙂

* * *

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

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

**Which Web Meeting SDK version?**  
Knowing the version can help us to identify your issue faster. [e.g. 1.9.9]

**Meeting SDK Code Snippets**  
The code snippets that are causing the error / issue so we can reproduce.

**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.

**Device (please complete the following information):**

- Device: [e.g. Macbook Pro]
- OS: [e.g. macOS 11]
- Browser: [e.g. Chrome]
- Browser Version [e.g. 88.0.4324.150 (Official Build) (x86\_64)]

**Additional context**  
Add any other context about the problem here.

* * *

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![abhimanyu.sikarwar](https://avatars.discourse-cdn.com/v4/letter/a/7feea3/32.png) [@abhimanyu.sikarwar](https://devforum.zoom.us/u/abhimanyu.sikarwar)\
**Post date:** [December 9, 2021, 10:56am UTC](https://devforum.zoom.us/t/error-zoommtg-is-not-defined/61145/3 "2021-12-09T10:56:59Z")

</div>

**Description**  
We have followed every steps from this url [https://bit.ly/3GpbG84](https://bit.ly/3GpbG84) but not successful for running CDN based component view.  
Please do the correction from your end in the attached Code Snippets & send us working project.

**Browser Console Error**  
Url: [error-showing-in-console — ImgBB](https://ibb.co/TTN3CWG)

**Which Web Meeting SDK version?**  
2.0.1

**Meeting SDK Code Snippets**  
URL: https:// github. com /ottoedge/DealerDigitalSummit/

**To Reproduce(If applicable)**  
From the above git code, please have a look in the index.html & “js” folder for reproduce.

**Screenshots**  
In the bottom of index. html I have used code of attached screenshot: https:// ibb. co /0Jzvr0x

**Device (please complete the following information):**  
Device: Dell laptop  
OS: windows 10  
Browser: all major browsers including Chrome  
Browser Version: 95.0.4638.69 (Official Build) (64-bit)

**Additional context**  
If you need any credentials for running the web app, please tell us.

---

<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:** [December 10, 2021, 5:18pm UTC](https://devforum.zoom.us/t/error-zoommtg-is-not-defined/61145/4 "2021-12-10T17:18:26Z")

</div>

Hey @abhimanyu.sikarwar ,

`ZoomMtg` is undefined for you because you have commented out the script that imports it:

 ![Screen Shot 2021-12-10 at 10.16.19 AM](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/8/b/8b5668024985d31a370b5e09f9d24e22e492724e.png)

The following script is for the [Client View](https://marketplace.zoom.us/docs/sdk/native-sdks/web/client-view) which is what I assume you are using:

```auto
<script src="https://source.zoom.us/zoom-meeting-2.0.1.min.js"></script>

```

This script is for the new [Component View](https://marketplace.zoom.us/docs/sdk/native-sdks/web/component-view):

```auto
<script src="https://source.zoom.us/2.0.1/zoom-meeting-embedded-2.0.1.min.js"></script>

```

Please see our documentation here: [https://marketplace.zoom.us/docs/sdk/native-sdks/web/build#install-from-cdn](https://marketplace.zoom.us/docs/sdk/native-sdks/web/build#install-from-cdn)

You can see the sample app for the Client View using the CDN does not have this line commented out:

> <https://github.com/zoom/sample-app-web/blob/master/CDN/index.html#L147>

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![abhimanyu.sikarwar](https://avatars.discourse-cdn.com/v4/letter/a/7feea3/32.png) [@abhimanyu.sikarwar](https://devforum.zoom.us/u/abhimanyu.sikarwar)\
**Post date:** [December 15, 2021, 5:52pm UTC](https://devforum.zoom.us/t/error-zoommtg-is-not-defined/61145/5 "2021-12-15T17:52:36Z")

</div>

Your given solutions are working right now. Thank you for your support.

---

<div class="post-metadata">

**Author:** ![donte.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/donte.zoom/32/24412_2.png) [@donte.zoom](https://devforum.zoom.us/u/donte.zoom)\
**Post date:** [December 20, 2021, 5:01pm UTC](https://devforum.zoom.us/t/error-zoommtg-is-not-defined/61145/6 "2021-12-20T17:01:56Z")

</div>

Hi, @abhimanyu.sikarwar ,

Glad to hear Tommy’s solution is working! Be sure to reach out should you have any additional questions.

Thanks,  
Donte

---

<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:** [January 20, 2022, 3:02am UTC](https://devforum.zoom.us/t/error-zoommtg-is-not-defined/61145/7 "2022-01-20T03:02:03Z")

</div>

Closed on January 20, 2022, 3:02am UTC

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