VideoSDK with CapacitorJS: Getting "connection error"

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:

{"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:

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

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

HI Vic,

Yes, everything looks normal there: zoomsdkjsonpcallback1({ "status": true, "errorCode": 0, "result": - Pastebin.com

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

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

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

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

Resulting in

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 :point_down: if that helps…


⚡️  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"}}
```

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