I get an error on publishing in headless - plese help


Volt MX Version: 9.5.36
Operating System: macos 14.6.1
Database (if appropriate):
Server: Tomcat


Problem/Query:

I am trying with the reference page, but I get an error on publishing.
I have read the documentation, but I don’t understand how to configure the settings for publishing, and I don’t understand the “path” in the error message.
Is there a mistake in the configuration file?
I have rewritten the Foundry settings to *.

  • HeadlessBuild.properties
#Note: Please escape '\' with '\\' in all file paths#
#This file represents the Application level properties used by headless build.
project.name=Library

#mode 0-Build; 1-Publish; 2-Build & Publish; 3-Combine Web Application+Kony Server Archive; 4-Build & Combine Web Application+Kony Server Archive;
#mode-0: Application will be built for the selected build platforms
#mode-1: Foundry app will be published along with services and web archive.
#mode-2: Application will be built for selected build platforms Foundry app publish will be performed, Binary upload conditional on "web.binary.upload" flag
#mode-3: Combines web archive of app & kony server archive and generates combined war/ear file
#mode-4: Application will be built & Generated web archive will be combined with Kony server archive and final war/ear will be generated
mode=2

#build mode [release | debug]
build.mode=release

#Application details
appid=Library
#Please ensure that this is incremented while doing multiple Headless builds involving the modes 0 or 1 or 2
version=1.0.5
map_google_key=
default_locale=
#The android packagename can follow the pattern com.<orgname>.<appid>
android.packagename=com.orgname.Library
android.versioncode=1

ios.bundleversion=1.0

#Foundry credentials, applicable for on-premise/cloud Foundry
cloud.username=****
cloud.password=****

#Foundry claims token if not providing user credentials, user can pass the token for authentication.
fabric.token=

#Provide Volt MX Foundry specific details
voltmxfoundry.url=****

#These are required if your application is using services and needs Foundry integration.
environment.name=****
account.id =****
mf.appname =****
mf.app.version=****
upLoadBinary =true

#Specify the environment you want to publish Ex:qa,dev,stg
cloud.environment=****

#Specify the web binary extension to upload into cloud
#possible values war, zip. Note zip can only be published to runtime version 8.2 and above. 
web.binary.extension = zip
#web.binary.upload = true by default. Set to false to stop web binary upload to Foundry.
web.binary.upload = true
#Specify the platforms for which the headless build needs to run.
#Mobile Channel.
iphone=false
android=false
androidwearos=false
windowsphone81s=false
windowsphone10=false

spa.iphone=false
spa.android=false
spa.winphone=false

#Tablet Channel.
ipad=false
androidtablet=false

#Selecting Windows8.1 or Windows10 will also trigger builds for X86,X64,ARM architectures.
windows8.1=false
windows10=false

spa.ipad=false
spa.androidtablet=false
spa.windowstablet=false


#Desktop Channel.
desktop_kiosk=false
desktopweb=true

#Wearbles channel.
iphonewatch=false

#Universal Channel.
universal.iphone=false
universal.android=false

#App Extensions
iosappextension=false

#Provide iOS deployment target details in the case of iPhone or iPad.

#Ex: 8.0, 9.0, 10.0
mac.iosdeploymenttarget=
#Ex: 2.0, 3.0, 4.0
mac.watchosdeploymenttarget=
#Ex: 4.0, 5.0
mac.swiftversion=

#Provide following details to generate IPA file in the case of iPhone or iPad.
mac.ipaddress=
mac.username=
mac.password=



keychain.password=
development.team.id=
#Possible value  Ex:  method= "app-store","package","ad-hoc","enterprise","development","developer-id"
method=


#Possible values are true/false
genipaiphone=false
genipaipad=false


#iOS push certificate type. Possible values are none, development, production
pushcertificatetype=

#If not specified, by default final binaries will be copied to 'binaries' folder inside project
binaries.location=

#Specify to skip porting of project
skip.porting=

#Stub the print statements in custom modules during release build (Recommended setting for production release)
stub.kony.print=true

#Combine Web Application+Kony Server Archive. Applicable for mode = 3 or 4 #
#Full path of middleware archive (war/ear).If project has Kony session Manager, 
#provide with-cache archive, for Http session Manager, provide without-cache archive.
combinewar.middlewarearchive=
combinewar.context=
#combinewar.war,combinewar.ear are mutually exclusive(Only one of them should be true)
combinewar.war=false
combinewar.ear=false
#Provide full path of dependant libraries,Separate with semicolon(;) if there are multiple libraries
combinewar.dependencylibraries=


#Specify contexts for Foundry components
context.path.identity = 
context.path.workspace = 
context.path.accounts = 
context.path.console =

#To build binaries with protected mode enabled.
protectedmodeenabled.ios=false
protectedmodeenabled.android=false

#Siteminder login url if Foundry instance is protected by SiteMinder
login.siteminder.url=

