centricular/gstwebrtc-demos

Unable to connect to server, did you add an exception for the certificate?

dudulashok opened this issue · 4 comments

Can you explain how to install web server?

First I generated a self-signed certificate with ./generate_cert.sh and started the server with ./simple-server.py.

I served the js/ directory on the root of website , and opened index.html file.

I found the error:
Unable to connect to server, did you add an exception for the certificate?
Too many connection attempts, aborting. Refresh page to try again

But https://webrtc.nirbheek.in/ is working fine.

Can anyone help me to fix this issue? I suspect it's ssl certificate issue, but confused.

The simple server is running on port 8443, unless you changed it. You need to visit http://localhost:8443/ manually and accept/add an exception for the self-signed cert so the browser knows it's OK.

Or, you can point the simple-server at a real cert with a --cert-path argument

When I started the server with ./generate_cert.sh, I got the output as below:

Using TLS with keys in '.'
Listening on https://8443

Server is working, I tested with running ./session-client.py

But when I'm serving the js/ directory on the root of website , and opened index.html file, I found the following error:
Unable to connect to server, did you add an exception for the certificate?
Too many connection attempts, aborting. Refresh page to try again

Is it required to give the path of certificate to it? It's not showing any ID.

I'm new to this area, kindly bear with me.

I already told you the answer. The webpage is trying to open a connection to the server running on port 8443, but it rejects the self-signed certificate that server is offering. You need to point your web browser at http://localhost:8443/ and add an exception for the certificate manually first.

Thank you. It's working.