question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Occasional TCP.get errors causing failing specs since updating to Cypress 10

See original GitHub issue

Current behavior

I’m very confused by a Cypress/lodash error I’ve been encountering since updating to Cypress 10. The end result is that the test fails and the job times out on the Cypress Dashboard.

No screenshots or recording because the spec never completed. Here’s the Cypress Dashboard error message:

Screenshot 2022-06-17 at 15 56 28

And the lack of video/screenshots: Screenshot 2022-06-17 at 15 57 59

We’re running our tests via Jenkins, with orchestration courtesy of the Cypress Dashboard. Here’s the output for one of the affected jobs:

12:20:37  Cannot read properties of null (reading 'reading')
12:20:37  TypeError: Cannot read properties of null (reading 'reading')
12:20:37      at TCP.get [as reading] (node:_tls_wrap:634:27)
12:20:37      at /app/.cache/Cypress/10.0.2/Cypress/resources/app/node_modules/lodash/lodash.js:2730:27
12:20:37      at arrayEach (/app/.cache/Cypress/10.0.2/Cypress/resources/app/node_modules/lodash/lodash.js:530:11)
12:20:37      at baseClone (/app/.cache/Cypress/10.0.2/Cypress/resources/app/node_modules/lodash/lodash.js:2727:7)
12:20:37      at /app/.cache/Cypress/10.0.2/Cypress/resources/app/node_modules/lodash/lodash.js:2733:34
12:20:37      at arrayEach (/app/.cache/Cypress/10.0.2/Cypress/resources/app/node_modules/lodash/lodash.js:530:11)
12:20:37      at baseClone (/app/.cache/Cypress/10.0.2/Cypress/resources/app/node_modules/lodash/lodash.js:2727:7)
12:20:37      at /app/.cache/Cypress/10.0.2/Cypress/resources/app/node_modules/lodash/lodash.js:2733:34
12:20:37      at arrayEach (/app/.cache/Cypress/10.0.2/Cypress/resources/app/node_modules/lodash/lodash.js:530:11)
12:20:37      at baseClone (/app/.cache/Cypress/10.0.2/Cypress/resources/app/node_modules/lodash/lodash.js:2727:7)
12:20:37      at /app/.cache/Cypress/10.0.2/Cypress/resources/app/node_modules/lodash/lodash.js:2733:34
12:20:37      at arrayEach (/app/.cache/Cypress/10.0.2/Cypress/resources/app/node_modules/lodash/lodash.js:530:11)
12:20:37      at baseClone (/app/.cache/Cypress/10.0.2/Cypress/resources/app/node_modules/lodash/lodash.js:2727:7)
12:20:37      at /app/.cache/Cypress/10.0.2/Cypress/resources/app/node_modules/lodash/lodash.js:2733:34
12:20:37      at arrayEach (/app/.cache/Cypress/10.0.2/Cypress/resources/app/node_modules/lodash/lodash.js:530:11)
12:20:37      at baseClone (/app/.cache/Cypress/10.0.2/Cypress/resources/app/node_modules/lodash/lodash.js:2727:7)
12:20:37      at Function.cloneDeep (/app/.cache/Cypress/10.0.2/Cypress/resources/app/node_modules/lodash/lodash.js:11156:14)
12:20:37      at HttpBuffers.set (/app/.cache/Cypress/10.0.2/Cypress/resources/app/packages/proxy/lib/http/util/buffers.js:26:32)
12:20:37      at Http.setBuffer (/app/.cache/Cypress/10.0.2/Cypress/resources/app/packages/proxy/lib/http/index.js:221:29)
12:20:37      at NetworkProxy.setHttpBuffer (/app/.cache/Cypress/10.0.2/Cypress/resources/app/packages/proxy/lib/network-proxy.js:19:19)
12:20:37      at /app/.cache/Cypress/10.0.2/Cypress/resources/app/packages/server/lib/server-e2e.js:248:103
12:20:37      at /app/.cache/Cypress/10.0.2/Cypress/resources/app/packages/network/lib/concat-stream.js:22:16
12:20:37      at ConcatStream.<anonymous> (/app/.cache/Cypress/10.0.2/Cypress/resources/app/node_modules/concat-stream/index.js:37:43)
12:20:37      at ConcatStream.emit (node:events:402:35)
12:20:37      at ConcatStream.emit (node:domain:475:12)
12:20:37      at finishMaybe (/app/.cache/Cypress/10.0.2/Cypress/resources/app/node_modules/readable-stream/lib/_stream_writable.js:630:14)
12:20:37      at endWritable (/app/.cache/Cypress/10.0.2/Cypress/resources/app/node_modules/readable-stream/lib/_stream_writable.js:638:3)
12:20:37      at ConcatStream.Writable.end (/app/.cache/Cypress/10.0.2/Cypress/resources/app/node_modules/readable-stream/lib/_stream_writable.js:594:41)
12:20:37      at Duplexify.onend (/app/.cache/Cypress/10.0.2/Cypress/resources/app/packages/server/node_modules/readable-stream/lib/_stream_readable.js:646:10)
12:20:37      at Object.onceWrapper (node:events:509:28)
12:20:37      at Duplexify.emit (node:events:390:28)
12:20:37      at Duplexify.emit (node:domain:475:12)
12:20:37      at endReadableNT (/app/.cache/Cypress/10.0.2/Cypress/resources/app/packages/server/node_modules/readable-stream/lib/_stream_readable.js:1094:12)
12:20:37      at processTicksAndRejections (node:internal/process/task_queues:83:21)
12:20:37      at runNextTicks (node:internal/process/task_queues:65:3)
12:20:37      at processImmediate (node:internal/timers:437:9)