#Android Signing Keys
keyAlias=
keyPassword=
keyStoreFilePath=
keyStorePassword=

#Test Automation Server URL
test.automation.server.url=

#Set the value to true to fetch automation scripts from local device storage
test.automation.storage.local=

#properties for doing Web Protected build.
#This feature only supports web platforms

#Set the value to true to enable Web obfuscation
protectedmodeenabled.web=false

#Provide Absolute path of securejs properties file
web.protection.properties=

#Provide Absolute path of web encryption directory
web.encryption.dirs=

#Provide Web Protection Configuration Options: BASIC,MODERATE
web.protection.preset=BASIC

#Provide Absolute path of custom protection blueprint json file
web.protection.custom.blueprint=

#Provide Absolute path of excludelist.txt file
web.protection.excludelist=

#used for CI App Factory
plugin.dir=build-plugins
javaloc=
androidHome=
proxy.host=
proxy.port=
proxy.username=
proxy.password=
proxy.bypass.list=
proxy.scheme=

#Configure path to Python installation. Applicable for Mac Monterey version >= 12.3.
PYTHON_HOME=
  • Error console
[2025-05-16T08:21:10.814] [INFO] ci - 
---❏ Upload web archive ---


[2025-05-16T08:21:10.815] [ERROR] ci - TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
    at new NodeError (node:internal/errors:387:5)
    at validateString (node:internal/validators:162:11)
    at Object.join (node:path:1172:7)
    at Object.ns.getJavaCmd (/bundles/com.kony.studio.viz.core.mac64/konywebstudio/tools/commandUtils.js:1:508)
    at /bundles/com.kony.studio.viz.core.mac64/konywebstudio/kbuild/serviceconfig/WebClientUploadTask.js:1:1027
    at new Promise (<anonymous>)
    at WebClientUploadTask.execute (/bundles/com.kony.studio.viz.core.mac64/konywebstudio/kbuild/serviceconfig/WebClientUploadTask.js:1:552)
    at /bundles/com.kony.studio.viz.core.mac64/konywebstudio/kbuild/serviceconfig/servicePackager.js:1:1466
    at new Promise (<anonymous>)
    at Object.ns.publishAssets (/bundles/com.kony.studio.viz.core.mac64/konywebstudio/kbuild/serviceconfig/servicePackager.js:1:1417)
    at /bundles/com.kony.studio.viz.core.mac64/konywebstudio/kbuild/BuildManager.js:1:6170
    at new Promise (<anonymous>)
    at /bundles/com.kony.studio.viz.core.mac64/konywebstudio/kbuild/BuildManager.js:1:5888
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

[2025-05-16T08:21:10.816] [ERROR] ci - Build Failed!
- TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
    at new NodeError (node:internal/errors:387:5)
    at validateString (node:internal/validators:162:11)
    at Object.join (node:path:1172:7)
    at Object.ns.getJavaCmd (/bundles/com.kony.studio.viz.core.mac64/konywebstudio/tools/commandUtils.js:1:508)
    at /bundles/com.kony.studio.viz.core.mac64/konywebstudio/kbuild/serviceconfig/WebClientUploadTask.js:1:1027
    at new Promise (<anonymous>)
    at WebClientUploadTask.execute (/bundles/com.kony.studio.viz.core.mac64/konywebstudio/kbuild/serviceconfig/WebClientUploadTask.js:1:552)
    at /bundles/com.kony.studio.viz.core.mac64/konywebstudio/kbuild/serviceconfig/servicePackager.js:1:1466
    at new Promise (<anonymous>)
    at Object.ns.publishAssets (/bundles/com.kony.studio.viz.core.mac64/konywebstudio/kbuild/serviceconfig/servicePackager.js:1:1417)
    at /bundles/com.kony.studio.viz.core.mac64/konywebstudio/kbuild/BuildManager.js:1:6170
    at new Promise (<anonymous>)
    at /bundles/com.kony.studio.viz.core.mac64/konywebstudio/kbuild/BuildManager.js:1:5888
    at processTicksAndRejections (node:internal/process/task_queues:96:5) {
  code: 'ERR_INVALID_ARG_TYPE'
}

Hello Sugibo,

Welcome to HCLSoftware Digital Solutions Community! We’re so glad to have you here.

Please ensure that the JAVA_HOME environment variable is set on your system. Additionally, please refer to the latest Continuous Integration Build documentation.
Could you please follow the Continuous integration build document

Regards,
Naveen

2 Likes

Hello naveen,

I tried to follow your advice but it didn’t work.

However, if you rewrite build.js as follows, it will work.

env: {
  "antHome": process.env.ANT_HOME,
  "javaHome": process.env.JAVA_HOME,
  "JAVA_HOME": process.env.JAVA_HOME, // add this line.
},

This topic was automatically closed 8 hours after the last reply. New replies are no longer allowed.