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

Cypress in headed mode exits from test execution and in headless mode it hangs forever #29646

Closed
guillemdesantes opened this issue Jun 11, 2024 · 4 comments
Labels
stage: needs information Not enough info to reproduce the issue

Comments

@guillemdesantes
Copy link

Current behavior

When clicking on a button of a payment form in headed mode the command logs disappear and shows “Your tests are loading...” and then exits from test execution environment regardless of the instructions that come after clicking the button, as it never executes them.

When running the same test in headless mode it hangs forever and never finishes.

I don't know if it has something to do with it but in the document request which Cypress has to reach after clicking the button (the final URL) it shows a status code 302, while manually it shows 200.

Desired behavior

Obviously, Cypress should continue without exiting the execution environment and should also terminate the test.

Test code to reproduce

I cannot provide the code

Cypress Version

13.11.0

Node version

20.13.1

Operating System

Windows 10

Debug Logs

In debug mode I've seen things like:
 cypress:server:util:socket_allowed allowed socket closed, removing { localPort: 60444 } +174ms
  cypress:server:util:socket_allowed allowed socket closed, removing { localPort: 60442 } +47ms
  cypress:server:util:socket_allowed allowed socket closed, removing { localPort: 60443 } +24ms
  cypress:server:util:socket_allowed allowed socket closed, removing { localPort: 60363 } +221ms
  cypress:server:util:socket_allowed allowed socket closed, removing { localPort: 60394 } +176ms
  cypress:server:util:socket_allowed allowed socket closed, removing { localPort: 60407 } +261ms

I don't know if this logs are related to the problem.

Other

No response

@RuanECarvalho
Copy link

RuanECarvalho commented Jun 12, 2024

Any news on it? I'm facing same error and receiving same message using docker image cypress/browsers

@jennifer-shehane
Copy link
Member

We'll need more information to pin this down. What browser is in use? Can any logs be provided for the run?

A reproducible example would be ideal to narrow down the issue if one can be provided.

@jennifer-shehane jennifer-shehane added the stage: needs information Not enough info to reproduce the issue label Jun 12, 2024
@RuanECarvalho
Copy link

Just FYI I saw that I had a command failing on my before hook and the failure was not being showed into the cypress logs neither into dashboard, it just stops executing and didn't say anything on the logs.

I could debug and see the error in my code running npx cypress run --browser=chrome --headed locally, when running it, I saw the error message on chrome, but Cypress didn't stopped running on shell and didn't presented any error there, I could only reproduce it with my work env (that I can't share).

I hope this comment can help someone with same issue.

@guillemdesantes
Copy link
Author

I'm using normally Chrome v126, but the issue appears no matter what browser is in use. And there are not any logs that cypress displays on the command logs, it just exits from test execution in headed mode.

I think the only way to find this out is to provide the code that is causing the issue. I can send the code to your email if you don't mind. I don't want my code to be public.

@guillemdesantes guillemdesantes closed this as not planned Won't fix, can't repro, duplicate, stale Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stage: needs information Not enough info to reproduce the issue
Projects
None yet
Development

No branches or pull requests

3 participants