# VideoSDK with CapacitorJS: Getting "connection error"

**URL:** <https://devforum.zoom.us/t/videosdk-with-capacitorjs-getting-connection-error/111656>\
**Category:** Video SDK\
**Tags:** phone, video-sdk\
**Created:** [June 10, 2024, 1:39pm UTC](https://devforum.zoom.us/t/videosdk-with-capacitorjs-getting-connection-error/111656 "2024-06-10T13:39:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![hannes.ingelhag](https://avatars.discourse-cdn.com/v4/letter/h/3ab097/32.png) [@hannes.ingelhag](https://devforum.zoom.us/u/hannes.ingelhag)\
**Post date:** [June 10, 2024, 1:39pm UTC](https://devforum.zoom.us/t/videosdk-with-capacitorjs-getting-connection-error/111656/1 "2024-06-10T13:39:15Z")

</div>

We are migrating atm from Twilio to Zoom for our product. We have almost everything in place but when testing out the VideoSDK for our mobile apps(Android + iOS) we get:

```auto
{"type":"JOIN_MEETING_FAILED","reason":"connection error","errorCode":200}

```

when we try to start the meeting. On our web application everything works smooth. Do you know what we need to do to get it to work?

Are using:

```auto
"@capacitor/cli": "5.7.0",
"@zoom/videosdk": "1.11.6",
"vue": "3.4.19",
"typescript": "5.3.3",
"vite": "4.4.9",

```

---

<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:** [June 11, 2024, 2:34am UTC](https://devforum.zoom.us/t/videosdk-with-capacitorjs-getting-connection-error/111656/2 "2024-06-11T02:34:59Z")

</div>

Hey @hannes.ingelhag

Thanks for your feedback.

Based on the error message, this is likely a network issue.

Can you open the devtools and check if the request to `https://zoom.us/wc/lsdk` is receiving a normal response?

Thanks  
Vic

---

<div class="post-metadata">

**Author:** ![hannes.ingelhag](https://avatars.discourse-cdn.com/v4/letter/h/3ab097/32.png) [@hannes.ingelhag](https://devforum.zoom.us/u/hannes.ingelhag)\
**Post date:** [June 11, 2024, 6:35am UTC](https://devforum.zoom.us/t/videosdk-with-capacitorjs-getting-connection-error/111656/3 "2024-06-11T06:35:13Z")

</div>

HI Vic,

Yes, everything looks normal there: [zoomsdkjsonpcallback1({ "status": true, "errorCode": 0, "result": - Pastebin.com](https://pastebin.com/uc5bDyYG)

I’m getting the error when trying to join the meeting

```auto
client.join(room, token, "firstName lastName");

```

I’m getting the same error from the connection-change function

```auto
 client.on("connection-change", (payload) => {
    console.log("on connection-change", payload);
});

```

Resulting in

```auto
on connection-change {"state":"Fail","reason":"connection error","errorCode":-3000}

```

Sometimes the error code is `-3000` and sometimes `200`.

When reading the logs from xcode i’m getting 👇 if that helps…

````auto

⚡️ TO JS {"headers":{"Access-Control-Allow-Origin":"*","Strict-Transport-Security":"max-age=31536000; includeSubDomains","NEL":"{\"report_to\":\"network-errors\",\"max_age\":31536000,\"include_subdomains\":true,\"success_fraction\":0.01,\"failure_fraction\":1.0}","...
⚡️ TO JS {"status":200,"data":"{\"rwg\":\"zoomams1591242121rwg.ams.zoom.us\",\"rwcAuth\":\"MTcxODA4Njc3NTczOC690qecouy-ue3cdpLkX2lZsPGdB8pldMskrRPgrATF-w\"}","url":"https:\/\/rwcams.ams.zoom.us\/wc\/ping\/98605521839?ts=1718086775396&auth=UI0K78Q4S7pZm0Ji_FNSEXJh8J...
⚡️ TO JS {"headers":{"Content-Length":"115","Server":"RWC-http-1.1","Access-Control-Expose-Headers":"rwg, rwcAuth, Call-ID","Access-Control-Allow-Origin":"*","X-XSS-Protection":"1; mode=block","Report-To":"{\"group\":\"network-errors\",\"max_age\":31536000,\"endpoi...
⚡️ TO JS {"status":200,"headers":{"referrer-policy":"strict-origin-when-cross-origin","Content-Length":"2","Content-Type":"application\/json; charset=utf-8","x-permitted-cross-domain-policies":"none","x-frame-options":"SAMEORIGIN","x-runtime":"0.226160","server-tim...
⚡️ TO JS {"status":200,"url":"https:\/\/rwcny.ny.zoom.us\/wc\/ping\/98605521839?ts=1718086775396&auth=UI0K78Q4S7pZm0Ji_FNSEXJh8J-6xmZb4r34z-fGIZA&rwcToken=wN7lJLRNkJpdF5N_do6X7k0H2oI7zrVqSCuesWsIEWA&dmz=1","data":"{\"rwg\":\"zoomiad20624714339rwg.iad.zoom.us\",\"rw...
⚡️ TO JS {"url":"https:\/\/rwcdv.dv.zoom.us\/wc\/ping\/98605521839?ts=1718086775396&auth=UI0K78Q4S7pZm0Ji_FNSEXJh8J-6xmZb4r34z-fGIZA&rwcToken=cyUEYMWAhjMStNLab_z39cNhjDh9KqBhyfIDwtkNsoQ&dmz=1","headers":{"Server":"RWC-http-1.1","X-XSS-Protection":"1; mode=block","C...
⚡️ TO JS {"data":"{\"rwg\":\"zoomdv8512878rwg.dv.zoom.us\",\"rwcAuth\":\"MTcxODA4Njc3NzYxMy7hHiYOYN-4vvDxJlvXyg7-YOqJNi6iAUdBN6mwq2pxmA\"}","headers":{"Report-To":"{\"group\":\"network-errors\",\"max_age\":31536000,\"endpoints\":[{\"url\":\"https:\/\/log-gateway.zo...
⚡️ TO JS {"url":"https:\/\/rwcsc.sc.zoom.us\/wc\/ping\/98605521839?ts=1718086775396&auth=UI0K78Q4S7pZm0Ji_FNSEXJh8J-6xmZb4r34z-fGIZA&rwcToken=CRwUsiXOD0Y3nKoSoSO3JFbEXCSCyZKqNhC0aV_rSBQ&dmz=1","data":"{\"rwg\":\"zoomsjc1441952092rwg.sjc.zoom.us\",\"rwcAuth\":\"MTcx...
⚡️ [log] - on connection-change {"state":"Fail","reason":"connection error","errorCode":-3000}
⚡️ [error] - {"type":"JOIN_MEETING_FAILED","reason":"connection error","errorCode":-3000}
⚡️ TO JS {"status":200,"data":"OK","headers":{"Content-Length":"2","Date":"Tue, 11 Jun 2024 06:19:40 GMT","bugsnag-event-id":"6667ec7c00ee65d8e36c0000","Content-Type":"text\/plain; charset=utf-8","Access-Control-Allow-Origin":"*","Via":"1.1 google","Alt-Svc":"h3=\"...
⚡️ TO JS {"data":"","url":"https:\/\/log-external-gateway.zoom.us\/meeting-external","status":200,"headers":{"Server":"zoom","Content-Type":"application\/octet-stream","Date":"Tue, 11 Jun 2024 06:19:41 GMT","Transfer-Encoding":"Identity","Connection":"keep-alive"}}
```
````

---

<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:** [June 12, 2024, 10:39am UTC](https://devforum.zoom.us/t/videosdk-with-capacitorjs-getting-connection-error/111656/4 "2024-06-12T10:39:10Z")

</div>

Hey @hannes.ingelhag

Thanks for sharing the detailed context of this issue with us.

From the logs, we suspect that the web socket connection to the server failed.

Could you check if there are any CSP rules or related CapacitorJs configurations that might be causing the web socket connection to fail?

Thanks  
Vic
