[Katalon TestCloud] Unable to Execute a Test Suite from a Git Project that Contains a Document Fixture with UTF-8 Characters in the Filename

Environment
Katalon TestCloud > Linux Chrome (headless) 110

Issue
The Execution of the Test Suite does not run because a file in the project structure contains UTF-8 character sets, e.g. šäπρλé.pdf

Attached is the debug.log file
debug.log (8.8 KB)

Workaround
Removed the UTF-8 named files from the project and tests executed without startup exceptions.

Steps to Reproduce

  1. Connect a Git Repository project with a filename with UTF-8 extended character sets, e.g. šäπρλé.pdf
  2. In TestOps, navigate to the Executions workspace
  3. Schedule a Test Run to start immediately
  4. Observe the Test Run fails with a message stating an InvalidPathException involving the UTF-8 named file in the project
[2023-05-08T04:37:16.773Z] [DEBUG]: 	java.nio.file.InvalidPathException: Malformed input or input contains unmappable characters: /katalon-agent/tmp/2023.05.08-4.37--38-0F1wZhwN4130-1302987/test-project.git/fixtures/company/sample/document/            .pdf
	at sun.nio.fs.UnixPath.encode(UnixPath.java:147)
	at sun.nio.fs.UnixPath.<init>(UnixPath.java:71)
	at sun.nio.fs.UnixFileSystem.getPath(UnixFileSystem.java:281)
	at java.nio.file.Paths.get(Paths.java:84)
	at org.eclipse.core.internal.filesystem.local.nio.PosixHandler.fetchFileInfo(PosixHandler.java:41)
	at org.eclipse.core.internal.filesystem.local.LocalFileNativesManager.fetchFileInfo(LocalFileNativesManager.java:65)
	at org.eclipse.core.internal.filesystem.local.LocalFile.fetchInfo(LocalFile.java:162)
	at org.eclipse.core.filesystem.provider.FileStore.fetchInfo(FileStore.java:260)
	at org.eclipse.core.filesystem.provider.FileStore.childInfos(FileStore.java:99)
	at org.eclipse.core.internal.localstore.UnifiedTree.getLocalList(UnifiedTree.java:360)
	at org.eclipse.core.internal.localstore.UnifiedTree.addChildren(UnifiedTree.java:148)
	at org.eclipse.core.internal.localstore.UnifiedTree.addNodeChildrenToQueue(UnifiedTree.java:254)
	at org.eclipse.core.internal.localstore.UnifiedTree.accept(UnifiedTree.java:120)
	at org.eclipse.core.internal.localstore.FileSystemResourceManager.refreshResource(FileSystemResourceManager.java:978)
	at org.eclipse.core.internal.localstore.FileSystemResourceManager.refresh(FileSystemResourceManager.java:961)
	at org.eclipse.core.internal.resources.Resource.refreshLocal(Resource.java:1557)
	at org.eclipse.core.internal.resources.Project.open(Project.java:1087)
	at org.eclipse.core.internal.resources.Project.open(Project.java:1112)
	at com.kms.katalon.groovy.util.GroovyUtil.initGroovyProjectDescription(GroovyUtil.java:711)
	at com.kms.katalon.groovy.util.GroovyUtil.initGroovyProject(GroovyUtil.java:197)
	at com.kms.katalon.controller.ProjectController.openProject(ProjectController.java:219)
	at com.kms.katalon.console.application.ConsoleMain.getProject(ConsoleMain.java:748)
	at com.kms.katalon.console.application.ConsoleMain.findProject(ConsoleMain.java:639)
	at com.kms.katalon.console.application.ConsoleMain.launch(ConsoleMain.java:430)
	at com.kms.katalon.console.application.ConsoleApplicationStarter.start(ConsoleApplicationStarter.java:36)
	at com.kms.katalon.application.Application.runConsole(Application.java:125)
	at com.kms.katalon.application.Application.start(Application.java:88)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:657)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:594)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1447)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1420)


[2023-05-08T04:37:16.778Z] [DEBUG]: 	All launchers terminated

[2023-05-08T04:37:17.482Z] [INFO]: 	Exit code: 2.

Expected Result
When executing a Test Run with a filename with UTF-8 extended character sets then the tests should be executed without an InvalidPathException error occurring on startup.

Hi,

Thank you for raising your issue. I think it seems like a feature request, isn’t it?

It is definitely a bug in the TestCloud Test Runner.
The file with the UTF-8 characters was not even used as part of any tests yet.
The Katalon Test project cannot be loaded when scheduling a test run when a file with a name containing UTF-8 characters exists in the project structure.

Do we have any solution for that ?

A Google search with a key “java.nio.file.InvalidPathException: Malformed input or input contains unmappable characters” showed a few links:

These resources suggest that the Linux machines of Katalon TestCloud is configured with the locale that accepts ASCII only; it does not accepts UTF-8 at all.

They can check how the Linux Locale is set by a simple command. Possibly on the linux box they would see:

$ locale
LANG=C
...

LANG=C means US-ASCII. if so, the Linux would be unable to process files with names of non ASCII characters.

Katalon should change the environment variable LANG to use UTF-8 by shell script.

export LANG="en_US.UTF-8"

Are you going to disregard people who speak languages other than English?

If Katalon wants to be an international enterprise, Katalon should just change the services to use UTF-8, not ASCII.

In the Dockerfile of Katalon i found this:

ENV LANG C.UTF-8

So, running a certain project with docker should behave correctly with UTF-8.
I suppose, such has been omitted by Katalon devs when setting up the TestCloud agents to use KRE ‘natively’, therefore the errors.

@Elly_Tran it’s your call.
It is not a feature request, it’s a bug which has to be addresed as quick as possible.

I have never seen C.UTF-8. So I googled and found the following explanation:

In general C is for computer,

@kazurayam well, yeah, those are just details.
Anyway, the issue seems to be real and was addresed for Docker, but not for cases where KRE is run natively on cloud agents.
So the dev team may have to check the scripts they have in place when spinning up those TestOps environments.

1 Like

@jason.tolotta until this issue is addressed, you can try to run your project with a Docker agent, in theory should work properly.
see:

Or a local agent under your control, if you have any hardware or VM available fot this purpose.

@pratap.chandra.ghosh TestCloud has fixed the issue since Dec 06, 2023 Katalon TestCloud Release Notes | Katalon Docs. Are you still facing the error? Please share more details of your case for our investigation. Thank you.