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.

Test execution randomly aborted by an issue originated in the request-pipeline of Hammerhead

See original GitHub issue

What is your Scenario?

We are running a quite comprehensive testsuite (some hunderds of test) with the goal to make sure that our tracking implemantation works as expected. We are executing this tests via CI 4x a day. Since a few weeks we have random test aborts, which are unfortunately extremely hard to track and reproduce.

What is the Current behavior?

`Errors: Unhandled promise rejection:

Error [ERR_HTTP2_INVALID_SESSION]: The session has been destroyed

at new NodeError (node:internal/errors:371:5)

at ClientHttp2Session.request (node:internal/http2/core:1702:13) at DestinationRequest._sendRealThroughHttp2 (/home/ec2-user/actions-runner/_work/ds_cerberus/ds_cerberus/node_modules/testcafe-hammerhead/lib/request-pipeline/destination-request/index.js:51:32) at DestinationRequest._send (/home/ec2-user/actions-runner/_work/ds_cerberus/ds_cerberus/node_modules/testcafe-hammerhead/lib/request-pipeline/destination-request/index.js:110:18) at runMicrotasks (<anonymous>:null:null)

at processTicksAndRejections (node:internal/process/task_queues:96:5)`

This is the stacktrace if the tests are aborted. Unfortunately this means that the execution of all tests is aborted and does not only affect a single test, which renders the whole suite for us pretty useless…

What is the Expected behavior?

Ideally there should no

What is your public website URL? (or attach your complete example)

unfortunately there is nothing that I could share, because this is a private product

What is your TestCafe test code?

unfortunately there is nothing that I could share, because this is a private product

Your complete configuration file

No response

Your complete test report

No response

Screenshots

No response

Steps to Reproduce

There seems to be more aborts if the tests are executed in the suite and not solely - but even there it is quite hard to identify a pattern.

TestCafe version

“testcafe”: “^1.17.1”,

Node.js version

node-version: ‘16.x’

Command-line arguments

testcafe --config-file .testcaferc-dev.json tests

Browser name(s) and version(s)

No response

Platform(s) and version(s)

No response

Other

No response

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8

github_iconTop GitHub Comments

1reaction
pavsenincommented, Nov 29, 2021

Hello,

The issue may be related to HTTP/2 requests. So, you can disable it using the following option: disableHttp2. Check if the issue is reproduced after that.

You can also try to increase timeouts, e.g. ajaxRequestTimeout and testExecutionTimeout.

If this does not help, please create a simple project where the issue is reproducible and share it here. We will research it on our side.

0reactions
pavsenincommented, Dec 29, 2021

Hello @qrush and @raven-rwho,

If I understand it correctly, the disableHttp2 option helps eliminate the issue, so I will close it. You can reopen it if you have any additional information.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Test execution randomly aborted by an issue originated in the ...
For us it looks like a racing condition inside the hammerhead-lib which is used as a proxy for testcafe. But we have no...
Read more >
Cannot set headers after they are sent to the client ... - GitHub
When I run simple test import { Selector } from 'testcafe'; ... node_modules\testcafe-hammerhead\lib\request-pipeline\utils.js:81:48) at ...
Read more >
Test runs are randomly aborting with TestsNotFoundException.
I am using the 'Hosted Windows 2019 with VS2019' hosted agents to run my pipelines. Below is a snippet of a debug log...
Read more >
[Solved]-Stream Youtube video via Node.js server-node.js
How do I resolve this, yet still carry out unit testing? ... Test execution randomly aborted by an issue originated in the request-pipeline...
Read more >
Job timed out - Tests Aborted - Still tests are marked as passed
Test runs getting aborted due to job time out issue. And result pan will mark all the not run tests as passed (Which...
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