When you use charlesproxy and don't configure charlesproxy's CA as trusted ssl you will get this error in chrome:
That happens because chrome detect that the SSL certificate is being replaced to some self signed CA. To fix this error you need to export your certificate from charlesproxy, and add it to the chrome's "Authorities" tab.
The most important thing is to export the certificate in .CER
format, not in .PEM as set by default. Chrome has troubles reading PEM, the only working format is CER.
The default chrome's file browser will not show you .cer files, you need to change the file browser's settings to show all files.
The .cer file will appear and you need to chose it:
Then on the chrome's check "Trust this certificate for identifying websites":
After that, the https error page must be gone because chrome now trusts charlesproxy's CA.