cypress-io / cypress

Fast, easy and reliable testing for anything that runs in a browser.
https://cypress.io
MIT License
47.52k stars 3.2k forks source link

Cypress E2E start and restart of test on file change often results in blank page #24322

Closed cichyadam closed 2 years ago

cichyadam commented 2 years ago

Current behavior

  1. When starting test with yarn cypress open I often see a blank page and in my terminal I see this error message: ERROR:ssl_client_socket_impl.cc(983)] handshake failed; returned -1, SSL error code 1, net_error -100

  2. Sometimes I manage to run my test, when I change a test file, it also results in a blank page with the same error in the terminal + I can see that the cypress requests are failing. Screenshot 2022-10-20 at 11 27 46 g

I have been working with cypress for couple of years, but installing it into this project is quite painful and bring so many errors which I haven't come across in past years.

Desired behavior

  1. Cypress should just start without any issues and be much faster.
  2. Cypress should just restart and re-run my test.

Test code to reproduce

I have just freshly installed cypress into private repository and running a very simple test just to visit a login page.

Cypress Version

10.10.0

Node version

16.17.1

Operating System

macOS 12.6

Debug Logs

No response

Other

No response

nagash77 commented 2 years ago

@cichyadam I'm sorry you are having issues with Cypress. Unfortunately we will need a replication in order to investigate further. Unless we receive a reliable reproduction, we'll eventually have to close this issue until we can reproduce it. This does not mean that your issue is not happening - it just means that we do not have a path to move forward.

Please provide a reproducible example of the issue you're encountering. Here are some tips for providing a Short, Self Contained, Correct, Example and our own Troubleshooting Cypress guide.

cichyadam commented 2 years ago

@nagash77 thanks for you answer, however I don't think I would be able to give you access to the repository as it's private part of the organization I started to work for.

Do you think the issue could be that we are running the react app on HOST which is not localhost with HTTPS=true? The url we're running our react app looks like this: https://local.app.infomedia.dk:3000/

Because once I changed hosts file in /etc/hostsand started the app without HTTPS=true, it was much faster for cypress to run but could not communicate with our backend and our goal is to run e2e testing without having fixtures for all requests and to use the backend.

Maybe this information might be more useful to allocate the issue in what am I doing wrong.

amehta265 commented 2 years ago

Right now there doesn't seem to be enough information to reproduce the problem on our end. We'll have to close this issue until we can reproduce it. This does not mean that your issue is not happening - it just means that we do not have a path to move forward.

Please open a new issue with a reproducible example and link to this issue. Here are some tips for providing a Short, Self Contained, Correct, Example and our own Troubleshooting Cypress guide.

vaibhavspread commented 5 months ago

@nagash77 @amehta265 I am trying to run a Cypress test and getting an error:  ERROR:ssl_client_socket_impl.cc(983)] handshake failed; returned -1, SSL error code 1, net_error -100.

Screenshot 2024-06-17 at 14 19 57

I started getting after changing my base location. e.g., from Europe to India. I have tried below option but hard luck so far.

https://www.encryptionconsulting.com/how-to-fix-the-ssl-handshake-failed-error/