Occasional TCP.get errors causing failing specs since updating to Cypress 10
See original GitHub issueCurrent 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:
And the lack of video/screenshots:
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:
- Created a year ago
- Reactions:21
- Comments:40 (19 by maintainers)
Top GitHub Comments
I am back on rotation this week and next and am hoping to take a look into this!
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!