[MacOs] Katalon Test Suites keep stopping after a test case fails

Hi all,

I’m facing an issue when running test suites, which is everytime a test case is failed, the test suite will stop at the next case, just right after Katalon load the data for the next test case.

The Log spotted an error which I have never faced before when I used Window:

Caught: com.github.kklisura.cdt.services.exceptions.ChromeServiceException: Failed connecting to tab web socket.
com.github.kklisura.cdt.services.exceptions.ChromeServiceException: Failed connecting to tab web socket.
	at com.github.kklisura.cdt.services.impl.ChromeServiceImpl.createDevToolsService(ChromeServiceImpl.java:206)
	at com.github.kklisura.cdt.services.impl.ChromeServiceImpl.createDevToolsService(ChromeServiceImpl.java:161)
	at com.kms.katalon.core.util.CDTUtils.getService(CDTUtils.java:41)
	at com.kms.katalon.core.helper.screenrecorder.CDTVideoRecorder.startCDTRecording(CDTVideoRecorder.java:116)
	at com.kms.katalon.core.helper.screenrecorder.CDTVideoRecorder.start(CDTVideoRecorder.java:90)
	at com.kms.katalon.core.helper.screenrecorder.VideoRecorder.start(VideoRecorder.java:51)
	at com.kms.katalon.core.context.internal.VideoRecorderService.startBrowserRecorder(VideoRecorderService.java:172)
	at com.kms.katalon.core.context.internal.VideoRecorderService.handleListenerEvent(VideoRecorderService.java:111)
	at com.kms.katalon.core.context.internal.ExecutionEventManager.publicEvent(ExecutionEventManager.java:36)
	at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:268)
	at com.kms.katalon.core.common.CommonExecutor.accessTestCaseMainPhase(CommonExecutor.java:65)
	at com.kms.katalon.core.main.TestSuiteExecutor.accessTestSuiteMainPhase(TestSuiteExecutor.java:161)
	at com.kms.katalon.core.main.TestSuiteExecutor.execute(TestSuiteExecutor.java:107)
	at com.kms.katalon.core.main.TestCaseMain.startTestSuite(TestCaseMain.java:176)
	at TempTestSuite1734515761489.run(TempTestSuite1734515761489.groovy:35)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAc
![Screenshot 2024-12-18 at 17.17.07|690x239](upload://zf4nlLDK2K4XoobeCiQwSFURJqq.png)
cessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
Caused by: com.github.kklisura.cdt.services.exceptions.WebSocketServiceException: Failed connecting to ws server {}
	at com.github.kklisura.cdt.services.impl.WebSocketServiceImpl.connect(WebSocketServiceImpl.java:120)
	at com.github.kklisura.cdt.services.impl.WebSocketServiceImpl.create(WebSocketServiceImpl.java:86)
	at com.github.kklisura.cdt.services.impl.ChromeServiceImpl.lambda$new$0(ChromeServiceImpl.java:94)
	at com.github.kklisura.cdt.services.impl.ChromeServiceImpl.createDevToolsService(ChromeServiceImpl.java:176)
	... 17 more
Caused by: javax.websocket.DeploymentException: Handshake error.
	at org.glassfish.tyrus.client.ClientManager$3$1.run(ClientManager.java:679)
	at org.glassfish.tyrus.client.ClientManager$3.run(ClientManager.java:717)
	at org.glassfish.tyrus.client.ClientManager$SameThreadExecutorService.execute(ClientManager.java:871)
	at org.glassfish.tyrus.client.ClientManager.connectToServer(ClientManager.java:516)
	at org.glassfish.tyrus.client.ClientManager.connectToServer(ClientManager.java:378)
	at com.github.kklisura.cdt.services.impl.WebSocketServiceImpl.connect(WebSocketServiceImpl.java:98)
	... 20 more
Caused by: org.glassfish.tyrus.core.HandshakeException: Response code was not 101: 403.
	at org.glassfish.tyrus.client.TyrusClientEngine.processResponse(TyrusClientEngine.java:320)
	at org.glassfish.tyrus.container.grizzly.client.GrizzlyClientFilter.handleHandshake(GrizzlyClientFilter.java:346)
	at org.glassfish.tyrus.container.grizzly.client.GrizzlyClientFilter.handleRead(GrizzlyClientFilter.java:315)
	at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
	at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
	at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:526)
	at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
	at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)
	at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56)
	at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)
	at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:591)
	at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:571)

Hi Elly @Elly_Tran ơi,

Could you help to follow up with this thread?

Thanks em,
Albert

I suppose that @emmuonthuongtet is using this library:

Which version of the chrome-devtools-java-client are you using?

Which version of Chrome browser are you using?


The README says that the kklisura’s library v4, the latest one, was last tested with Chrome version 90, which is very old. Possibly the libray is not tested with the recent Chrome versions, such as v133.

In short, you shouldn’t use this library.

Katalon should close this page. as this plugin no longer works.

@emmuonthuongtet that com.github.kklisura class is not something you installed, it ships inside katalon. look at the frames right under it: CDTVideoRecorder.startCDTRecording, VideoRecorderService.startBrowserRecorder. that is the built in browser-based video recorder from project > settings > execution, it attaches to the chrome devtools websocket at the start of each test case. when a test case fails and chrome gets torn down or left half closed, the next test case’s recorder tries to connect to the old tab, gets “failed connecting to tab web socket” and the suite stops right after loading the data for that case, exactly where you see it.

two things to try, in this order:

  1. desired capabilities > web ui > chrome, add --remote-allow-origins=* to args. katalon’s own troubleshooting page for browser-based videos says this is required for the recorder to connect on recent chrome, and it is the most common reason it fails only on some machines.
  2. if it still happens, switch record type to screen-based recorder (or untick record video) and the suite will carry on past failed cases like it did on windows.

your windows machine probably had the arg already in its project settings, or an older chrome that did not enforce the origin check.