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

Error: This socket has been ended by the other party #6558

Closed
felis2803 opened this issue Sep 22, 2021 · 7 comments
Closed

Error: This socket has been ended by the other party #6558

felis2803 opened this issue Sep 22, 2021 · 7 comments
Assignees
Labels
FREQUENCY: level 2 SYSTEM: hammerhead TYPE: bug The described behavior is considered as wrong (bug).

Comments

@felis2803
Copy link
Contributor

What is your Test Scenario?

  1. Open the page https://reborncf.com/users/sign_in.
  2. Wait for the login form to be redrawn.

What is the Current behavior?

In many cases, the test will fail with the "Uncaught exception" error.

What is the Expected behavior?

The test always succeeds.

What is your web application and your TestCafe test code?

Your website URL (or attach your complete example):

https://reborncf.com/users/sign_in

Your complete test code (or attach your test files):
 import { Selector } from 'testcafe';

fixture `Login form`
    .page `https://reborncf.com/users/sign_in`;

for (let i = 0; i < 12; i++) {
    test(`test ${i}`, async t => {
        await t.expect(Selector('#user_password').visible).notOk();
    });
}
Your complete test report:
 Running tests in:
 - Chrome 93.0.4577.82 / Windows 10

 Login form
 √ test 0
 × test 1

   1) Uncaught exception:

      Error: This socket has been ended by the other party
      at TLSSocket.writeAfterFIN [as write] (net.js:456:14)
      at Socket.ondata (internal/streams/readable.js:745:22)
      at Socket.emit (events.js:376:20)
      at Socket.emit (domain.js:470:12)
      at addChunk (internal/streams/readable.js:309:12)
      at readableAddChunk (internal/streams/readable.js:284:9)
      at Socket.Readable.push (internal/streams/readable.js:223:10)
      at TCP.onStreamRead (internal/stream_base_commons.js:188:23)
      at TCP.callbackTrampoline (internal/async_hooks.js:134:14)

      Browser: Chrome 93.0.4577.82 / Windows 10


 × test 2

   1) Uncaught exception:

      Error: This socket has been ended by the other party
      at TLSSocket.writeAfterFIN [as write] (net.js:456:14)
      at Socket.ondata (internal/streams/readable.js:745:22)
      at Socket.emit (events.js:376:20)
      at Socket.emit (domain.js:470:12)
      at addChunk (internal/streams/readable.js:309:12)
      at readableAddChunk (internal/streams/readable.js:284:9)
      at Socket.Readable.push (internal/streams/readable.js:223:10)
      at TCP.onStreamRead (internal/stream_base_commons.js:188:23)
      at TCP.callbackTrampoline (internal/async_hooks.js:134:14)

      Browser: Chrome 93.0.4577.82 / Windows 10


 × test 3

   1) Uncaught exception:

      Error: This socket has been ended by the other party
      at TLSSocket.writeAfterFIN [as write] (net.js:456:14)
      at Socket.ondata (internal/streams/readable.js:745:22)
      at Socket.emit (events.js:376:20)
      at Socket.emit (domain.js:470:12)
      at addChunk (internal/streams/readable.js:309:12)
      at readableAddChunk (internal/streams/readable.js:284:9)
      at Socket.Readable.push (internal/streams/readable.js:223:10)
      at TCP.onStreamRead (internal/stream_base_commons.js:188:23)
      at TCP.callbackTrampoline (internal/async_hooks.js:134:14)

      Browser: Chrome 93.0.4577.82 / Windows 10


 × test 4

   1) Uncaught exception:

      Error: This socket has been ended by the other party
      at TLSSocket.writeAfterFIN [as write] (net.js:456:14)
      at Socket.ondata (internal/streams/readable.js:745:22)
      at Socket.emit (events.js:376:20)
      at Socket.emit (domain.js:470:12)
      at addChunk (internal/streams/readable.js:309:12)
      at readableAddChunk (internal/streams/readable.js:284:9)
      at Socket.Readable.push (internal/streams/readable.js:223:10)
      at TCP.onStreamRead (internal/stream_base_commons.js:188:23)
      at TCP.callbackTrampoline (internal/async_hooks.js:134:14)

      Browser: Chrome 93.0.4577.82 / Windows 10


 × test 5

   1) Uncaught exception:

      Error: This socket has been ended by the other party
      at TLSSocket.writeAfterFIN [as write] (net.js:456:14)
      at Socket.ondata (internal/streams/readable.js:745:22)
      at Socket.emit (events.js:376:20)
      at Socket.emit (domain.js:470:12)
      at addChunk (internal/streams/readable.js:309:12)
      at readableAddChunk (internal/streams/readable.js:284:9)
      at Socket.Readable.push (internal/streams/readable.js:223:10)
      at TCP.onStreamRead (internal/stream_base_commons.js:188:23)
      at TCP.callbackTrampoline (internal/async_hooks.js:134:14)

      Browser: Chrome 93.0.4577.82 / Windows 10


 √ test 6
 × test 7

   1) Uncaught exception:

      Error: This socket has been ended by the other party
      at TLSSocket.writeAfterFIN [as write] (net.js:456:14)
      at Socket.ondata (internal/streams/readable.js:745:22)
      at Socket.emit (events.js:376:20)
      at Socket.emit (domain.js:470:12)
      at addChunk (internal/streams/readable.js:309:12)
      at readableAddChunk (internal/streams/readable.js:284:9)
      at Socket.Readable.push (internal/streams/readable.js:223:10)
      at TCP.onStreamRead (internal/stream_base_commons.js:188:23)
      at TCP.callbackTrampoline (internal/async_hooks.js:134:14)

      Browser: Chrome 93.0.4577.82 / Windows 10


 √ test 8
 × test 9

   1) Uncaught exception:

      Error: This socket has been ended by the other party
      at TLSSocket.writeAfterFIN [as write] (net.js:456:14)
      at Socket.ondata (internal/streams/readable.js:745:22)
      at Socket.emit (events.js:376:20)
      at Socket.emit (domain.js:470:12)
      at addChunk (internal/streams/readable.js:309:12)
      at readableAddChunk (internal/streams/readable.js:284:9)
      at Socket.Readable.push (internal/streams/readable.js:223:10)
      at TCP.onStreamRead (internal/stream_base_commons.js:188:23)
      at TCP.callbackTrampoline (internal/async_hooks.js:134:14)

      Browser: Chrome 93.0.4577.82 / Windows 10


 √ test 10
 √ test 11


 7/12 failed (28s)
