testcafe: TestCafe fails with latest stable chrome version 122.0.6261.57
What is your Scenario?
Running testcafe with chrome:headless
and the latest version of chrome installed
What is the Current behavior?
Error: Unable to open the "chrome:headless" browser due to the following error:
Error: No inspectable targets
at defaultTarget (/home/circleci/project/node_modules/chrome-remote-interface/lib/chrome.js:48:23)
at Chrome._fetchDebuggerURL (/home/circleci/project/node_modules/chrome-remote-interface/lib/chrome.js:194:28)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Chrome._start (/home/circleci/project/node_modules/chrome-remote-interface/lib/chrome.js:141:25)
at BrowserConnection._runBrowser (/home/circleci/project/node_modules/testcafe/src/browser/connection/index.ts:290:32)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
What is the Expected behavior?
Tests run
What is the public URL of the test page? (attach your complete example)
any. google.com
What is your TestCafe test code?
fixture.page("https://www.google.com")
test("Test", async t => {
await t.expect(true).ok();
});
Your complete configuration file
No response
Your complete test report
No response
Screenshots
No response
Steps to Reproduce
1.Run testcafe with latest chrome
TestCafe version
3.5.0
Node.js version
No response
Command-line arguments
api runner
Browser name(s) and version(s)
Chrome 122.0.6261.57
Platform(s) and version(s)
Ubuntu
Other
No response
About this issue
- Original URL
- State: closed
- Created 4 months ago
- Reactions: 15
- Comments: 30 (1 by maintainers)
We appreciate you taking the time to share information about this issue. We reproduced the bug and added this ticket to our internal task queue. We’ll update this thread once we have news.
We found that the issue relates to the chrome --headless flag used in TestCafe chromium:headless.
As a workaround, please try running your tests with
chromium --headless=new
.For example:
chromium:headless
becomeschromium --headless=new
.Please let us know if you encounter any issues.
thank you for the workaround, for me, there was another trick to be able to run with the new headless mode:
testcafe 'chrome --headless=new'
be aware of the quotesThis workaround worked for us! Thanks, @Bayheck
In our case, we replaced
chrome:headless
withchromium --headless=new
..circleci/config.yml
test.js
Logs
Env
Chrome install
Test run
Also ran into this issue with TestCafe 3.5.0 when using the latest Chrome
122.0.6261.57
on a CircleCi Ubuntu container. Pinning our Chrome version to121.0.6167.184
worked as a short-term fix.I can confirm that using
--headless=new
with the docker example that I’ve created for the issue.122.0.6261.94-r0
docker run --rm testcafe:issue-8145 chromium --headless=new test.js
and it ran well.docker run --rm testcafe:issue-8145 chromium:headless test.js
and it failed to confirm that it wasn’t fixed via a Chromium update in between.I am not seeing it on my local machine, but am seeing it in CircleCI. I created this bare-bones repo with a CircleCI config to reproduce the issue: https://github.com/codambro/testcafe-issue-8145
We’re getting the same issue started yesterday with TestCafe 3.1.0 & it affects all the remote runs on Circle. I hope this can get significant attention to get us unblocked.
Experiencing the same problem
We found that the issue is related to old headless not providing the target list.
Here is the issue on Chromium: https://issues.chromium.org/issues/40256248.
Old headless is going to be discontinued.
However, the new headless is not yet stable enough at this moment for TestCafe to use it as default. The solution for now is to use the workaround above.
When I tried the workaround it did not work for me:
Then I tried @omerhakanbilici variant. That one worked for me as well.
I’m still seeing the issue with Chrome
122.0.6261.69
Also - we’re installing TestCafe on one of CircleCi’s Docker runners, which usescimg/node:18.9.1-browsers
image. We’re not building the custom docker image ourselves.Same here.
Google Chrome 122.0.6261.57 has been installed to /usr/bin/google-chrome-stable
ERROR Unable to open the "chrome:headless....
We’re having the issue with a freshly pull version of the test-café docker on version 3.5.0 which uses
chromium 122.0.6261.57-r0
I’ve been able to return our tests to the normal by forcing the version to
chromium 121.0.6167.184-r0
fromalpine v3.19 community
by inheriting from the original docker and adding these lines:and then using
testcafe-chromium-fix:latest
in my docker command.Currently, we can’t reproduce the issue (chrome 122.0.6261.57 / node 18 - 20 / ubuntu 22.04 - 20.04 / testcafe 2.6.2 - 3.1.0 - 3.5.0).
As soon as we are able to reproduce it, we will address it immediately.
Also, Chrome has released a new version
122.0.6261.69
. Does the issue occur with it?