Test run can hang/freeze when browser closes unexpectedly #8273
Labels
STATE: Issue accepted
An issue has been reproduced.
TYPE: bug
The described behavior is considered as wrong (bug).
What is your Scenario?
Our team utilizes GitHub Actions to run a series of TestCafe tests nightly against our environments. During random runs; not often, but potentially once a month after 10+ runs a day; the test run will freeze, resulting in GHA force closing the runner after 6 hours. Investigating into this, we haven't been able to fully reproduce this issue, outside of manually closing the browser during a test. Our tests on GHA (ubuntu:latest) utilize Chrome in Headless mode, and our tests when developing (Windows 11) use Chrome standard (some tests using --guest), but not headless. We aren't yet convinced the browser is closing during the GHA tests, but this is our current/best lead.
What is the Current behavior?
During our tests in Windows, closing the browser mid session (once the fixture/test start their actions), calls to
await t
functions will hang, as they cannot be completed.What is the Expected behavior?
Ideally, the closed browser / lost connection, should be detected as a failure, and either one of the following actions:
afterEach
can't run, due to the lack oft
environment anymore.Reporters should be able to finalize their run and export their results of the tests that [did] run.
What is the public URL of the test page? (attach your complete example)
Can be repro'd on example.com
What is your TestCafe test code?
runner.js
test.js
Your complete configuration file
No response
Your complete test report
No response
Screenshots
No response
Steps to Reproduce
node runner.js
TestCafe version
3.6.2
Node.js version
v16.20.2
Command-line arguments
node runner.js
Browser name(s) and version(s)
Chrome 128
Platform(s) and version(s)
No response
Other
This test has been done with both Native Automation enabled and disabled with no difference.
The text was updated successfully, but these errors were encountered: