Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How lauch Cypress on app using certificate? #1428

Closed
perceboisElisa opened this issue Mar 7, 2018 · 4 comments
Closed

How lauch Cypress on app using certificate? #1428

perceboisElisa opened this issue Mar 7, 2018 · 4 comments

Comments

@perceboisElisa
Copy link

Hi,

I would like to run my app with Cypress. However, we use certificates which need to be validate by the user before running your app. Which file must be configure in Cypress?

Regards,
Elisa

@lcastanedaCV
Copy link

lcastanedaCV commented Jul 12, 2018

I am having this similar issue.
And can't find a solution to previous issues.
Can we open this again?

Here are my details
The page I am testing uses a certificate. If I open the page on the regular Chrome the page loads with no problem. But when I launch Cypress I get a "The connection is not secure" along with a 401 error (I am not sure if these are related).

Update:
When I compare both certificates, the one in Cypress says the certificate is

Issued by: CypressProxyCA

which is not the real case.
How can I fix that and use the ones in MY chrome?

Thank you!

@brian-mann
Copy link
Member

@lcastanedaCV we tell the browser to ignore security errors so I'm not sure how you could be getting this unless you're modifying the arguments in which we launch chrome or you're doing something out of the ordinary.

Cypress must sit between your browser and the webserver and it will not work unless its making the connections, so the answer is you can't - but there's not any reason to need to do so.

The certificates don't affect the browser's actual behavior.

Are you trying to load an ip address by chance? If so if you set an alias in your /etc/hosts file and visit that, you won't see that message. I think that's the only scenario in which we've seen that message happen.

What site are you trying to visit? Have you tried visiting it in Electron?

@lcastanedaCV
Copy link

Hi @brian-mann,
Thank you for your help.
/etc/hosts solved the problem
Cheers!

@Niemetz
Copy link

Niemetz commented Mar 15, 2022

Hi @brian-mann and @lcastanedaCV
I'm running into the same issue... what are the things I need to fix in my /etc/hosts?
Thank you very much

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants