-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Error: This socket has been ended by the other party #6458
Comments
I am getting a similar error after installing 4.0.1
|
@carlgordon Your output does not look related to the original issue. Your run failed at |
I think could be due to the |
Thanks @jennifer-shehane I didn't see that. Will try to debug the verification. |
@estefafdez I'll need to know what you are doing in the before and beforeEach blocks if you believe this is related. Can you send over the Cypress tests you're running? Feel free to remove sensitive information. |
Hello @jennifer-shehane , I don't think they are related (because I've been using them in the same way on the others specs), and none of them closes cypress. The problem is always on the same specs, let me copy/paste the code for you: /* global cy, Cypress */
describe('Page1', function () {
describe('Page1 Checks', () => {
before(() => {
cy.visit('URL');
});
it('[] should display the xx', function () {
cy.get(element).should('be.visible');
});
it('[] should display the xx', function () {
cy.get(element).should('be.visible');
});
it('[] should display the xx', function () {
cy.get(element).should('be.visible');
});
it('[] should display the xx', function () {
cy.get(element).should('be.visible');
});
it('[] should display the xx', function () {
cy.get(element).should('be.visible');
});
it('[] should display the xx', function () {
cy.get(element).should('be.visible');
});
it('[] should display the xx', function () {
cy.get(element).should('be.visible');
});
it('[] should display the xx', function () {
cy.get(element).should('be.visible');
});
});
describe('Page1 Actions', () => {
beforeEach(() => {
cy.visit('URL');
cy.get(acceptCookiesElement).click();
});
it('[] should see the xxx after click on xxx button', function () {
cy.get(element).click();
cy.get(element).should('be.visible');
});
--------------------------> CYPRESS CLOSES HERE.
it('[] should go to xxx after click on xxx', function () {
cy.get(element).click();
cy.url().should('eq', 'URL');
});
it('[] should go to xxx after click on xxx', function () {
cy.get(element).click();
cy.url().should('eq', 'URL');
});
it('[] should go to xxx after click on xxx', function () {
cy.get(element).click();
cy.url().should('eq', 'URL');
});
it('[] should go to xxx after click on xxx', function () {
cy.get(element).click();
cy.url().should('eq', 'URL');
});
it('[] should go to xxx after click on xxx', function () {
cy.get(element).click();
cy.url().should('eq', 'URL');
});
it('[] should go to xxx after click on xxx', function () {
cy.get(element).click();
cy.url().should('eq', 'URL');
});
it('[] should go to xxx after click on xxx', function () {
cy.get(element).click();
cy.url().should('eq', 'URL');
});
});
}); I hope this could help you find the problem. Thanks! |
Any great deas here? I hit this issue too... |
No ideas on my part. I remove the before and beforeAll hooks from the tests and I'm still facing the issue sometimes mostly on Electron and on Chrome (not on Firefox or Edge). I even try with Cypress 4.0.2 and nothing :( any ideas please? thanks |
Do you see any failed requests related to socket.io in your terminal? The same terminal window that you used to run Cypress. I specifically saw a 401 (Unauthorized) request like this before Cypress crashed. There were lots of other 401 and 403 requests, too
|
No, I didn't see any request like that on my terminal. |
Was going to open a new issue, but this one exists so I'll post here. Has anyone managed to resolve this problem? Suddenly started happening to me after upgrading to 4.0.1 in both Chrome & Electron - occurs running with both cypress open or cypress run, doesn't help upgrading to 4.0.2 either. It seems to run the first test in my spec.js file, and consistently fails with the error message shown below. In the beforeEach method for each of my tests is simply a cy.visit(''). I can provide more information if need be. Currently attempting to downgrade Cypress to the previous version to see if this error persists - Happens even downgrading to 3.8.3 Some more information: Error message
|
@YemiYuma my before and beforeEach methods were exactly the same, cy.visit(). Thanks for your comment and for your information, let's hope they can fix it :) |
Well, in my case, the crash is going because of constantly broken WebSockets requests during a particular test, like 10-20 in the row. Anyway, I guess Cypress should handle that in some ways, at least by |
Getting exactly the same error on 3.8.2 |
exactly. @BiosBoy I think it should handle this in someway. |
We experience the same thing. And again no steps to reproduce, it happens "randomly" for us. Usually on long test runs though. Please prioritize this for solving, thanks. Cypress 3.8.2 |
agreed with @bencatjakub , long runs activate it somehow, but my longest spec is 20 tests long :( please help! |
We are experiencing the same thing, but in our case the crash is immediate. No Specs are executed
|
@mowli you are using cypress 3.8.2, could you update to the latest version (4.0.2) and have a look? |
@estefafdez Ok, that did the trick for me! Could have tried that before 🤦♂ |
happy to help @mowli. Could you have a look at your specs with that version and see if you get the same error than us and could provide more information to the cypress devs to help with this problem? thanks :) |
We updated our Cypress from 3.8.2 to 4.0.2, with no change. Test run still randomly fails on the same error. |
same error right @bencatjakub? |
@estefafdez yup
|
I believe the root cause of this error is that, for a short amount of time, there is no So, if the other end of the websocket disappears unexpectedly this uncaught However, I haven't been able to reproduce this locally. Can someone share an example repository that shows this error? |
@bencatjakub Right now, removing this option helped in some cases, but unfortunately not in all cases. Right now, the tests fail again, even when the stting is not present or "0". So I'm back to the beginning right now. |
Any updates on this guys? Anybody from Cypress.io to have some official statement? This is a blocker for some portion of our Cypress tests and we do not have stable results because of this. PLEASE PRIORITIZE THIS!!! |
This comment has been minimized.
This comment has been minimized.
@uweku You can email support@cypress.io to send any potentially sensitive info when providing a reproducible example. |
Sure, I sent you the test case |
@jennifer-shehane I wonder if you received it and were you able to run it? |
I've also been experiencing this today, both on Cypress v4.2.0 and 4.1.0. I can no longer get through an entire test run (65 tests, ~30m locally on a MacBook) without Cypress crashing. Below is the output from Cypress when it's crashed, both on 4.1.0 and 4.2.0. 4.1.0:
|
Seems like we're left alone here? :( |
@BiosBoy Yeah, unfortunately it seems Cypress is uninterested in fixing their application unless their users do all the legwork... -__- |
@uweku Hmm, I cannot find any incoming email from you in our support inbox from the relevant dates, containing this issue number, or from your name. Can you email it to me directly by using the email address on my GitHub profile? Thanks! @TheWanderingWalnut Actually, I spent a day trying to reproduce this issue by playing with websockets, but was unable to get the same error y'all are experiencing. Real world apps can have a lot of complexity that can cause issues that are very very difficult to isolate by shooting in the dark. Until someone can supply a reproducible example to debug with, or until someone else finds the problem and opens a PR to fix it, there is no way that progress can be made on this issue. I hope this situation is understandable. |
@flotwig Thank you for letting us know, I find the lack of communication from Cypress on here leads to many misunderstandings, given the last official post was 12 days ago in this thread, despite crashes being a critical issue. I am seeing this extremely consistently now, is there any more useful information I could get you from my setup, perhaps? I suspect no one will be able to provide a fully-reproducible example, as this happens seemingly at random while running tests, and on a wide variety of Cypress versions. Cypress can crash anywhere from about the third test, to about the 40th one or so, I can no longer get farther than about 40 tests before it's doomed to crash. Please let me know if I can provide you with anything else to support your investigation, I'm happy to take time and work through it, since a completely reproducible example is extremely unlikely in this case. |
Done :-) |
Having the same issue :( Is blocking me 100% |
I'm still having it with cypress 4.3.0 with all the browsers: electron, chrome, firefox and edge, even using github and the new actions, please help :( |
The repro shared by @uweku doesn't seem to exhibit the issue on the latest Cypress, so this is once again blocked by the need for a reproducible example. @melibe23 @estefafdez if either of you could share an example repo that showcases this issue, that would be a huge help. |
I send you an email @flotwig! |
The code for this is done in cypress-io/cypress#6945, but has yet to be released. |
Released in This comment thread has been locked. If you are still experiencing this issue after upgrading to |
Current behavior:
When I run my specs headless on the CLI, Cypress closed unexpectedly with a socket error.
Error code:
NPM Complete log:
Desired behavior:
Cypress is not closed and I can run all my tests without any problem.
Test code to reproduce
I have 4 specs, all of them have the following structure:
My config file looks like:
Versions
Platform: darwin (19.3.0)
Cypress Version: 4.0.1
Electron 78 (headless)
Mac OS version: Catalina 10.15.3 (19D76).
The text was updated successfully, but these errors were encountered: