Testcafe: Intermittently TestCafe 1.7.0 hangs on parallelism and functionality regressed, everything was fine with 1.6.1

Created on 27 Nov 2019  路  27Comments  路  Source: DevExpress/testcafe

Intermittently TestCafe 1.7.0 hangs on parallelism and functionality regressed, everything was fine with 1.6.1.

Automation hangs in CircleCI container. I don't have exact repro steps and this issue is intermittent. Something is fixed in 1.7.1 which regressed all these things. I have 25+ examples where my container hanged and timeout reached since we upgraded to 1.7.1.

Please note that browser hanging issue was not present with 1.6.1 at all**

Command:
node tests/testcafe/utils/testcafe-run.js tests/testcafe/tests -c 5

image

image

image

image

Your Environment details:

  • testcafe version: 1.7.0
  • node.js version: 13.1.0
  • browser name and version: Chrome 78.0.3904
!IMPORTANT! critical Auto-locked Awaiting release bug

Most helpful comment

The --disable-background-networking flag is applied by default since [email protected]. If you don't mind installing preliminary builds, you can install and test it in your environment. I will post a message in this issue thread when a stable release is available.

All 27 comments

Hi @jiteshsojitra,

Thank you for pointing out to this issue. I reproduced the hanging on Windows 10 and node.js 13.1.0 with such an empty test:

fixture('Fixture').page('example.com');

test('Test 1', async t => {
    // pass
});

We will look into this problem.

Thanks @alexey-lin , even i tried by using latest node 13.2.0 but no luck so appreciated for accepting this regression. Hoping to fix this critical issue!

@jiteshsojitra, have you tried installing Node.js 12.13.1? Latest Node.js versions can be unstable sometimes,

There are multiple things which points to TestCafe regressed issue instead of node.

  1. I switched back to TestCafe 1.6.1 and everything is fine.
  2. Everything was fine with TestCafe 1.6.1 when using Node 13.1 and Node 13.2.

Thank you for the update, @jiteshsojitra. We are researching the issue and will update this thread as soon as we have any news to share.

@jiteshsojitra,
Could you please try the --disable-background-networking flag? Does it fix the problem on your side?

@LavrovArtem does --disable-background-networking affect running on SauceLabs?

anyways - +1 from us - seeing same issue, hanging with parallelism on 1.7.0. Works fine on 1.6.1

anyways - +1 from us - seeing same issue, hanging with parallelism on 1.7.0. Works fine on 1.6.1

correct on this - it won't work on 1.6.1 anymore as well.... maybe some sub-dependency was updated? or we're having a different issue.

Hi @mkj28

anyways - +1 from us - seeing same issue, hanging with parallelism on 1.7.0. Works fine on 1.6.1

This issue is specific to the Google Chrome browser. We are researching ways to fix it on our side.

does --disable-background-networking affect running on SauceLabs?

Yes, it should affect the test running on SauceLabs. At present, I cannot provide you with a complete example of how to pass this flag as a browser run option via 'https://github.com/DevExpress/testcafe-browser-provider-saucelabs'. I need additional time to investigate it.

It looks like the issue is fixed in the latest Google Chrome version - 79.0.3945.130.
Try to run your tests with the latest TestCafe and Google Chrome versions and let us know your results.

It looks like the issue is fixed in the latest Google Chrome version - 79.0.3945.130.
Try to run your tests with the latest TestCafe and Google Chrome versions and let us know your results.

No, the issue is still present with latest Chrome and latest TestCafe 1.8.1-alpha. Container/browser hangs forever/till timeouts.

image

@jiteshsojitra
We assumed that the issue was fixed after Chrome updates because we didn't face it over the last few weeks. However, if the issue still persists, we will check it.

Could you share the screenshots of the Network tab in Chrome Dev Tools when the test execution hangs?

@jiteshsojitra,
Could you please try the --disable-background-networking flag? Does it fix the problem on your side?

Started testing by putting this, please give me some time. Everyday lot of test runs and if anyone will hang then CI will let us know. Sorry for late reply.

@jiteshsojitra,
Could you please try the --disable-background-networking flag? Does it fix the problem on your side?

Started testing by putting this, please give me some time. Everyday lot of test runs and if anyone will hang then CI will let us know. Sorry for late reply.

I would like to confirm that, by putting --disable-background-networking flag issue is resolved (we ran 100+ jobs but didn't see a single case where TestCafe stuck, previous in 10-20 runs; we were seeing issue). Thank you very much @LavrovArtem . It may help you to find suspect!

@jiteshsojitra,
Thank you for the information. We're happy to hear that the issue is resolved.

@jiteshsojitra,
Thank you for the information. We're happy to hear that the issue is resolved.

But ideally "--disable-background-networking" should not been required?

Would be great not to have to use that flag given https://github.com/DevExpress/testcafe/issues/4530#issuecomment-565378259, for example.

@jiteshsojitra @mkj28

We cannot consider using this flag as a permanent solution since there are issues in other repositories that report about problems caused by the flag. See: https://github.com/alixaxel/chrome-aws-lambda/issues/5

I can confirm this issue happens for me as well on 1.8.1 and the disable background networking fix does not solve the problem only using 1.6 will work for me

@benmonro Thanks for reporting. Could you please share your environment details with us?

@arubtsov you can see all the details this PR's checks: https://github.com/testing-library/testcafe-testing-library/runs/423496778?check_suite_focus=true

I am trying to run 2 status checks, 1 for node 10, and another for node 12. When doing so, whichever one gets to the run test cafe step last will hang indefinitely.

image

@benmonro

Hello,

Thank you for your clarification. We will examine it in the context of your original issue.

This issue was automatically closed because there was no response to our request for more information from the original author. Currently, we don't have enough information to take action. Please reach out to us if you find the necessary information and are able to share it. We are also eager to know if you resolved the issue on your own and can share your findings with everyone.

The --disable-background-networking flag is applied by default since [email protected]. If you don't mind installing preliminary builds, you can install and test it in your environment. I will post a message in this issue thread when a stable release is available.

This thread has been automatically locked since it is closed and there has not been any recent activity. Please open a new issue for related bugs or feature requests. We recommend you ask TestCafe API, usage and configuration inquiries on StackOverflow.

The [email protected] release with the fix is available now.

Was this page helpful?
0 / 5 - 0 ratings