386

I try to get my local development in Chrome back running, but Chrome prevents that, with the message that the certificate is invalid. Even though it could not be the date of the certificate, as you can see in the screenshot of it:

enter image description here

I just wonder why there is no advanced > option to proceed anyway to see the website and being able to locally develop the app.

A few more things to mention:

  • The local development runs on https://local.app.somecompany.com:4200/. It can't be just localhost, because otherwise our authentication http-only cookies won't work in Chrome.
  • Therefore the host file under etc/hosts was adjusted to point to the localhost IP adress (127.0.0.1).
  • The certificate was generated with openssl according to this tutorial and this repo
  • The certificate works for a colleague with the exact same Chrome version but with a MacOS version 10.14.6 (mine right now is MacOS 10.15.1)
  • The chrome flag(chrome://flags/#allow-insecure-localhost) does not change anything
  • Also works in firefox on my laptop.

Can't find anything online that helped me to solve this so far, so I would be extremly thankful, if anyone has some more ideas what I could try!?

Specs:

  • OS: MacOS 10.15.1
  • Chrome: 78.0.3904.97
DarioSoller
  • 3,909
  • 3
  • 12
  • 6

15 Answers15

1120

FYI: Chrome on MacOS treats this different than Windows. MacOS version won't see the proceed button even you click advanced button.

To still proceed the visit as you are sure this page is safe, here is a easy way to do:

There's a secret passphrase built into the error page. Just make sure the page is selected (click anywhere on the screen), and just type thisisunsafe.

Ref: https://twitter.com/zairwolf/status/1196878125734486021

arun kumar
  • 15
  • 2
harrrrrrry
  • 13,643
  • 2
  • 23
  • 28
  • 4
    Thanks! it was useful. Do you know any way to make custom certificates as trusted for browser? adding to to keychain doesn't help. – Ilfat Galiev Dec 13 '19 at 18:47
  • Chrome 80.0.3987.87 just made this solution more annoying. It still works but every time my application is updated or the page is refreshed, the "unsafe" screen shows. – austinthedeveloper Feb 07 '20 at 16:42
  • i normally get the procced link in chrome on mac but its not appearing today for some reason, this solution is fantastic thank you for sharing – alex3410 May 18 '20 at 11:05
  • Amazing! Thank you for the "thisisunsafe" method. That was a It really shows how broken security is on the web ! – Gianluca Ghettini Apr 21 '21 at 18:05
  • how do i revert this. it redirects me to a website i've never seen before. so im paranoid and i want to revert it. im on mac. – Ilir May 15 '21 at 11:47
  • 2
    i would have suggested `google,thisisstupid_stahppit` also, it's hilarious that they presume the local clock is wrong instead of the cert is "very expired", statistically speaking it makes sense, but really, if you can't trust the local clock in this case why would you be able to trust it if it's aligned to be within the certificate's window... – fartwhif May 17 '21 at 14:36
  • this also works for the v3.8x version of vivaldi. – pdwalker May 20 '21 at 05:26
  • 4
    Does not work on chrome _Version 91.0.4472.77 (Official Build) (x86_64)_ on macOS ;( – WestCoastProjects Jun 08 '21 at 01:21
  • Wow. Thanks. This is insane. Worked fine on Version 92.0.4515.131 (Official Build) (x86_64) Mac – Yash Aug 16 '21 at 14:27
  • This worked for me. Thanks. Saved the day. I'm using MacOS BigSur 11.6 and Chrome Version 94.0.4606.71 (Official Build) (x86_64) – Rakshitha Muranga Rodrigo Oct 12 '21 at 14:48
  • 3
    At time of writing, the cheat code (`BYPASS_SEQUENCE`) is encoded in base64 at https://github.com/chromium/chromium/blob/f8d4f3dec98d8a9836847c256753a12cd3e809ce/components/security_interstitials/core/browser/resources/interstitial_large.js#L19 – mwfearnley Dec 16 '21 at 14:52
  • For what it's worth, I have encountered this error on Mac and Windows. I think the conditions for triggering this particular error may vary though, depending on the OS. – mwfearnley Apr 21 '22 at 08:16
  • .... ok, BUT is there a way to bypass this without digit thisisunsafe every time I visit the site ? I tried to flag "alway trust" in the certificate but this is not sufficient. – obe6 Jun 23 '22 at 13:18
270

There is a hidden way to bypass that error, even if no button allows it. Of course, this should be used for your own sites only – where you are perfectly sure that site is not hacked, but simply local and therefore without a valid internet certificate.

Simply click anywhere on the denial page and type “thisisunsafe”.

Sounds crazy, but works to bypass chrome’s supervision of your safety. Chrome should get kicked for not accepting the certificate of devices in my local network. This is not IoT, this is "Ny Net"!

Tom Stein
  • 2,827
  • 1
  • 7
  • 5
117

This solution worked for me.

  • Right click, select inspect element
  • click on console tab
  • Copy paste sendCommand(SecurityInterstitialCommandId.CMD_PROCEED) press Enter

Boom! it should load the page :)

Nikesh
  • 1,217
  • 1
  • 8
  • 6
26

To make even macOS Chrome show the "Proceed" link under advanced, make sure to create the certificate with the TLS Web Server Authentication in the X509 extensions.

Here's a oneliner to create with that extension:

openssl req \
  -newkey rsa:2048 \
  -x509 \
  -new \
  -nodes \
  -keyout server.key \
  -out server.crt  \
  -subj /CN=test1   \
  -sha256  \
  -days 3650  \
  -addext "subjectAltName = DNS:foo.co.uk,IP:127.0.0.1,IP:192.168.1.1" \
  -addext "extendedKeyUsage = serverAuth"

If you MacOS openssl does not have addext option, then use this alternate form:

openssl req \
  -newkey rsa:2048 \
  -x509 \
  -nodes \
  -keyout server.key \
  -new \
  -out server.crt \
  -subj /CN=test1 \
  -extensions v3_new \
  -config <(cat /System/Library/OpenSSL/openssl.cnf \
  <(printf '[v3_new]\nsubjectAltName=DNS:a.spectrocloud.com\nextendedKeyUsage=serverAuth')) \
  -sha256 \
  -days 3650

The key being extendedKeyUsage=serverAuth.

Saad Malik
  • 1,598
  • 1
  • 18
  • 20
12

After a long search, I have found a solution. This solution is for mac.

  1. First, got to settings.
  2. Search for manage certificates. KeychainAccess will open.
  3. Try to find the name of the certificate, for example localhost was the name in my case. If you click on the certificate it will show the details.
  4. Then the Trust section you have to select Always Trust for "when using this certificate".
  5. Now check in the browser again. You will directly be able to access the page. Privacy error, Your connection is not private message will not come.
prisar
  • 3,041
  • 2
  • 26
  • 27
12

in MacOS Catalina I had it working by:

  1. copy pasting the PEM certificate content into a text editor (such as vi) and saving it as a .pem file (e.g. localhost.pem)
  2. in finder, open the cert file you've just created and add it to the System Keychain
  3. a Keychain Access window will be show; open your localhost cert
  4. set "Always Trust" for Secure Sockets Layer (SSL) as depicted below

enter image description here

That's it, refresh your browser and it should work just fine :)

10

Click on advance and then Click on the Page (not the address bar) and type --> "thisisunsafe" (without the double quotes) and press enter, you will not see what you typed but believe me it will work :) and you will be able to access the URL.

