# Zoom Video Web SDK - Uncaught TypeError: Cannot read properties of undefined (reading 'malloc')

**URL:** <https://devforum.zoom.us/t/zoom-video-web-sdk-uncaught-typeerror-cannot-read-properties-of-undefined-reading-malloc/56926>\
**Category:** Web\
**Created:** [September 4, 2021, 1:19pm UTC](https://devforum.zoom.us/t/zoom-video-web-sdk-uncaught-typeerror-cannot-read-properties-of-undefined-reading-malloc/56926 "2021-09-04T13:19:29Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![phucnd](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/phucnd/32/17336_2.png) [@phucnd](https://devforum.zoom.us/u/phucnd)\
**Post date:** [September 4, 2021, 1:19pm UTC](https://devforum.zoom.us/t/zoom-video-web-sdk-uncaught-typeerror-cannot-read-properties-of-undefined-reading-malloc/56926/1 "2021-09-04T13:19:29Z")

</div>

**Description**

I have use this project.

# [zoom](https://github.com/zoom)/ **[sample-app-videosdk](https://github.com/zoom/sample-app-videosdk)**

It runs normally on local but when I build a project with `yarn build`  
And deploy on server

The project has a bug that prevents me from sharing screens and videos.

Please check it, thanks

**Error**

 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/d/2/d24def51659bb3cea465e08006b4fcd67fdb066b.png)

**Which Web Video SDK version?**  
[1.1.3.1](https://github.com/zoom/sample-app-videosdk/releases/tag/1.1.3.1)

---

<div class="post-metadata">

**Author:** ![phucnd](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/phucnd/32/17336_2.png) [@phucnd](https://devforum.zoom.us/u/phucnd)\
**Post date:** [September 6, 2021, 1:57am UTC](https://devforum.zoom.us/t/zoom-video-web-sdk-uncaught-typeerror-cannot-read-properties-of-undefined-reading-malloc/56926/2 "2021-09-06T01:57:01Z")

</div>

I have updated to [Web Video SDK 1.1.4+](https://www.npmjs.com/package/@zoom/videosdk), but it still happen.

---

<div class="post-metadata">

**Author:** ![vic.yang](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/vic.yang/32/24656_2.png) [@vic.yang](https://devforum.zoom.us/u/vic.yang)\
**Post date:** [September 6, 2021, 2:41am UTC](https://devforum.zoom.us/t/zoom-video-web-sdk-uncaught-typeerror-cannot-read-properties-of-undefined-reading-malloc/56926/3 "2021-09-06T02:41:34Z")

</div>

Hey @phucnd

Thanks for your feedback.

Could you please provide the platform, browser, and procedure for reproducing the errors? It’s very helpful to us troubleshoot the issue.

Thanks  
Vic

---

<div class="post-metadata">

**Author:** ![poufy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/poufy/32/31025_2.png) [@poufy](https://devforum.zoom.us/u/poufy)\
**Post date:** [September 20, 2021, 10:17am UTC](https://devforum.zoom.us/t/zoom-video-web-sdk-uncaught-typeerror-cannot-read-properties-of-undefined-reading-malloc/56926/5 "2021-09-20T10:17:37Z")

</div>

Did you manage to find a solution? I just deployed my app to AWS Amplify and I am running across the same issue.

---

<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 20, 2021, 7:12pm UTC](https://devforum.zoom.us/t/zoom-video-web-sdk-uncaught-typeerror-cannot-read-properties-of-undefined-reading-malloc/56926/6 "2021-09-20T19:12:47Z")

</div>

Hey @poufy ,

Can you confirm the dependent assets are accessible in your production env?

> **[Integrate SDK into your app - Getting started - Web - Video SDKs - Zoom...](https://marketplace.zoom.us/docs/sdk/video/web/build/integrate#self-hosted)**
>
> Integrate SDK into your app
> 
> 
> 
> Before using the Video SDK, you must:
> 
> Get an SDK key and secret for authentication. Login to the Zoom Marketplace and Cr...

Please also make sure if you are using Chrome Origin Trials that you have enabled them on your production domain: [https://marketplace.zoom.us/docs/sdk/native-sdks/web/advanced/web-isolation](https://marketplace.zoom.us/docs/sdk/native-sdks/web/advanced/web-isolation)

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![phucnd](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/phucnd/32/17336_2.png) [@phucnd](https://devforum.zoom.us/u/phucnd)\
**Post date:** [September 21, 2021, 3:08pm UTC](https://devforum.zoom.us/t/zoom-video-web-sdk-uncaught-typeerror-cannot-read-properties-of-undefined-reading-malloc/56926/7 "2021-09-21T15:08:56Z")

</div>

I have changed

```auto
await zmClient.init("en-US", `${window.location.origin}/lib`, 'zoom.us');
 to    
await zmClient.init('en-US', 'Global');

```

It works normally but does not use the **`lib`** in local. 😷

---

<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 21, 2021, 5:05pm UTC](https://devforum.zoom.us/t/zoom-video-web-sdk-uncaught-typeerror-cannot-read-properties-of-undefined-reading-malloc/56926/8 "2021-09-21T17:05:28Z")

</div>

Hey @phucnd ,

That is correct, you can either host the assets yourself and provide the path to them in `zmClient.init()` or use our CDN. 🙂

-Tommy

---

<div class="post-metadata">

**Author:** ![poufy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/poufy/32/31025_2.png) [@poufy](https://devforum.zoom.us/u/poufy)\
**Post date:** [September 28, 2021, 11:44pm UTC](https://devforum.zoom.us/t/zoom-video-web-sdk-uncaught-typeerror-cannot-read-properties-of-undefined-reading-malloc/56926/9 "2021-09-28T23:44:26Z")

</div>

Hey Tommy, I just confirmed that I can access the files from the /lib which is placed inside my public folder, however, the exact same issue still persists.

I would not mind using your CDN, but when I replaced the local path with ‘GLOBAL’ when the GET request is sent to the CDN, it returns error code 403, so I can’t access the CDN either. Could you help with that?

---

<div class="post-metadata">

**Author:** ![poufy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/poufy/32/31025_2.png) [@poufy](https://devforum.zoom.us/u/poufy)\
**Post date:** [September 29, 2021, 9:10am UTC](https://devforum.zoom.us/t/zoom-video-web-sdk-uncaught-typeerror-cannot-read-properties-of-undefined-reading-malloc/56926/10 "2021-09-29T09:10:43Z")

</div>

I also just tried to replace ‘GLOBAL’ with the CDN link like so

```auto
await zmClient.init("en-US", 'https://dmogdx0jrul3u.cloudfront.net/2.0.0/lib');

```

It works perfectly fine locally, however, when it is deployed to AWS I get this error:

 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/2/e/2e1e341d3a1aa9d4b28f5e37a0b2c4f1494f2f79.png)

---

<div class="post-metadata">

**Author:** ![poufy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/poufy/32/31025_2.png) [@poufy](https://devforum.zoom.us/u/poufy)\
**Post date:** [September 29, 2021, 3:23pm UTC](https://devforum.zoom.us/t/zoom-video-web-sdk-uncaught-typeerror-cannot-read-properties-of-undefined-reading-malloc/56926/12 "2021-09-29T15:23:03Z")

</div>

I finally got it to work! I used the Chrome Origin Trials to enable SharedArrayBuffers and it works as expected now!

One question though, it seems like when I use my phone’s browser, I can connect to the meeting and see my phone’s video through my browser, however, I cannot see any of the participants’ videos through my phone’s browser. Is that behavior expected?

---

<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 29, 2021, 4:34pm UTC](https://devforum.zoom.us/t/zoom-video-web-sdk-uncaught-typeerror-cannot-read-properties-of-undefined-reading-malloc/56926/13 "2021-09-29T16:34:32Z")

</div>

Hey @poufy ,

Happy to hear you got it working! 🙂

Unfortunately the Web Video SDK do not support mobile browsers at this time: [https://marketplace.zoom.us/docs/sdk/video/web#browser-support](https://marketplace.zoom.us/docs/sdk/video/web#browser-support)

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![poufy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/poufy/32/31025_2.png) [@poufy](https://devforum.zoom.us/u/poufy)\
**Post date:** [September 30, 2021, 7:49am UTC](https://devforum.zoom.us/t/zoom-video-web-sdk-uncaught-typeerror-cannot-read-properties-of-undefined-reading-malloc/56926/14 "2021-09-30T07:49:11Z")

</div>

I see. I actually read the label that mobile browsers are not supported, but when I connected and managed to see my phone’s video from my browser I thought I could somehow get it to work. I assume that is not possible if there is no support for it yet.

---

<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 30, 2021, 3:34pm UTC](https://devforum.zoom.us/t/zoom-video-web-sdk-uncaught-typeerror-cannot-read-properties-of-undefined-reading-malloc/56926/15 "2021-09-30T15:34:19Z")

</div>

Correct @poufy .

It is not fully supported. That being said, mobile browser support is one of our priorities. Stay tuned! 🙂

-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 31, 2021, 1:35am UTC](https://devforum.zoom.us/t/zoom-video-web-sdk-uncaught-typeerror-cannot-read-properties-of-undefined-reading-malloc/56926/16 "2021-10-31T01:35:04Z")

</div>

Closed on October 31, 2021, 1:35am UTC

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