Path must be a string or Buffer when executing katalon task in Azure devops

I have a project in Azure devops server that targets an Xcode IOS app (I have a MacOS agent installed), I just configured the build and everything is working fine.
I also have a CI/CD pipeline in azure devops where I have an stage with a katalon task as shown in the next image.

The only problem I am struggling with is that when this task is executed the next error come in : path must be a string or Buffer
Here is the whole log

2019-12-10T18:39:29.1486880Z ##[section]Starting: Execute Katalon Studio project
2019-12-10T18:39:29.1491080Z ==============================================================================
2019-12-10T18:39:29.1491200Z Task : Execute Katalon Studio Tests
2019-12-10T18:39:29.1491240Z Description : Execute Katalon Studio project
2019-12-10T18:39:29.1491320Z Version : 0.1.5
2019-12-10T18:39:29.1491360Z Author : Katalon LLC
2019-12-10T18:39:29.1491390Z Help :
2019-12-10T18:39:29.1491430Z ==============================================================================
2019-12-10T18:39:29.7185400Z version: 7.1.1
2019-12-10T18:39:29.7189110Z location: “\Users\someuser.katalon\7.1.1”
2019-12-10T18:39:29.7193560Z execute: -projectPath=“/Users/someuser/Katalon Studio/someproject/someproject.prj” -retry=0 -testSuitePath=“Test Suites/CLITestCases” -executionProfile=“default” -deviceId=“4948a9f65ace374d1e2ad71a78a0b4486fbb15ca” -reportFolder=“/Users/someuser/Desktop/RepositorioAzure/Reportes/T/105/Release-24” -browserType=“iOS” -apiKey=“e9bccd98-6d13-450f-a3bd-68611a00fe43”
2019-12-10T18:39:29.7194050Z x11 display: null
2019-12-10T18:39:29.7194340Z xvfbConfiguration: null
2019-12-10T18:39:29.7194430Z dirPath: /Users/someuser/Desktop/RepositorioAzure/MacAgent/_work/r1/a
2019-12-10T18:39:29.7258190Z ksProjectPath: undefined
2019-12-10T18:39:29.7273820Z Katalon Folder: “\Users\someuser.katalon\7.1.1”
2019-12-10T18:39:29.7277050Z Katalon Executable File: undefined
2019-12-10T18:39:29.7368230Z ##[error]path must be a string or Buffer
2019-12-10T18:39:29.7408680Z TypeError: path must be a string or Buffer
2019-12-10T18:39:29.7408800Z at TypeError (native)
2019-12-10T18:39:29.7408920Z at Object.fs.chmodSync (fs.js:1168:18)
2019-12-10T18:39:29.7410010Z at /Users/someuser/Desktop/RepositorioAzure/MacAgent/_work/_tasks/katalonTask_4c045a76-788c-4c23-b965-ecc7ae4a5d40/0.1.5/build/agent/katalon-studio.js:100:12
2019-12-10T18:39:29.7410090Z at process._tickCallback (internal/process/next_tick.js:109:7)
2019-12-10T18:39:29.7410170Z at Module.runMain (module.js:606:11)
2019-12-10T18:39:29.7410640Z at run (bootstrap_node.js:390:7)
2019-12-10T18:39:29.7410690Z at startup (bootstrap_node.js:150:9)
2019-12-10T18:39:29.7410730Z at bootstrap_node.js:505:3
2019-12-10T18:39:29.7412290Z ##[section]Finishing: Execute Katalon Studio project

I also tried to set the path of katalon manually (in Use pre-installed Katalon Studio input) but the same error came in.

I never faced this problem when executing this task in a windows agent.

1 Like

Try

Katalon Folder: "\\Users\\someuser.katalon\\7.1.1"

or

Katalon Folder: "/Users/someuser.katalon/7.1.1"

I don’t know where in your config you’d need to change that, but solitary backslashes are rarely correct.

It seems not to work, In fact that is the path that appears when I specify to download katalon, so I do not know why it can not find the executable.

Callout to @devalex88 @hpulsford @Ibus @ThanhTo (re CI/CD)

i never used azure devops up to now,so only guess here.
the error seems to be trown by the job you set-up, so may not be directly a katalon issue.
kindly confirm, it that task is executed on an windows worker (or agent.whatever is named), all good?
and … if so, i supposed is failing on an linux executor (worker). in this case why the job is using a powershell stage?
please give more details on your setup and intended behaviour, up to now i just see some inconsistencies.

Hi @14041269!

Please remove -projectPath and -reportFolder in the command line. In Katalon Plugin, it will find projectPath for you.
In Azure DevOps, for each of your executable event, Azure will deploy any cloud machine to you. If you add -projectPath or -reportFolder, make sure you control your cloud machine.
Tips for your: Upload your project to Github and integration Azure DevOps to your project with Github, after Azure DevOps clone project from Github. Katalon Plugin will find your project.

Thanks!

2 Likes

Hi Anhtuan,
is there any video how to learn about Azure Configuration

1 Like