Troubleshooting Fortify on Demand tasks
Task fails with error "SyntaxError: Use of const in strict mode"
Problem: The task fails with the following error:
const tl = require('vsts-task-lib/task');
^^^^^
SyntaxError: Use of const in strict mode
Cause: The version of node.exe in the VSO agent folder is earlier than 5.0. To check the version of node.exe installed for the agent, search for "node.exe" in the VSO agent folder, then run [path to node.exe]\node -v.
Solution: Manually update the node in the VSO agent folder to version 5.0 or later.
Static Assessment task fails with error "The process 'C:\hostedtoolcache\windows\scancentral\21.1.2\x64\bin\scancentral.bat' failed with exit code 1"
Issue: The Static Assessment task fails with the following error: The process 'C:\hostedtoolcache\windows\scancentral\21.1.2\x64\bin\scancentral.bat' failed with exit code 1. The ScanCentral log contains the following error: java.io.IOException: Cannot run program "msbuild.exe": CreateProcess error=2, The system cannot find the file specified.
Cause: The MSBuild executable was not added to the PATH environment variable.
Solution: Set the environment variable by running the Batch Script task. For more information, see Adding a Static Assessment Task.