I have a suite of tests that, when running without concurrency, all pass fine. When I start running them with concurrency, they start to fall apart. I do not believe that the tests have inter-dependencies that are making them fail. When the test fails, it looks like this:
1) A JavaScript error occurred on
"https://advancedaccount.wistia.io/stats/medias/lz45f2dspl#social".
Repeat test actions in the browser and check the console for errors.
If you see this error, it means that the tested website caused it. You can fix it or disable tracking JavaScript errors in TestCafe. To do the latter, enable the
"--skip-js-errors" option.
If this error does not occur, please write a new issue at:
"https://github.com/DevExpress/testcafe/issues/new?template=bug-report.md".
JavaScript error details:
undefined:
No stack trace available
Browser: Chrome 73.0.3683 / Linux 0.0.0
Screenshot: /mnt/artifacts/screenshots/Media - Social Stats/142_errors/1.png
497 | .expect(socialStatsPage.youtube.likes.textContent).contains('5')
498 | .expect(socialStatsPage.youtube.shares.textContent).contains('100')
499 | .expect(socialStatsPage.youtube.views.textContent).contains('20')
500 | .expect(socialStatsPage.cardError.withProps('vendorName',
'facebook').exists).ok()
501 | .expect(socialStatsPage.cardError.withProps('vendorName',
'facebook').textContent).contains('It looks like your credentials might be outdated')
> 502 | .click(socialStatsPage.reauthorizeAccountLink)
503 | .expect(getLocation()).contains('www.facebook.com');
504 | });
505 |
506 |test
507 | .requestHooks(mockFacebookExpired)('Non-account owner expired token', async (t)
=> {
at click (/usr/src/app/testcafe/tests/media/socialStats.js:502:8)
2) Unhandled promise rejection:
{ code: 'E1', isTestCafeError: true, callsite: CallsiteRecord { filename:
'/usr/src/app/testcafe/tests/media/socialStats.js', lineNum: 501, callsiteFrameIdx: 6,
stackFrames: [ [CallSite], [CallSite], [CallSite], [CallSite], [CallSite], [CallSite],
[CallSite], CallSite {}, [CallSite], [CallSite], [CallSite], [CallSite] ], isV8Frames: true
}, errStack: 'undefined:\n No stack trace available', pageDestUrl:
'https://advancedaccount.wistia.io/stats/medias/lz45f2dspl#social' }
Browser: Chrome 73.0.3683 / Linux 0.0.0
It also seems like when this happens, many if not all of the other concurrent browsers also crash with just the same Unhandled promise rejection
failure diagnostic and nothing related to the test at all.
I have no idea where to start with debugging this. Any help would be great because I would like to get concurrency working. This occurs locally on my mac as well as in our CI setup.
What's also really odd is that when I look at the screenshot for the test failure, everything looks fine, so I can't figure out why it failed in the first place. Like I said, this test (and all the other ones) pass just fine if there is no concurrency flag.
Any tips would be much appreciated. I am using TestCafé v1.2.1.