Unable to Run Test Case Due to groovy.json.jsonExecption Error

Hi,

I am using Katalon v.6.2.0 and am attempting to run my test case but its seems like when it gets to the json slurper section Katalon is returning an error. This was working prior to the 6.2.0 update.

Here is my test case script:

import static com.kms.katalon.core.checkpoint.CheckpointFactory.findCheckpoint
import static com.kms.katalon.core.testcase.TestCaseFactory.findTestCase
import static com.kms.katalon.core.testdata.TestDataFactory.findTestData
import static com.kms.katalon.core.testobject.ObjectRepository.findTestObject
import com.kms.katalon.core.checkpoint.Checkpoint as Checkpoint
import com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords as CucumberKW
import com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords as Mobile
import com.kms.katalon.core.model.FailureHandling as FailureHandling
import com.kms.katalon.core.testcase.TestCase as TestCase
import com.kms.katalon.core.testdata.TestData as TestData
import com.kms.katalon.core.testobject.TestObject as TestObject
import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WS
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI
import internal.GlobalVariable as GlobalVariable

loginResponse = WS.sendRequest(findTestObject('User/GET User Login', [('email') : GlobalVariable.userEmail, ('password') : GlobalVariable.userPassword]))

WS.verifyResponseStatusCode(loginResponse, 200)

def slurper = new groovy.json.JsonSlurper()

def result = slurper.parseText(loginResponse.getResponseBodyContent())

GlobalVariable.sessionToken = result.token

sessionResponse = WS.sendRequest(findTestObject('Session/PUT Session', [('sessionToken') : GlobalVariable.sessionToken, ('companyId') : GlobalVariable.userCompanyId]))

WS.verifyResponseStatusCode(sessionResponse, 200)

WS.verifyElementPropertyValue(sessionResponse, 'session.companyId', '102')

Here is the error that Katalon returns:

06-20-2019 09:47:13 AM Test Cases/Example Test Cases/User Login and Set Company

Elapsed time: 2.130s

Test Cases/Example Test Cases/User Login and Set Company FAILED.
Reason:
groovy.json.JsonException: Unable to determine the current character, it is not a string, number, array, or object

The current character read is '<' with an int value of 60
Unable to determine the current character, it is not a string, number, array, or object
line number 1
index number 0
<!DOCTYPE html>
^
	at User Login and Set Company.run(User Login and Set Company:22)
	at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:194)
	at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:119)
	at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:337)
	at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:328)
	at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:307)
	at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:299)
	at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:233)
	at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:114)
	at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:105)
	at com.kms.katalon.core.main.TestCaseMain$runTestCase$0.call(Unknown Source)
	at TempTestCase1561038430678.run(TempTestCase1561038430678.groovy:21)

Any help? Thank you!

most probably the api returned some html response due to some error.
i strongly advise to add at least response code verification and response type prior to attempt to parse the response

Thank you!

Hello Everyone I am having problem while running my script on Katalon 6.2.2
The following message appeared: groovy.control.MultipleCompilationErrorsException: startup failed:
please help!