Aukta
  • 163
  • 1
  • 11
8

Make a browser trust an SSL certificate

In Chrome, we can write the following URL in the search bar: chrome://flags/#allow-insecure-localhost and activate the relative option.

courtesy:https://www.thomasvitale.com/https-spring-boot-ssl-certificate/

Raj P
  • 155
  • 1
  • 2
  • 7
3

This error can be simply bypassed by starting the chrome in insecure mode as follows.

google-chrome --args --disable-web-security --allow-running-insecure-content --user-data-dir=/tmp/chrome-insecure/ -ignore-certificate-errors
Udara Seneviratne
  • 2,303
  • 1
  • 33
  • 49
2

So after adding this question a colleague found this thread.

There seem to be two options to solve this issue:

  • Just install the certificate in MacOS key chain. Then double click on it and under "trust" select "always trust".
  • Generate a certificate according to the new MacOS Catalina specs.
DarioSoller
  • 3,909
  • 3
  • 12
  • 6
2

Just click on "Not Secure" on search bar of chrome denial page , then click certificate, then you can see your certificate. click on Trust option do always trust.

1

A possible solution is to launch Chrome with parameter "--ignore-certificate-errors".

Steps for Mac OS:

  • Close Chrome.
  • From the Finder, select “Go” > “Utilities“.
  • Launch “Terminal“.
  • Type the following command, then press “Enter“:

    /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --ignore-certificate-errors &> /dev/null &

Solution from https://www.technipages.com/google-chrome-bypass-your-connection-is-not-private-message

Ilya
  • 21
  • 3
  • 1
    This solves the problem, but always keep in mind that this solution changes chrom completely: Never open another tab to another internet site, as that will ignore certificate errors as well. It's a pitty that Chrome can not easily be told to accept site-specific certificate errors, as this is my PC, my Chrome and my IoT-device without any cloud. – Tom Stein Apr 10 '21 at 11:52
  • Not supported on _macOS_ ?? – WestCoastProjects Jun 08 '21 at 01:19
0

I was struggling with same issue on multiple browsers. After banging my head around, I looked for any invalid certificate(s) or entries having red cross icon underneath, and deleted them. Afterwards, I never came across that error screen saying 'You connection is not private'

If you are on Mac, follow steps below:

  • Open Keychain Access
  • Select System Roots from left bar
  • Navigate to Certificates Tab
  • Locate any invalid certificate with red cross icon, Right click and hit Delete

And also follow:

  • Select System from left bar
  • Navigate to All Items and Passwords Tab(s)
  • Locate any invalid entry with red cross icon, Right click and hit Delete

Now refresh and see if it works for you.

0

FOR WINDOWS USERS RUNNING Self-Signed Certs on LOCALHOST

  • Navigate to the folder that contains your [name].crt file
  • Double-click the .crt file
  • Click "Install Certificate"
  • Select which location you want and click next
  • Select "Place all certificates in the following store" then click browser
  • Select "Trusted Root Certificate Authorities" as the location then click next
  • Then click finish

Backtrack to your localhost site and refresh the page. Make the API call with crossed fingers and the ERROR should go away.

Tux
  • 51
  • 1
  • 2
-1

This worked for me in 2021 on my 2007 iMac:

https://www.youtube.com/watch?v=m3FgAztrYYo

Letsencrypt root certificate link is included.

bownie
  • 1,608
  • 15
  • 21