Https suddenly stopped working, net::ERR_INSECURE_RESPONSE

Has anyone else run into this issue? I don’t believe I changed anything too crazy, but suddenly I can no longer reach the https version of my localhost and attempting to load the extension on twitch.tv gives:

net::ERR_INSECURE_RESPONSE

I’m running my backend with node ...../index.js and setting up the https like:

let options = {
    key  : fs.readFileSync('./boilerplate/certs/testing.key'),
    cert : fs.readFileSync('./boilerplate/certs/testing.crt')
};

const PORT = process.env.PORT || 8080;
https.createServer(options, app).listen(PORT, function () {
    console.log('Extension Boilerplate service running on https', PORT);
});

Check to make sure that the certificate is valid. Check the date and time of the cert against the current date and time.

Thanks for the response Alca,

I ended up trying to re-generate a cert and took the following steps:

sudo ./generate_local_ssh.sh
sudo cp testing.crt /usr/local/share/ca-certificates/
sudo ca-update-certificates
>> Updating certificates in /etc/ssl/certs...
>> 1 added, 1 removed; done.
>> Running hooks in /etc/ca-certificates/update.d...

>> Replacing debian:testing.pem
>> Removing debian:testing.pem
>> done.
>> done.

I then verified the certificate was added, then when I visit https://localhost:8080/viewer.html I get

NET::ERR_CERT_AUTHORITY_INVALID
Subject: localhost
Issuer: localhost
Expires on: Jun 27, 2020
Current date: Sep 30, 2017
PEM encoded chain:
-----BEGIN CERTIFICATE-----
MIIFdTCCA12gAwIBAgIJAJzGbYxA/pUnMA0GCSqGSIb3DQEBCwUAMG0xCzAJBgNV
BAYTAlVTMRMwEQYDVQQIDApDYWxpZm9ybmlhMRYwFAYDVQQHDA1TYW4gRnJhbmNp
c2NvMQ8wDQYDVQQKDAZUd2l0Y2gxDDAKBgNVBAsMA3dlYjESMBAGA1UEAwwJbG9j
YWxob3N0MB4XDTE3MTAwMTAzMTQzOFoXDTIwMDYyODAzMTQzOFowbTELMAkGA1UE
BhMCVVMxEzARBgNVBAgMCkNhbGlmb3JuaWExFjAUBgNVBAcMDVNhbiBGcmFuY2lz
Y28xDzANBgNVBAoMBlR3aXRjaDEMMAoGA1UECwwDd2ViMRIwEAYDVQQDDAlsb2Nh
bGhvc3QwggIiMA0GC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h7ng6uflUMCb34unz6TKt1TwaCqG+oJYOg2nsPA6vrWiHvvBwerqPihtyBBSek
ehufr2HdsZHqOrJmuqsCIthprHSbDbGpq3i7H4vVXkKRuEbxsGNVDy67IDzFruQJ
cU+LrFd9o7U9ZTd69dELarDPmRqkz1yuMjGM52RaXGqZNg82YIQPaY9yGruz9YE5
Ko8YIWus7RLN+Chvdm3ofDJ9OPKepAVOqeMDUZFve65WCtC22xMIb5ORDBJk7Hxp
22j9+jDZWool1ZA5noJYj+g5owjHx8ndgeDazKsftuHaTuMaFBgE8qa6fiJImrG1
IEKgtY2ab7S0SfAfehFVJQyeUsS9WDwbL43BNcqq0Ni0TK9EBeI574E92WLhA0yW
0N4u2hANBy6r
-----END CERTIFICATE-----

Edit: I should mention that on twitch, I get net::ERR_INSECURE_RESPONSE instead, and it seems to fail to process the GET.

Weird, so all I needed to do apparently was go on my localhost and click ‘Proceed Anyways’

Then my extension started loading on Twitch.tv

This added the certs to the machine that you ran the script on.

If you are trying to access from another computer the certs are not added/installed there, so you have to do the “proceed anyway” or use something else to SSL terminate rather than using Self Signed Certs.