testcafe: Tests getting stuck (on different tests on different runs)
What is your Scenario?
Running tests on jenkins (debian) with native automation with chrome:headless
What is the Current behavior?
It works for a couple of tests (different number every time) and then nothing happens. The process keeps running forever. With normal reporter, the last thing you see is the last test result and nothing else. Running with DEBUG=testcafe:*, you can see that it loops on two kinds of requests.
What is the Expected behavior?
The tests succeed or fail and/or testcafe crashes should be fine. Anything but a process running forever
What is your public website URL? (or attach your complete example)
What is your TestCafe test code?
Your complete configuration file
From running with DEBUG=testcafe:*
TestCafeConfiguration {
_options: {
browsers: Option {
name: 'browsers',
value: [Array],
source: 'Configuration'
},
nativeAutomation: Option {
name: 'nativeAutomation',
value: true,
source: 'Configuration'
},
cache: Option {
name: 'cache',
value: true,
source: 'Configuration'
},
selectorTimeout: Option {
name: 'selectorTimeout',
value: 20000,
source: 'Configuration'
},
assertionTimeout: Option {
name: 'assertionTimeout',
value: 15000,
source: 'Configuration'
},
pageLoadTimeout: Option {
name: 'pageLoadTimeout',
value: 10000,
source: 'Configuration'
},
quarantineMode: Option {
name: 'quarantineMode',
value: true,
source: 'Configuration'
},
reporter: Option {
name: 'reporter',
value: [Array],
source: 'Configuration'
},
screenshots: Option {
name: 'screenshots',
value: [Object],
source: 'Input'
},
src: Option {
name: 'src',
value: [Array],
source: 'Configuration'
},
compilerOptions: Option {
name: 'compilerOptions',
value: [Object],
source: 'Configuration'
},
developmentMode: Option {
name: 'developmentMode',
value: false,
source: 'Default'
},
retryTestPages: Option {
name: 'retryTestPages',
value: false,
source: 'Default'
},
disableHttp2: Option {
name: 'disableHttp2',
value: false,
source: 'Default'
},
disableCrossDomain: Option {
name: 'disableCrossDomain',
value: false,
source: 'Default'
},
filter: Option {
name: 'filter',
value: null,
source: 'Default'
},
isCli: Option {
name: 'isCli',
value: true,
source: 'Input'
},
hostname: Option {
name: 'hostname',
value: '172.21.0.2',
source: 'Input'
},
port1: Option {
name: 'port1',
value: 41579,
source: 'Input'
},
port2: Option {
name: 'port2',
value: 39441,
source: 'Input'
},
ssl: Option {
name: 'ssl',
value: undefined,
source: 'Input'
},
configFile: Option {
name: 'configFile',
value: 'testcafe/jenkins-testcaferc.json',
source: 'Input'
},
v8Flags: Option {
name: 'v8Flags',
value: undefined,
source: 'Input'
},
esm: Option {
name: 'esm',
value: undefined,
source: 'Input'
},
proxy: Option {
name: 'proxy',
value: undefined,
source: 'Input'
},
proxyBypass: Option {
name: 'proxyBypass',
value: undefined,
source: 'Input'
},
tsConfigPath: Option {
name: 'tsConfigPath',
value: undefined,
source: 'Input'
},
concurrency: Option {
name: 'concurrency',
value: 1,
source: 'Configuration'
},
videoPath: Option {
name: 'videoPath',
value: undefined,
source: 'Input'
},
videoOptions: Option {
name: 'videoOptions',
value: undefined,
source: 'Input'
},
videoEncodingOptions: Option {
name: 'videoEncodingOptions',
value: undefined,
source: 'Input'
},
appCommand: Option {
name: 'appCommand',
value: undefined,
source: 'Input'
},
appInitDelay: Option {
name: 'appInitDelay',
value: 1000,
source: 'Configuration'
},
clientScripts: Option {
name: 'clientScripts',
value: undefined,
source: 'Input'
},
debugMode: Option {
name: 'debugMode',
value: false,
source: 'Configuration'
},
debugOnFail: Option {
name: 'debugOnFail',
value: false,
source: 'Configuration'
},
skipUncaughtErrors: Option {
name: 'skipUncaughtErrors',
value: false,
source: 'Configuration'
},
stopOnFirstFail: Option {
name: 'stopOnFirstFail',
value: false,
source: 'Configuration'
},
takeScreenshotsOnFails: Option {
name: 'takeScreenshotsOnFails',
value: false,
source: 'Configuration'
},
disablePageCaching: Option {
name: 'disablePageCaching',
value: false,
source: 'Configuration'
},
disablePageReloads: Option {
name: 'disablePageReloads',
value: false,
source: 'Configuration'
},
disableScreenshots: Option {
name: 'disableScreenshots',
value: false,
source: 'Configuration'
},
disableMultipleWindows: Option {
name: 'disableMultipleWindows',
value: false,
source: 'Configuration'
},
speed: Option {
name: 'speed',
value: 1,
source: 'Configuration'
},
skipJsErrors: Option {
name: 'skipJsErrors',
value: false,
source: 'Configuration'
}
},
_defaultPaths: [
'/var/jenkins_home/workspace/bjelin-web-ci/testcafe/jenkins-testcaferc.json'
],
_filePath: '/var/jenkins_home/workspace/bjelin-web-ci/testcafe/jenkins-testcaferc.json',
_overriddenOptions: [],
_isExplicitConfig: true
}
Your complete test report
This is what loops when it gets stuck (running with DEBUG=testcafe:*):
2023-06-01T14:03:57.437Z testcafe:native-automation:request-pipeline:service-request requestPaused 223576.10079 interception-job-4382.0 request http://localhost:41579/messaging
2023-06-01T14:03:57.439Z testcafe:test-run:Chrome 114.0.5735.90 / Debian 11.7:driver-message
{
cmd: 'ready-for-browser-manipulation',
pageDimensions: {
dpr: 1,
innerWidth: 1280,
innerHeight: 800,
documentWidth: 1265,
documentHeight: 800,
bodyWidth: 1265,
bodyHeight: 0
},
disableResending: true,
allowRejecting: true,
sessionId: 'OkOQs0WDd'
}
2023-06-01T14:03:57.441Z testcafe:native-automation:request-pipeline:service-request requestPaused 223576.10079 interception-job-4382.0 response http://localhost:41579/messaging
2023-06-01T14:03:57.506Z testcafe:native-automation:request-pipeline:service-request requestPaused 223576.10080 interception-job-4383.0 request http://localhost:41579/messaging
2023-06-01T14:03:57.508Z testcafe:test-run:Chrome 114.0.5735.90 / Debian 11.7:driver-message
{
cmd: 'ready',
status: {
id: '38877.80000305176',
isCommandResult: true,
executionError: {
name: 'TypeError',
message: "Cannot read properties of undefined (reading 'type')",
stack: "TypeError: Cannot read properties of undefined (reading 'type')\n" +
' at BrowserManipulationQueue._executeCommand (/var/jenkins_home/workspace/bjelin-web-ci/node_modules/testcafe/src/test-run/browser-manipulation-queue.js:58:25)\n' +
' at BrowserManipulationQueue.executePendingManipulation (/var/jenkins_home/workspace/bjelin-web-ci/node_modules/testcafe/src/test-run/browser-manipulation-queue.js:102:35)\n' +
' at TestRun.ready-for-browser-manipulation (/var/jenkins_home/workspace/bjelin-web-ci/node_modules/testcafe/src/test-run/index.ts:1497:58)\n' +
' at TestRun.handleServiceMessage (/var/jenkins_home/workspace/bjelin-web-ci/node_modules/testcafe-hammerhead/lib/session/index.js:62:39)\n' +
' at SessionController.handleServiceMessage (/var/jenkins_home/workspace/bjelin-web-ci/node_modules/testcafe/src/test-run/session-controller.js:41:47)\n' +
' at Proxy._onServiceMessage (/var/jenkins_home/workspace/bjelin-web-ci/node_modules/testcafe-hammerhead/lib/proxy/index.js:129:46)\n' +
' at runMicrotasks (<anonymous>)\n' +
' at processTicksAndRejections (node:internal/process/task_queues:96:5)',
isInternalError: true
},
pageError: null,
resent: false,
result: null,
consoleMessages: {},
isPendingWindowSwitching: false,
isObservingFileDownloadingInNewWindow: false,
isFirstRequestAfterWindowSwitching: false,
debug: '',
warnings: null
},
disableResending: true,
allowRejecting: true,
sessionId: 'OkOQs0WDd'
}
2023-06-01T14:03:57.510Z testcafe:native-automation:request-pipeline:service-request requestPaused 223576.10080 interception-job-4383.0 response http://localhost:41579/messaging
Screenshots
No response
Steps to Reproduce
TestCafe version
2.6.2
Node.js version
16.19.0
Command-line arguments
See config debug above
Browser name(s) and version(s)
Chrome 114.0.5735.90
Platform(s) and version(s)
Debian 11.7
Other
I could send you the whole log/debug file, but I’m afraid it might contain secrets in clear text
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 1
- Comments: 31 (2 by maintainers)
Could you try running your tests with 2.0.23 version of the
testcafe-browser-tools
and share the result with us? Use overrides for this and add to thepackage.json
this code line:@bbutel please read the following: Use overrides for this and add to the package.json this code line:
{ “overrides”: { “testcafe-browser-tools”: “2.0.23” } }
Also the example i sent, is the smallest and simplest i could do and even it cant be executed using testcafe 2.6.2 with latest headless chrome.