Test execution randomly aborted by an issue originated in the request-pipeline of Hammerhead
See original GitHub issueWhat 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:
- Created 2 years ago
- Comments:8

Top Related StackOverflow Question
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.
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.