cypress: Error: read ECONNRESET with fresh npm install
I have installed Cypress using npm to an angular 9.0 project. I can start cypress using npx cypress open and upon selecting any of the example tests the chrome browser opens for a second then both cypress and the browser close with the following output to the console.
Error: read ECONNRESET at TCP.onStreamRead (internal/stream_base_commons.js:205:27) { errno: 'ECONNRESET', code: 'ECONNRESET', syscall: 'read' } Error: read ECONNRESET at TCP.onStreamRead (internal/stream_base_commons.js:205:27)
I have not changed anything, its a fresh install. Anybody able to point me in the right direction on getting this resolved?
About this issue
- Original URL
- State: open
- Created 4 years ago
- Reactions: 10
- Comments: 50 (4 by maintainers)
We are getting the same error, and we narrowed the source of our error to Sophos, specifically the Network Threat Protection. When this is disabled the error does not occur. We are opening a ticket with Sophos in our case to try and get more info.
@jennifer-shehane You have given us no solution. Just have been redirecting us to another Ticket with no solution. Can you please help us figure it out or hopefully direct us to someone who can help? This is a common issue and should not be closed @emilyrohrbough @tgriesser @amirrustam
Just wanted to provide an update; We have spent time with Sophos support in order for them to pinpoint the issue and we have received report back that they believe they found the cause and are targeting a fix:
Keep in mind this isn’t “a sure thing”, but I am simply giving some hope to everyone affected by the Sophos issue that we might see a fix in the coming weeks.
Fingers crossed ! 🤞
We have exactly the same issue with Sophos Endpoint Protection and “Network Threat Protection” enabled. Started about a week ago.
I’m starting using Cypress and I’ve got the same error in all the browsers:
Setup/Configuration details:
windows 10 PRO Node v18.17.1 Cypress v12.17.2 Chrome - v115 Electron v106
I was having the same issue. Windows 10 using Sophos. Changing the browser from Chrome to Electron solved it for me, hope this helps.
I am also expeirencing this issue that chrome closes instantly and it doesn´t run my tests. Also tried to delete the node_modules and reinstalling them.
If I run it with
yarn cypress runit works.click here for my debugging output
We have this error anything between 3 and 10 times a day in multiple runs in my organisation. I am now attempting to get debug logs so as to be able to post here and see if there is some consistency in the place I get the errors.
I have the same issue for all web browsers and I dont even use Sophos… any workarounds?
I am having the same issue. Have uninstalled/removed and reinstalled Node/npm, but still does not work. It works fine if you run from command line, but not when following the method described by @jvinters
Updating to Cypress Version 13.2.0 helped me resolve this issue.
In case it helps, sophos has published an article stating that it has been fixed in Core Agent 2022.1.1 with IP exclusion for the loopback address. This update is currently being rolled out. They ask us to add 127.0.0.1 as a website exclusion in the threat protection policy, which will resolve the issue.
It has worked for us! 😃
URL article -> https://support.sophos.com/support/s/article/KB-000044041?language=en_US
Hello Cypress team, I am also observing this issue for chrome/firefox/edge.
Setup/Configuration details:
My company uses OpenVPN, i tried connected/disconnected/quit mode, but same error for all modes.
**Logs:**
We’re experiencing the ECONNRESET at work, its impacting quite a few of us. It just suddenly started, OS - Windows 10 Cypress Version 9.5.0 (but we have rolled back all the way to 9.2 and issue is present in all) Node.js Version 16 (again, we’ve rolled back various version of Node 16 and tried 17) Browser - Edge, Chrome, Firefox, all have this issue, (ONLY electron will run and stay alive)
Our Infrastructure team has helped roll back patching, group policy, proxy has been opened…to the point its a standard pc with a direct connection to internet and the issue is still present.
Update… Resolved (for us at least) after a process of elimination removing various apps / policies etc, we identified there was a setting within anti-virus that was scanning and interfering with internet traffic (how it got turned on who knows as our infra is so tightly controlled). Turned this off and it all started working as expected.
It started happening for our project as well, Tests runs fine only in Electron browser but not in any other browsers like chrome, firefox, edge. It works fine for cypress 6.5 version. But doesn’t work for 7.3 and above. Below is the screenshot with the error. @jennifer-shehane There are many team blocked with this issue. Could you please take this on priority.
@jennifer-shehane Is the above sufficient?
In the future opening an issue, please fill out the issue template provided.