Has Katalon TestCloud changed to not allow file uploading of repository files?

I’m getting an error in a test running through TestOps / TestCloud that passes as expected when running locally. The failure occurs when attempting to upload a file that is part of the repository. This test has previously worked on TestOps / TestCloud and there were no changes to repo between the below two results shown below. Has there been a change to TestOps / TestCloud that now makes this not possible or am I missing something?

Here is a log of the instance where the test was passing:

And here is a log of the instance where the test isn’t passing with the full error log beneath:

11/29/2022 05:45:55 +00:00 - [TEST_STEP][FAILED] - uploadFile(findTestObject("Pages/Form/I_FileUpload_Instance", ["instance":"2"]), fileLocation): Unable to upload file 'C:/Windows/System32/tmp/2022.11.29-5.24--988-6UanP9eS8PGd-1024109/Katalon.WebUI/Resources/radarLogo.jfif' to object 'Object Repository/Pages/Form/I_FileUpload_Instance' (Root cause: com.kms.katalon.core.exception.StepFailedException: Unable to upload file 'C:/Windows/System32/tmp/2022.11.29-5.24--988-6UanP9eS8PGd-1024109/Katalon.WebUI/Resources/radarLogo.jfif' to object 'Object Repository/Pages/Form/I_FileUpload_Instance'
	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.UploadFileKeyword.uploadFile(UploadFileKeyword.groovy:87)
	at com.kms.katalon.core.webui.keyword.builtin.UploadFileKeyword.execute(UploadFileKeyword.groovy:68)
	at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:74)
	at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.uploadFile(WebUiBuiltInKeywords.groovy:4031)
	at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords$uploadFile$23.call(Unknown Source)
	at FormInputs_Attachment.run(FormInputs_Attachment:35)
	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:448)
	at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:439)
	at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:418)
	at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:410)
	at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:285)
	at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:369)
	at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:369)
	at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:369)
	at com.kms.katalon.core.common.CommonExecutor.accessTestCaseMainPhase(CommonExecutor.java:65)
	at com.kms.katalon.core.main.TestSuiteExecutor.accessTestSuiteMainPhase(TestSuiteExecutor.java:151)
	at com.kms.katalon.core.main.TestSuiteExecutor.execute(TestSuiteExecutor.java:106)
	at com.kms.katalon.core.main.TestCaseMain.startTestSuite(TestCaseMain.java:185)
	at com.kms.katalon.core.main.TestCaseMain$startTestSuite$0.call(Unknown Source)
	at TempTestSuite1669699697043.run(TempTestSuite1669699697043.groovy:36)
Caused by: org.openqa.selenium.InvalidArgumentException: invalid argument: File not found : C:/Windows/System32/tmp/2022.11.29-5.24--988-6UanP9eS8PGd-1024109/Katalon.WebUI/Resources/radarLogo.jfif
  (Session info: headless chrome=103.0.5060.53)
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
System info: host: 'DESKTOP-21FAVR0', ip: '10.0.2.2', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_282'
Driver info: com.kms.katalon.selenium.driver.CChromeDriver
Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 103.0.5060.53, chrome: {chromedriverVersion: 103.0.5060.53 (a1711811edd7..., userDataDir: C:\Users\ADMINI~1\AppData\L...}, goog:chromeOptions: {debuggerAddress: localhost:51070}, javascriptEnabled: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: WINDOWS, platformName: WINDOWS, proxy: Proxy(), setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify, webauthn:extension:credBlob: true, webauthn:extension:largeBlob: true, webauthn:virtualAuthenticators: true}
Session ID: 35e2eeed0b5d31ced70a7f768489f0d6
	at org.openqa.selenium.remote.http.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:187)
	at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:122)
	at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:49)
	at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:158)
	at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:83)
	at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)
	at com.kms.katalon.selenium.driver.CChromeDriver.execute(CChromeDriver.java:19)
	at org.openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.java:285)
	at org.openqa.selenium.remote.RemoteWebElement.sendKeys(RemoteWebElement.java:106)
	at org.openqa.selenium.support.events.EventFiringWebDriver$EventFiringWebElement.lambda$new$0(EventFiringWebDriver.java:404)
	at com.sun.proxy.$Proxy14.sendKeys(Unknown Source)
	at org.openqa.selenium.support.events.EventFiringWebDriver$EventFiringWebElement.sendKeys(EventFiringWebDriver.java:429)
	at com.kms.katalon.core.webui.keyword.builtin.UploadFileKeyword$_uploadFile_closure1.doCall(UploadFileKeyword.groovy:80)
	at com.kms.katalon.core.webui.keyword.builtin.UploadFileKeyword$_uploadFile_closure1.call(UploadFileKeyword.groovy)
	at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:20)
	at com.kms.katalon.core.webui.keyword.builtin.UploadFileKeyword.uploadFile(UploadFileKeyword.groovy:87)
	at com.kms.katalon.core.webui.keyword.builtin.UploadFileKeyword.execute(UploadFileKeyword.groovy:68)
	at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:74)
	at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.uploadFile(WebUiBuiltInKeywords.groovy:4031)
	at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords$uploadFile$23.call(Unknown Source)
	at Script1660742781132.run(Script1660742781132.groovy:35)
	... 16 more
)
1 Like

