Unable to open project. Reason: ParseKeywordException

We are facing issue that Katalon failed to open project due to below error
image

Look like it is coming from our custom keywords. However, those keywords are running well. Currently, we work around by moving out those keywords then open project and copy them back. Please help!

Error Details
com.kms.katalon.custom.improvement.parser.ParseKeywordException: java.lang.IllegalArgumentException: Invalid JSON syntax. Root cause: com.google.gson.stream.MalformedJsonException: Expected β€˜:’ at line 2 column 10 path $.<<<<<<<
at com.kms.katalon.custom.improvement.parser.ProjectCustomKeywordsParser.parseAllKeywordFilesInProject(ProjectCustomKeywordsParser.java:84)
at com.kms.katalon.custom.improvement.parser.ImprovedCustomKeywordParser.parseProjectCustomKeywords(ImprovedCustomKeywordParser.java:138)
at com.kms.katalon.custom.improvement.parser.ImprovedCustomKeywordParser.parseCustomKeywords(ImprovedCustomKeywordParser.java:57)
at com.kms.katalon.controller.ImprovedKeywordControllerDelegate.parseAllCustomKeywords(ImprovedKeywordControllerDelegate.java:41)
at com.kms.katalon.controller.KeywordController.parseAllCustomKeywords(KeywordController.java:165)
at com.kms.katalon.controller.ProjectController.openProjectForUI(ProjectController.java:129)
at com.kms.katalon.composer.project.handlers.OpenProjectHandler$1.run(OpenProjectHandler.java:166)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122)
Caused by: java.lang.IllegalArgumentException: Invalid JSON syntax. Root cause: com.google.gson.stream.MalformedJsonException: Expected β€˜:’ at line 2 column 10 path $.<<<<<<<
at com.kms.katalon.core.util.internal.JsonUtil.fromJson(JsonUtil.java:94)
at com.kms.katalon.custom.improvement.cache.ParseKeywordCacheContent.fromFile(ParseKeywordCacheContent.java:54)
at com.kms.katalon.custom.improvement.cache.ParseKeywordCacheFile.loadContent(ParseKeywordCacheFile.java:35)
at com.kms.katalon.custom.improvement.cache.ParseKeywordCacheFile.getOrCreate(ParseKeywordCacheFile.java:64)
at com.kms.katalon.custom.improvement.parser.ProjectCustomKeywordsParser.internallyParseKeywordFile(ProjectCustomKeywordsParser.java:92)
at com.kms.katalon.custom.improvement.parser.ProjectCustomKeywordsParser.parseAllKeywordFilesInProject(ProjectCustomKeywordsParser.java:78)
… 7 more

Hi @nguyenthanh.lam,

Just delete .cache folder, .project file, .classpath file then try opening your project again.

Do we need to add those files to .gitignore?

Thanks. It is working now. Hopefully it does not happen again…

1 Like

Do we need to add those files to .gitignore?

Yes, you should