Headless Chrome workaround fails with Chrome 123.0.0.0 #8171
Labels
STATE: Need clarification
An issue lacks information for further research.
TYPE: bug
The described behavior is considered as wrong (bug).
What is your Scenario?
Running Testcafe in AWS Codebuild, I experienced the issue with Chrome v122 described here: #8145 - and using the workaround to pass in
--headless=new
fixed the issue.Now with Chrome v123, running headless tests in codebuild throws this error:
ERROR The Chrome 123.0.0.0 / Amazon Linux 2023.4.20240401 (Amazon Linux) browser disconnected. If you did not close the browser yourself, browser performance or network issues may be at fault.
No changes to my configuration at all, the new chrome version introduced this problem.What is the Current behavior?
Now with Chrome v123, running headless tests in codebuild throws this error:
ERROR The Chrome 123.0.0.0 / Amazon Linux 2023.4.20240401 (Amazon Linux) browser disconnected. If you did not close the browser yourself, browser performance or network issues may be at fault.
Testcafe version: 3.5.0
Codebuild runtime: Node 18
Codebuild image: aws/codebuild/amazonlinux2-x86_64-standard:5.0
Image info-
image_name="al2023-container"
image_version="2023"
image_arch="x86_64"
image_file="al2023-container-2023.4.20240401.1-x86_64"
image_stamp="380f-2370"
image_date="20240401195520"
recipe_name="al2023 container"
recipe_id="d16da0fb-a0ea-71a0-40a9-5557-695a-45d9-6d4e30de"
Browser arg:
chromium:/usr/bin/chromium --headless=new --no-sandbox --disable-dev-shm-usage --disable-setuid-sandbox --single-process --use-gl=swiftshader --no-first-run --no-zygote
^ Tried passing in the browser with & without quotes, with & without full path to chromium, passing in chrome instead of chromium; all throw the same error. Also tried passing in the original
:headless
instead of--headless=new
and that throws theNo inspectable targets
error as mentioned in #8145What is the Expected behavior?
headless tests should run on Chrome v123 in Codebuild without error
What is the public URL of the test page? (attach your complete example)
no public url of my test page exists, issue is with browser connection
What is your TestCafe test code?
n/a - not an issue within test files
Your complete configuration file
Your complete test report
partial codebuild logs>>>
[Container] 2024/04/16 12:47:59.227726 Running command which testcafe
/usr/local/bin/testcafe
[Container] 2024/04/16 12:47:59.234674 Running command which chromium
/usr/bin/chromium
[Container] 2024/04/16 12:47:59.241373 Running command testcafe -v
Using locally installed version of TestCafe.
3.5.0
[Container] 2024/04/16 12:48:00.282632 Running command export ENV_MODE=${ENVIRONMENT}
[Container] 2024/04/16 12:48:00.289295 Running command echo ${ENVIRONMENT}
staging
[Container] 2024/04/16 12:48:00.294128 Phase complete: PRE_BUILD State: SUCCEEDED
[Container] 2024/04/16 12:48:00.294144 Phase context status code: Message:
[Container] 2024/04/16 12:48:00.327693 Entering phase BUILD
[Container] 2024/04/16 12:48:00.328208 Running command testcafe -c ${CONCURRENCY} --config-file .testcaferc.json "${BROWSER}" ${TESTS} --fixture-meta browser=headless
Using locally installed version of TestCafe.
The "concurrency" and "filter" options from the configuration file will be ignored.
ERROR The Chrome 123.0.0.0 / Amazon Linux 2023.4.20240401 (Amazon Linux) browser disconnected. If you did not close the browser yourself, browser performance or network issues may be at fault.
Screenshots
n/a
Steps to Reproduce
Run any tests in the AWS codebuild environment described above on latest headless chrome/chromium browser. Note: concurrency was set to 1 in this case.
TestCafe version
reproduced w/ 3.5.0 and 2.6.1
Node.js version
reproduced w/ 18 and 16
Command-line arguments
testcafe -c ${CONCURRENCY} --config-file .testcaferc.json "${BROWSER}" ${TESTS} --fixture-meta browser=headless
Browser name(s) and version(s)
Chrome 123.0.0.0
Platform(s) and version(s)
AWS Codebuild
Other
Buildspec configuration>>>
version: 0.2
batch:
build-graph:
- identifier: mod_forum_admin_tests
env:
variables:
TESTS: tests/hus/moderation/forum-admin/
CONCURRENCY: 1
ignore-failure: true
phases:
install:
runtime-versions:
nodejs: 18
commands:
- echo Image Info
- cat /etc/image-id
- echo Installing Chromium
- wget https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm
- sudo yum install -y ./google-chrome-stable_current_x86_64.rpm
- sudo ln -s /usr/bin/google-chrome-stable /usr/bin/chromium
- echo Installing Testcafe
- npm install -g testcafe
- npm install
pre_build:
commands:
- which testcafe
- which chromium
- testcafe -v
- export ENV_MODE=${ENVIRONMENT}
- echo ${ENVIRONMENT}
build:
on-failure: CONTINUE
commands:
- testcafe -c ${CONCURRENCY} --config-file .testcaferc.json "${BROWSER}" ${TESTS} --fixture-meta browser=headless
^ see previous sections for complete browser argument
The text was updated successfully, but these errors were encountered: