localhost chrome on catalina

Viewed 2353

I can not get localhost to work on chrome after upgrading to macOS Catalina. I spent a lot of time trying to figure out why I was getting this message

localhost normally uses encryption to protect your information. When Google Chrome tried to connect to localhost this time, the website sent back unusual and incorrect credentials. This may happen when an attacker is trying to pretend to be localhost, or a Wi-Fi sign-in screen has interrupted the connection. Your information is still secure because Google Chrome stopped the connection before any data was exchanged.

You cannot visit localhost right now because the website sent scrambled credentials that Google Chrome cannot process. Network errors and attacks are usually temporary, so this page will probably work later.

(I wish I had taken a screen shot)

2 Answers

I don't know if this is the "best" solution but it got me able to code again so I figured I would share. I was seriously stuck and couldn't find any answers and saw someone mention this solution to another issue. Go to chrome://flags/#allow-insecure-localhost and change to enable.

Hope this helps someone else. I know this isn't really a question but there's not really a way to just share this. I guess I could use twitter and reddit.

OS X Catalina increased the requirements for an SSL/TLS certificate to be acceptable around November 2019. Notably, certificates now need a "Subject Alternative Name" section, which was not previously required. Note that this is an OS-level requirement and not specific to a single browser (although it doesn't affect FireFox because Firefox doesn't use the OS security stack).

The solution to your issue is how you generate the SSL certificate, not anything you can do as a Chrome user. This particular issue can not be bypassed by clicking through a Chrome warning message.

Also note that fixing this issue for OS X may make the certificate unusable on Chrome + Linux (I have linked to WebPack Dev Server's GitHub Issue discussion of this issue).

Related