# ZoomMtg.prepareJssdk() gives 2 SyntaxErrors and 2 warnings

**URL:** <https://devforum.zoom.us/t/zoommtg-preparejssdk-gives-2-syntaxerrors-and-2-warnings/34401>\
**Category:** Web\
**Created:** [October 27, 2020, 9:16am UTC](https://devforum.zoom.us/t/zoommtg-preparejssdk-gives-2-syntaxerrors-and-2-warnings/34401 "2020-10-27T09:16:06Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![vijay.singh](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/vijay.singh/32/9055_2.png) [@vijay.singh](https://devforum.zoom.us/u/vijay.singh)\
**Post date:** [October 27, 2020, 9:16am UTC](https://devforum.zoom.us/t/zoommtg-preparejssdk-gives-2-syntaxerrors-and-2-warnings/34401/1 "2020-10-27T09:16:07Z")

</div>

**Description**  
During the loading of Zoom JS SDK in my React application I am getting two errors which ultimately is causing my Zoom meeting room not to open successfully.

**Error**

1. Uncaught SyntaxError: expected expression, got ‘\<’

2. The script from “[http://localhost:3000/node\_modules/@zoomus/websdk/dist/lib/webim.min.js”](http://localhost:3000/node_modules/@zoomus/websdk/dist/lib/webim.min.js%E2%80%9D) was loaded even though its MIME type (“text/html”) is not a valid JavaScript MIME type.

**Which version?**  
1.8.1

**To Reproduce(If applicable)**

> ```
> componentDidMount() {
> ZoomMtg.setZoomJSLib('http://localhost:3000/node_modules/@zoomus/websdk/dist/lib', '/av');
> ZoomMtg.preLoadWasm(); // It works succesfully and loads all three files
> ZoomMtg.prepareJssdk(); //This line gives errors and warnings
> }
> 
> ```

**Screenshots**

 ![PreparSDKErrorZoom](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/3/8/38d0674c1de4916ea046d2e122f8022f96e830a8.png)

---

<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:** [October 29, 2020, 8:47pm UTC](https://devforum.zoom.us/t/zoommtg-preparejssdk-gives-2-syntaxerrors-and-2-warnings/34401/2 "2020-10-29T20:47:21Z")

</div>

Hey @vijay.singh,

Can you try adding those lines to the top of your file before the componentDidMount runs? My hunch is the files do not load in time and then the Web SDK code executes which throws the errors.

Here is an example with the Angular sample app:

> <https://github.com/zoom/websdk-sample-angular/blob/master/src/app/app.component.ts#L7>

Let me know if that fixes the issue. 🙂

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![vijay.singh](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/vijay.singh/32/9055_2.png) [@vijay.singh](https://devforum.zoom.us/u/vijay.singh)\
**Post date:** [October 30, 2020, 5:12am UTC](https://devforum.zoom.us/t/zoommtg-preparejssdk-gives-2-syntaxerrors-and-2-warnings/34401/3 "2020-10-30T05:12:17Z")

</div>

Hey @tommy I tried what you said and placed all the 3 lines of my code to the top of the file but still I don’t see any resolution of error.

```
ZoomMtg.setZoomJSLib('http://localhost:3000/node_modules/@zoomus/websdk/dist/lib', '/av');
ZoomMtg.preLoadWasm();
ZoomMtg.prepareJssdk();

```

Moreover when I am starting a Zoom call then below errors I get in console of my Firefox browser.

 ![JSMediaError](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/3/0/30333aff7851272b76c512cdabbf3ff8d6f27df7.png)

And in my Chrome browser below error I get when starting a Zoom call.

 ![JsMediaErrorChrom](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/9/d/9de0d58c839c97102fe8f5092ebed2741e94067c.png)

I believe(very much sure) this issue is caused due to CORB policy when the code `ZoomMtg.prepareJssdk()` runs. 2 days before it was working great with no warnings and errors in my console. I have already posted a question regarding that CORB warning here:

> [@Setting Zoom JS libraries in React shows CORB warnings](https://devforum.zoom.us/t/setting-zoom-js-libraries-in-react-shows-corb-warnings/34273):
>
> Description I am using Web SDK in my React application. Followed every step of this below project When I am loading ZoomJS Library by ZoomMtg.setZoomJSLib('http://localhost:3000/node\_modules/@zoomus/websdk/dist/lib', '/av') I am getting CORB warnings in my browser console recently. Earlier no such warnings were thrown by the browser. Edit: I am getting errors on starting a Zoom meeting call whom screenshots I have attached in this. Error Two warnings are thrown: zoomus-websdk.umd.min.js…

---

<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:** [November 2, 2020, 9:33pm UTC](https://devforum.zoom.us/t/zoommtg-preparejssdk-gives-2-syntaxerrors-and-2-warnings/34401/4 "2020-11-02T21:33:00Z")

</div>

Hey @vijay.singh,

Thanks for the additional information. Are you using @michael.zoom’s React sample app in this case as well?

If not, can you please provide a link to your repo on Github with the issue, so I can debug locally?

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:** [December 3, 2020, 7:33am UTC](https://devforum.zoom.us/t/zoommtg-preparejssdk-gives-2-syntaxerrors-and-2-warnings/34401/5 "2020-12-03T07:33:08Z")

</div>

Closed on December 3, 2020, 7:33am UTC

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