Hi @scott.reid ,

Thank you for letting us know. I will discuss internally and get back to you soon.

1 Like

Can you copy and paste the above pathway into Windows Explorer and locate the file? In other words, is the “File not found” at the location you state?

1 Like

This issue occurs when running via TestCloud so I don’t have access to the device to check to see whether the file exists. When attempting to navigate to the defined path on my local machine it doesn’t locate anything.

Here is the code that gets the file path and attempts to upload the file:

String fileLocation = RunConfiguration.getProjectDir() + '/Resources/radarLogo.jfif'

WebUI.uploadFile(findTestObject('Pages/Events/EventDetails/AttachmentTab/I_FileUpload'), fileLocation)

And here is the output of that step when the test is run locally:

12-05-2022 09:14:24 AM uploadFile(findTestObject("Pages/Events/EventDetails/AttachmentTab/I_FileUpload"), fileLocation)

Elapsed time: 1.082s

File 'C:/code/git/Katalon.WebUI/Resources/radarLogo.jfif' sent to object: 'Object Repository/Pages/Events/EventDetails/AttachmentTab/I_FileUpload'
1 Like

I will say, this is a bug.
Previously, when it worked, looks like TestOps was downloading your project to a certain C:\katalon-agent\whatever_tmp folder, which seems to be ok and your file was properly located.

With the new behavior, is resolving the Project Path under C:\Windows\system32\whatever.

If this is true and the Project Path path is correctly resolved, this is a serious issue.
System32 should not be accessible for user data.

1 Like

Hi,

I think it is probably our bug.

  • Do you @scott.reid have Enterprise license or free account? If you have Enterprise license, please submit a ticket on Katalon Help Center.

  • Can you please let us know your email and ORG ID to better trace log on this issue? If you want to give me you email privately, direct me via thuy.ttran@katalon.com.

Thank you!

1 Like

I have sent you an email now, thanks for responding!

1 Like

Exactly the same issue on TestCloud, any test that uploads a file cannot locate the file in the test project.
The file can be located when execute from the local machine using the Paths lib

invalid argument: File not found : /katalon-agent/tmp/2023.09.21-23.55--38-hbh6P1tYn5dK-1903675/test.git/fixtures/sample/document/sample.docx (Session info: chrome=110.0.5481.78) Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53' System info: host: '1112896winchrome110-1903675-katalon-agent-kzdw5', ip: '172.48.19.4', os.name: 'Linux', os.arch: 'amd64', os.version: '5.10.96', java.version: '1.8.0_312' Driver info: com.kms.katalon.selenium.driver.CRemoteWebDriver Capabilities {acceptInsecureCerts: true, browserName: chrome, browserVersion: 110.0, chrome: {chromedriverVersion: 110.0, userDataDir: "C:\\Windows\\proxy\\scoped...}, goog:chromeOptions: {debuggerAddress: }, javascriptEnabled: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: UNIX, platformName: UNIX, proxy: Proxy(), se:bidiEnabled: false, setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify, webauthn:extension:credBlob: true, webauthn:extension:largeBlob: true, webauthn:virtualAuthenticators: true, webdriver.remote.sessionid: QN0UY-QRLD3-ZJPMY-7TZFY} Session ID: QN0UY-QRLD3-ZJPMY-7TZFY %

The file exists, but the file cannot be uploaded

10/06/2023 04:50:43 +00:00 - [TEST_STEP][NOT_RUN] - comment("Fixture Sample File Exists? " + Files.exists(fixtureFilePath)): Fixture Sample File Exists? true
10/06/2023 04:50:43 +00:00 - [MESSAGE][INFO] - Fixture Sample File Exists? true

As a follow-up, I found out that the TestCloud when executing a Scheduled Run using Windows Chrome as the target browser, I noticed the OS is still Linux.
The problem is the Paths lib returns a Linux path, the Files.exist check says its good, but when the WebUI.uploadFile is invoked and the absolute path is used then the file cannot be found.
Executing on a Linux Chrome environment has no issues at all.

I created this topic to address the issue in more depth.
Please forward to the appropriate team to address the issue.

1 Like

Let’s follow up on that new thread. Thank you for bringing this back to attention.