daquinoaldo/https-localhost

ERR_SSL_PROTOCOL_ERROR in Chrome

bknill opened this issue · 2 comments

This appears to be running normally in an Electron app.

Node - 12.2.0
Electron - 5.0.6

Loading https://localhost:8000 shows:

This site can’t provide a secure connection
localhost sent an invalid response.
ERR_SSL_PROTOCOL_ERROR

Is there any way to debug this?

Hi @bknill,
which OS and which Chrome version are you using?

I use Chrome as default browser and I never experimented this issue, so I suppose is related to an error occurred during the execution of the install script. Let's try to debug together! :)

It seems that the certificate has been generated (the script prints Server running on port 443.) but has not been signed as trusted.

Try to remove the config folder and run again https-localhost (try just sudo serve). This will force the script to generate a new certificate and install it. If asks for password is your sudo password; it's needed to trust the certificate. On MacOS and Windows it may ask you to allow the operation with a graphic prompt.
Here you can find the path of the config folder:

// Linux
/home/<username>/.config/https-localhost

// Mac OS
/Users/<username>/Library/Application\ Support/https-localhost

// Windows
C:\Users\<username>\AppData\Roaming\https-localhost

@bknill try this:

sudo apt install libnss3-tools
sudo rm ~/.config/https-localhost
sudo serve