Error: write ECONNABORTED
    at afterWriteDispatched (internal/stream_base_commons.js:156:25)
    at writeGeneric (internal/stream_base_commons.js:147:3)
    at Socket._writeGeneric (net.js:785:11)
    at Socket._write (net.js:797:8)
    at writeOrBuffer (internal/streams/writable.js:358:12)
    at Socket.Writable.write (internal/streams/writable.js:303:10)
    at TLSSocket.ondata (internal/streams/readable.js:745:22)
    at TLSSocket.emit (events.js:376:20)
    at TLSSocket.emit (domain.js:532:15)
    at addChunk (internal/streams/readable.js:309:12)

Steps to Reproduce:

Run this test:

 import { Selector } from 'testcafe';

fixture `Login form`
    .page `https://reborncf.com/users/sign_in`;

for (let i = 0; i < 12; i++) {
    test(`test ${i}`, async t => {
        await t.expect(Selector('#user_password').visible).notOk();
    });
}

Your Environment details:

  • testcafe version: 1.16.0
  • node.js version: 14.17.0
  • command-line arguments: testcafe chrome test.js
  • browser name and version: Google Chrome (Version 93.0.4577.82 (Official Build) (64-bit))
  • platform and version: Windows 10
@felis2803 felis2803 added TYPE: bug The described behavior is considered as wrong (bug). SYSTEM: hammerhead labels Sep 22, 2021
@helen-dikareva helen-dikareva added the Support Center An issue created/received from the Support Center ticket. label Sep 23, 2021
@helen-dikareva helen-dikareva removed the Support Center An issue created/received from the Support Center ticket. label Oct 11, 2021
@Farfurix
Copy link
Contributor

@jbradenclickfunnels

I wasn't able to find the cause of the socket error because most of my debug runs contained no errors due to instability. Could you please ask your developer team to make some isolated minimal example that can be build/run/host locally on our side?

@jbradenclickfunnels
Copy link

jbradenclickfunnels commented Oct 12, 2021

@Farfurix Thanks for your response. We are confused on your statements that you weren't able to replicate due to no errors...due to instability. In the project I sent, you can see the test results file with all the errors and I provided the CLI command to replicate. I get similar results every run when I kick off the project.

Something else you can do is run the suite and as soon as it's done, run it again immediately after. That will make most/all the tests fail with 'Uncaught Exception' and EPIPE errors.

There has to be something with headless and concurrency causing this issue. The question is: is it on our side, Chrome's side, or TestCafe's side OR a combination of all three.

I asked our manager if there was a way to isolate something locally, but unfortunately, we don't have the time or resources to do so.

Our workaround is to run the suite serially, which isn't scalable and will cause our deployments to take a long time. More time than what the team is willing to accept as a standard. Any insight would be greatly appreciated.

Thanks,

@need-response-app need-response-app bot added the STATE: Need response An issue that requires a response or attention from the team. label Oct 12, 2021
@Farfurix
Copy link
Contributor

@jbradenclickfunnels

We are now trying to find the cause of this socket issue with your website, but I cannot give you any estimates.

@need-response-app need-response-app bot removed the STATE: Need response An issue that requires a response or attention from the team. label Oct 13, 2021
@LavrovArtem
Copy link
Contributor

DevExpress/testcafe-hammerhead#2702

@jbradenclickfunnels
Copy link

I see there may have been a fix merged above. Do we have an ETA on a prod release?

@need-response-app need-response-app bot added the STATE: Need response An issue that requires a response or attention from the team. label Oct 22, 2021
@Farfurix
Copy link
Contributor

@jbradenclickfunnels

Hello,

Unfortunately, right now I cannot say when exactly the new version will be released.

@need-response-app need-response-app bot removed the STATE: Need response An issue that requires a response or attention from the team. label Oct 25, 2021
@LavrovArtem
Copy link
Contributor

fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FREQUENCY: level 2 SYSTEM: hammerhead TYPE: bug The described behavior is considered as wrong (bug).
Projects
None yet
Development

No branches or pull requests

7 participants