# TypeError: m.AK.connectSocket is not a function

**URL:** <https://devforum.zoom.us/t/typeerror-m-ak-connectsocket-is-not-a-function/98850>\
**Category:** Web\
**Created:** [November 22, 2023, 10:34am UTC](https://devforum.zoom.us/t/typeerror-m-ak-connectsocket-is-not-a-function/98850 "2023-11-22T10:34:34Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![mohammad.qebalah](https://avatars.discourse-cdn.com/v4/letter/m/46a35a/32.png) [@mohammad.qebalah](https://devforum.zoom.us/u/mohammad.qebalah)\
**Post date:** [November 22, 2023, 10:34am UTC](https://devforum.zoom.us/t/typeerror-m-ak-connectsocket-is-not-a-function/98850/1 "2023-11-22T10:34:34Z")

</div>

I’m using meeting SDK 2.18.0, with Next.js  
and I got this issue when join the meeting

error: “TypeError: m.AK.connectSocket is not a function”

---

<div class="post-metadata">

**Author:** ![shishir.gaire11](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/shishir.gaire11/32/54302_2.png) [@shishir.gaire11](https://devforum.zoom.us/u/shishir.gaire11)\
**Post date:** [November 28, 2023, 8:51am UTC](https://devforum.zoom.us/t/typeerror-m-ak-connectsocket-is-not-a-function/98850/2 "2023-11-28T08:51:38Z")

</div>

I am getting the same problem. Even while using the git repo of the zoom.  
Some suggestion will be great.

---

<div class="post-metadata">

**Author:** ![palejovr](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/palejovr/32/54323_2.png) [@palejovr](https://devforum.zoom.us/u/palejovr)\
**Post date:** [November 28, 2023, 9:54pm UTC](https://devforum.zoom.us/t/typeerror-m-ak-connectsocket-is-not-a-function/98850/4 "2023-11-28T21:54:20Z")

</div>

I have the same problem, please someone help us.

---

<div class="post-metadata">

**Author:** ![webda2l](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/webda2l/32/53894_2.png) [@webda2l](https://devforum.zoom.us/u/webda2l)\
**Post date:** [December 1, 2023, 1:43pm UTC](https://devforum.zoom.us/t/typeerror-m-ak-connectsocket-is-not-a-function/98850/5 "2023-12-01T13:43:45Z")

</div>

Same, maybe related to the React18 incompatibility with Client version.  
Kind of don’t understand why it’s not already fixed…

---

<div class="post-metadata">

**Author:** ![elisa.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/elisa.zoom/32/47836_2.png) [@elisa.zoom](https://devforum.zoom.us/u/elisa.zoom)\
**Post date:** [December 8, 2023, 3:27pm UTC](https://devforum.zoom.us/t/typeerror-m-ak-connectsocket-is-not-a-function/98850/6 "2023-12-08T15:27:25Z")

</div>

Hi all!  
We are looking into this issue, there is incompatibility with React 18 and the latest version of the meeting webSDK. Please try downgrading to React 16

---

<div class="post-metadata">

**Author:** ![ganeshparajuli199](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ganeshparajuli199/32/54734_2.png) [@ganeshparajuli199](https://devforum.zoom.us/u/ganeshparajuli199)\
**Post date:** [December 11, 2023, 12:19pm UTC](https://devforum.zoom.us/t/typeerror-m-ak-connectsocket-is-not-a-function/98850/7 "2023-12-11T12:19:01Z")

</div>

i am getting same issue in [meetingsdk-angular-sample](https://github.com/zoom/meetingsdk-angular-sample) also. can anyone help here?

---

<div class="post-metadata">

**Author:** ![mohammad.qebalah](https://avatars.discourse-cdn.com/v4/letter/m/46a35a/32.png) [@mohammad.qebalah](https://devforum.zoom.us/u/mohammad.qebalah)\
**Post date:** [December 12, 2023, 4:54am UTC](https://devforum.zoom.us/t/typeerror-m-ak-connectsocket-is-not-a-function/98850/8 "2023-12-12T04:54:31Z")

</div>

@ganeshparajuli199 @elisa.zoom @palejovr @webda2l @shishir.gaire11

guys I solve it, u can use version (2.16.0):

```auto
const { ZoomMtg } = await import('@zoomus/websdk')
    ZoomMtg.setZoomJSLib('https://source.zoom.us/2.16.0/lib', '/av')

```

even with react and react-dom 18

---

<div class="post-metadata">

**Author:** ![lucasdallier](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/lucasdallier/32/54768_2.png) [@lucasdallier](https://devforum.zoom.us/u/lucasdallier)\
**Post date:** [December 12, 2023, 1:14pm UTC](https://devforum.zoom.us/t/typeerror-m-ak-connectsocket-is-not-a-function/98850/9 "2023-12-12T13:14:34Z")

</div>

@mohammad.qebalah @elisa.zoom

I did exactly what you said:

```auto
const { ZoomMtg } = await import('@zoomus/websdk')
    ZoomMtg.setZoomJSLib('https://source.zoom.us/2.16.0/lib', '/av')

```

and left my package.json as follows:

```auto
"dependencies": {
    "@testing-library/jest-dom": "^6.1.4",
    "@testing-library/react": "^14.0.0",
    "@testing-library/user-event": "^14.5.1",
    "@zoomus/websdk": "^2.16.0",
    "react": "^18.2.0",
    "react-dev-utils": "^12.0.1",
    "react-dom": "^18.2.0",
    "react-scripts": "^5.0.1",
    "web-vitals": "^3.5.0"
  },

```

but when I connect to the call I get the following error on the web:

```auto
Uncaught runtime errors:

ERROR
JsMediaSDK_Instance is not defined
ReferenceError: JsMediaSDK_Instance is not defined
    at Nt (http://localhost:3000/static/js/vendors-node_modules_zoomus_websdk_index_js.chunk.js:188098:15)
    at d (http://localhost:3000/static/js/vendors-node_modules_zoomus_websdk_index_js.chunk.js:68025:34)
    at b (http://localhost:3000/static/js/vendors-node_modules_zoomus_websdk_index_js.chunk.js:68085:209)
    at Z (http://localhost:3000/static/js/vendors-node_modules_zoomus_websdk_index_js.chunk.js:192163:2275)
    at combination (http://localhost:3000/static/js/vendors-node_modules_zoomus_websdk_index_js.chunk.js:321890:29)
    at dispatch (http://localhost:3000/static/js/vendors-node_modules_zoomus_websdk_index_js.chunk.js:321652:22)
    at http://localhost:3000/static/js/vendors-node_modules_zoomus_websdk_index_js.chunk.js:321363:16
    at Object.zmg_setMeetingInfo (http://localhost:3000/static/js/vendors-node_modules_zoomus_websdk_index_js.chunk.js:321904:12)
    at a.value (http://localhost:3000/static/js/vendors-node_modules_zoomus_websdk_index_js.chunk.js:63662:21)
    at C (http://localhost:3000/static/js/vendors-node_modules_zoomus_websdk_index_js.chunk.js:198516:178)

```

---

<div class="post-metadata">

**Author:** ![palejovr](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/palejovr/32/54323_2.png) [@palejovr](https://devforum.zoom.us/u/palejovr)\
**Post date:** [December 12, 2023, 7:32pm UTC](https://devforum.zoom.us/t/typeerror-m-ak-connectsocket-is-not-a-function/98850/10 "2023-12-12T19:32:41Z")

</div>

Hi, I also tried, but I had the same error.

---

<div class="post-metadata">

**Author:** ![mohammad.qebalah](https://avatars.discourse-cdn.com/v4/letter/m/46a35a/32.png) [@mohammad.qebalah](https://devforum.zoom.us/u/mohammad.qebalah)\
**Post date:** [December 13, 2023, 4:25am UTC](https://devforum.zoom.us/t/typeerror-m-ak-connectsocket-is-not-a-function/98850/11 "2023-12-13T04:25:56Z")

</div>

One more thing guys. I’m using React.js (CRA) not Next.js  
here’s the package-json:

```auto
    "@zoomus/websdk": "2.16.0",
    "graphql": "^16.8.1",
    "react": "^18.2.0",
    "react-dom": "^18.2.0",

```

the thing is, I created a react app just for the meeting and deploy it on a sub domain just for it like ([meetings.xxx.com](http://meetings.xxx.com)), so in future I can use it with any other app.

---

<div class="post-metadata">

**Author:** ![siddiqbarbhuiya](https://avatars.discourse-cdn.com/v4/letter/s/a698b9/32.png) [@siddiqbarbhuiya](https://devforum.zoom.us/u/siddiqbarbhuiya)\
**Post date:** [December 14, 2023, 5:51am UTC](https://devforum.zoom.us/t/typeerror-m-ak-connectsocket-is-not-a-function/98850/12 "2023-12-14T05:51:21Z")

</div>

After downgrading to React 16, same problem. At least, represent your thoughts on git repo which was given to us by zoom.  
You are saying React is not compatible with the latest zoom, then in the repo, why the user has used the React version 18.

---

<div class="post-metadata">

**Author:** ![ganeshparajuli199](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ganeshparajuli199/32/54734_2.png) [@ganeshparajuli199](https://devforum.zoom.us/u/ganeshparajuli199)\
**Post date:** [December 14, 2023, 11:26am UTC](https://devforum.zoom.us/t/typeerror-m-ak-connectsocket-is-not-a-function/98850/13 "2023-12-14T11:26:42Z")

</div>

hello @mohammad.qebalah can you test on angular sample from your side. It will be great help.

---

<div class="post-metadata">

**Author:** ![elisa.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/elisa.zoom/32/47836_2.png) [@elisa.zoom](https://devforum.zoom.us/u/elisa.zoom)\
**Post date:** [December 14, 2023, 7:50pm UTC](https://devforum.zoom.us/t/typeerror-m-ak-connectsocket-is-not-a-function/98850/14 "2023-12-14T19:50:18Z")

</div>

hey @siddiqbarbhuiya  
we are working on a fix to that repo too and an overal fix to this issue.  
In the meantime the workaround that I provided works with the sample app

---

<div class="post-metadata">

**Author:** ![palejovr](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/palejovr/32/54323_2.png) [@palejovr](https://devforum.zoom.us/u/palejovr)\
**Post date:** [December 14, 2023, 8:02pm UTC](https://devforum.zoom.us/t/typeerror-m-ak-connectsocket-is-not-a-function/98850/15 "2023-12-14T20:02:22Z")

</div>

I try with angular but i have the same problem.

 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/6/668db694283040e406b168eba0415d4b53b228a0.png)  
 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/5/3/53ad8f0ac6b3f78506b69617fde8aa851c334a23.png)

---

<div class="post-metadata">

**Author:** ![palejovr](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/palejovr/32/54323_2.png) [@palejovr](https://devforum.zoom.us/u/palejovr)\
**Post date:** [December 14, 2023, 8:05pm UTC](https://devforum.zoom.us/t/typeerror-m-ak-connectsocket-is-not-a-function/98850/16 "2023-12-14T20:05:03Z")

</div>

With version 16 it gives the following error:  
JsMediaSDK\_Instance is not defined

---

<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 14, 2024, 6:05am UTC](https://devforum.zoom.us/t/typeerror-m-ak-connectsocket-is-not-a-function/98850/17 "2024-01-14T06:05:33Z")

</div>

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