I don’t use lodash at all in my Cypress tests. And given that this started after updating to Cypress 10, I don’t believe the issue is due to the specs themselves.

In the stack trace above, I see mentions of Duplexify. We definitely aren’t using that in our tests, so I suspect that this is something to do with refactored video/screenshot upload logic in the newest Cypress

Just a hunch, but I noticed that this file changed recently. It’s mentioned in the stack trace and it also uses lodash. Could it be something to do with that?

Desired behavior

Desired outcome would be to no longer have this issue affecting our Jenkins runs and timing out on the Cypress Dashboard

Test code to reproduce

It’ll be difficult for me to provide a reproducible example, as the issue seems dependent on Cypress’ TCP.get not receiving a response from Cypress Dashboard.

I’d be happy to turn on debugging for one of our Jenkins jobs so that you have some more information, though. Just let me know what to add to give you the info you need, and I’ll email it to Cypress.

Cypress Version

10.1.0

Other

No response

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:21
  • Comments:40 (19 by maintainers)

github_iconTop GitHub Comments

6reactions
AtofStrykercommented, Aug 3, 2022

Any progress? @AtofStryker

I am back on rotation this week and next and am hoping to take a look into this!

5reactions
pfiorentino-zendeskcommented, Aug 9, 2022

Ok, folks!

I deployed the 10.4.0 on our side yesterday in the morning (9 AM UTC). We had 15 green runs and 0 red since.

I will keep an eye on the logs for another day or two, but it’s very promising!

I’ll keep you posted!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting | Cypress Documentation
There are times when you will encounter errors or unexpected behavior with Cypress itself. In this situation, we recommend checking these support.
Read more >
RHSA-2022:5069 - Security Advisory - Red Hat Customer Portal
VM is being updated" on vm resource; BZ - 1898265 - [OCP 4.5][AWS] Installation failed: error updating LB Target Group ...
Read more >
cypress-io/cypress - Gitter
Cypress failed to make a connection to the Chrome DevTools Protocol after retrying for 20 seconds. This usually indicates there was a problem...
Read more >
NodeJS - What does "socket hang up" actually mean?
It means that socket does not send connection end event within the timeout period. If you are getting the request for cheerio via...
Read more >
Zephyr 2.7.0
We are pleased to announce the release of Zephyr RTOS version 2.7.0 (LTS2). Major enhancements since v2.6.0 include: Bluetooth Audio, Direction ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found