Error:No connection to OpenVidu Server. This may be a certificate error at https://localhost.4443

I’m trying to implement Openvidu insecure-js in a client side application for which I followed this tutorial. I have taken the code from above tutorial github repo and made some changes to work with my client.

I’m running the OpenVidu Server in my localhost and also making use of Docker to keep the service up.In my client side application code I pointed my OPENVIDU_SERVER_URL to localhost to get the token. I’m facing an issue with certificate when I click on Join. Do i need to do anything else to make this work on a custom url other than localhost.

custom url(my orgurl)-https://myorgurl.com

I’m getting a alert like this:
myorgurl says
No connection to OpenVidu Server. This may be a certificate error at localhost.4443
Click Ok to navigate and accept it. If no certificate warning is shown, then check that your OpenVidu Server is up and running at localhost.4443

When I click OK my page reloads again with new participant details.

My Console Logs

‘OpenVidu’ initialized.
openvidu-browser version: 2.15.0.
No connection to OpenVidu Server. This may be a certificate error at localhost.4443
Leaving Session (forced=false).
You were not connected to the session undefined.
Navigated to myorgurl

Do I need to use these commands to generate a ssl certificate to run on my custom url

Generate a selfsigned certificate (run in your Docker console)

openssl req -newkey rsa:2048 -new -nodes -x509 -days 3650 -subj '//CN=www.mydom.com\O=My Company LTD.\C=US' -keyout key.pem -out cert.pem

Run with SSL flag

http-server -S

If you want openvidu-server to work in a specific URL, then you must initialize it with the following property:

DOMAIN_OR_PUBLIC_IP=myorgurl

You can also set the public port to be used with: HTTPS_PORT=443

1 Like