org.openqa.selenium.json.JsonException: Unable to determine type from: <. Last 1 characters read: <

Recently, I’ve been getting this intermittent issue to make my scripts failed. May I know if there is any resolution?

It only happened when run script with RemoteWebDriver on grid.

INFO: Katalon Version: 7.8.2

Caused by: com.kms.katalon.core.exception.StepFailedException: Unable to open browser with url: ‘<e.g.: detailed URL already provided here>’
at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.stepFailed(WebUIKeywordMain.groovy:64)
at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:26)
at com.kms.katalon.core.webui.keyword.builtin.OpenBrowserKeyword.openBrowser(OpenBrowserKeyword.groovy:81)
at com.kms.katalon.core.webui.keyword.builtin.OpenBrowserKeyword.execute(OpenBrowserKeyword.groovy:67)
at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:73)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.openBrowser(WebUiBuiltInKeywords.groovy:61)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords$ Source)
at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(
at com.kms.katalon.core.main.TestCaseExecutor.runScript(
at com.kms.katalon.core.main.TestCaseExecutor.doExecute(
at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(
at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(
at com.kms.katalon.core.main.TestCaseExecutor.execute(
at com.kms.katalon.core.main.TestCaseMain.runTestCase(
at com.kms.katalon.core.keyword.builtin.CallTestCaseKeyword$_callTestCase_closure1.doCall(CallTestCaseKeyword.groovy:59)
… 36 more
Caused by: org.openqa.selenium.json.JsonException: Unable to determine type from: <. Last 1 characters read: <
Build info: version: ‘3.141.59’, revision: ‘e82be7d358’, time: ‘2018-11-14T08:25:53’
System info: host: ‘e.g:host’, ip: ‘’, ‘Linux’, os.arch: ‘amd64’, os.version: ‘2.6.18-194.11.1.el5’, java.version: ‘1.8.0_74’
Driver info: driver.version: EventFiringWebDriver
at org.openqa.selenium.json.JsonInput.peek(
at org.openqa.selenium.json.JsonTypeCoercer.lambda$null$6(
at org.openqa.selenium.json.JsonTypeCoercer.coerce(
at org.openqa.selenium.json.Json.toType(
at org.openqa.selenium.json.Json.toType(
at org.openqa.selenium.json.Json.toType(
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(
at org.openqa.selenium.remote.HttpCommandExecutor.execute(
at org.openqa.selenium.remote.RemoteWebDriver.execute(
at com.kms.katalon.selenium.driver.CRemoteWebDriver.execute(
at org.openqa.selenium.remote.RemoteWebDriver.get(
at com.sun.proxy.$Proxy13.get(Unknown Source)
at com.kms.katalon.core.webui.keyword.builtin.OpenBrowserKeyword$_openBrowser_closure1.doCall(OpenBrowserKeyword.groovy:78)
at com.kms.katalon.core.webui.keyword.builtin.OpenBrowserKeyword$
at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:20)
… 51 more

Similar issue:

After debugging on W3CHttpResponseCode#decode, it seems that the exception is thrown because the content of the response is not a JSON but a text/plain that only contains …

Hi @ti.wang01 , we are experiencing this same error, did you end up finding a solution to your problem?


Please share the console log and version of Studio, browser you are using

Hi @duyluong if you could have look at this issue for us that would be very much appreciated.

The issue started happening 4 days ago on 30th May. We have been running this testing for months and have not had the issue before in that time.
We are using Katalon to run scripts in Browserstack on 8 different devices but only 2 of the devices are being effected. They are a DesktopPC/Windows 10/Chrome and DesktopPC/Windows 10/Edge.
We use a local connection to run the tests through.
Katalon Studio version = 8.3.5

Randomly the test will fail on the step WebUI.verifyElementVisible or WebUI.waitForElementVisible and throw the following error:
“Caused by: org.openqa.selenium.json.JsonException: Unable to determine type from: <. Last 1 characters read: <”
It will randomly fail on one test but then pass when you re-run it, or in the test case I have attached where I am checking the same object on the same page 20 times in a row, it will fail in different positions each run or not fail at all.
It has failed across lots of different tests, test suites, and test objects/elements in the last 4 days.

The issue occurs when the test is run through Jenkins and when run from my laptop.
The Chrome and Edge browsers were updated in Browserstack on the 2nd and 5th May so we think that is NOT a factor.
Changing the Windows version from 10 to 11. This had no effect.
Changing the Selenium version that Browserstack uses. This may work but I have to do more testing.

Below are some screen shots that I hope will help but attached are the console logs, error log, and my TEST script for your information.

If you require any more information please do not hesitate to contact me.

Console Logs.txt (69.9 KB) Error log.txt (764.9 KB) TEST_ISSUE_Windows 10.txt (6.0 KB)