Cypress: Invalid certificate issue for https website

Viewed 3179

The browser reports that the connection is insecure, so the certificate hasn't loaded correctly. However, then manually opening the website it loads correctly.

Can anyone tell me how to fix Invalid certificate issue, It's result in to launching the wrong URL.

I tried with "chromeWebSecurity": false in my cypree.json, but no luck.

Please help me to solve this issue.

2 Answers

if it is not your website, you cannot fix it. what you can do is verify why it is invalid, and decide to accept it and still open an https connection with the server although the certificate isn't valid.

usually the steps are:

  1. click Advanced button
  2. read and understand
  3. click Accept or close the tab

the common reasons for a certificate to be invalid are:

  • domain name invalid, the certificate is installed for multiple vhost, and you have accessed the service for a domain name not defined in the certificate. www. is required, only * is specified without empty domain. totally wrong domain name. etc.
  • certificate is expired. check the date, it might be expired and decided if that makes sense to you
  • certificate isn't trusted, self-signed or using an authority not trusted by your browser.

if it is your website, these are the same reason, so you should be able to replace the certificate with an appropriate one.

by the way, this might not be a question for stackoverflow, maybe more for superuser, but I am happy to answer it anyway.

hope this helps you and others

cheers,

Related