ASharifzad136602 (Community Member) asked a question.

Hello, I'm having trouble with the Veracode Azure DevOps extension. I have a build pipeline and added the "Upload and scan: $(build.artifactstagingdirectory)" task. Where it tells me "Error Occurred While Obtaining Build Information"

File Upload-Scan Task Started

[command]java -jar D:\a\_tasks\Veracode_6292a058-d4f5-407b-b6c6-815df9ee59d6\2.7.0\VeracodeJavaAPI.jar -action UploadAndScan -appname <AppName>-createprofile true -filepath <path>\StagingFiles -version VeracodeConfiguration.15 -vid *** -vkey *** -autoscan true -useragent VeracodeVSTSExtension/2.7.0 (Node/v6.10.3)

[19.09.23 13:06:30]

[19.09.23 13:06:30] * Action "UploadAndScan" returned the following message:

[19.09.23 13:06:30] * The file cannot be analyzed.

[19.09.23 13:06:30]

[19.09.23 13:06:31]

[19.09.23 13:06:31] * Action "UploadAndScan" returned the following message:

[19.09.23 13:06:31] * Cannot prescan a build with no uploaded/valid files

[19.09.23 13:06:31]

[19.09.23 13:06:30]

[19.09.23 13:06:30] Application profile "PROFILENAME" (appid=594492) was located.

[19.09.23 13:06:30]

[19.09.23 13:06:30] Attempting to create a new build with name "VeracodeConfiguration.15".

[19.09.23 13:06:30]

[19.09.23 13:06:30] The build_id of the new build is "5025999".

[19.09.23 13:06:30]

[19.09.23 13:06:30] Uploading: <SolutionFilePath>

[19.09.23 13:06:30]

[19.09.23 13:06:30] Starting pre-scan verification for application<ApplicationName> build "VeracodeConfiguration.15".

[19.09.23 13:06:30] * Action "UploadAndScan" returned the following message:

[19.09.23 13:06:30] * The file cannot be analyzed.

[19.09.23 13:06:30]

[19.09.23 13:06:31]

[19.09.23 13:06:31] * Action "UploadAndScan" returned the following message:

[19.09.23 13:06:31] * Cannot prescan a build with no uploaded/valid files

[19.09.23 13:06:31]

 

[19.09.23 13:06:30] Application profile "ApplicationName" (appid=594492) was located.

[19.09.23 13:06:30]

[19.09.23 13:06:30] Attempting to create a new build with name "VeracodeConfiguration.15".

[19.09.23 13:06:30]

[19.09.23 13:06:30] The build_id of the new build is "5025999".

[19.09.23 13:06:30]

[19.09.23 13:06:30] Uploading: <SolutionPath>

[19.09.23 13:06:30]

[19.09.23 13:06:30] Starting pre-scan verification for application<ApplicationName> build "VeracodeConfiguration.15".

 

Start Obtaining Build Info

[command]java -jar D:\a\_tasks\Veracode_6292a058-d4f5-407b-b6c6-815df9ee59d6\2.7.0\VeracodeJavaAPI.jar -action getbuildinfo -appid 594492 -vid *** -vkey *** -useragent VeracodeVSTSExtension/2.7.0 (Node/v6.10.3)

<?xml version="1.0" encoding="UTF-8" standalone="no"?>

<buildinfo xmlns="https://analysiscenter.veracode.com/schema/4.0/buildinfo" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" account_id="58595" app_id="594492" build_id="5025999" buildinfo_version="1.4" xsi:schemaLocation="https://analysiscenter.veracode.com/schema/4.0/buildinfo https://analysiscenter.veracode.com/resource/4.0/buildinfo.xsd">

<build build_id="5025999" grace_period_expired="false" legacy_scan_engine="false" lifecycle_stage="Not Specified" platform="Not Specified" policy_compliance_status="Not Assessed" policy_name="Veracode Recommended Very High" policy_version="1" results_ready="false" rules_status="Not Assessed" scan_overdue="false" submitter="Mark Jordan" version="VeracodeConfiguration.15">

<analysis_unit analysis_type="Static" status="Incomplete"/>

</build>

</buildinfo>

 

Build ID:5025999End Obtaining Build Info

Start Obtaining Scan

Scan Status as At:1:07:32 PM

[command]java -jar D:\a\_tasks\Veracode_6292a058-d4f5-407b-b6c6-815df9ee59d6\2.7.0\VeracodeJavaAPI.jar -action getbuildinfo -appid 594492 -buildid 5025999 -vid *** -vkey *** -useragent VeracodeVSTSExtension/2.7.0 (Node/v6.10.3)

<?xml version="1.0" encoding="UTF-8" standalone="no"?>

<buildinfo xmlns="https://analysiscenter.veracode.com/schema/4.0/buildinfo" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" account_id="58595" app_id="594492" build_id="5025999" buildinfo_version="1.4" xsi:schemaLocation="https://analysiscenter.veracode.com/schema/4.0/buildinfo https://analysiscenter.veracode.com/resource/4.0/buildinfo.xsd">

<build build_id="5025999" grace_period_expired="false" legacy_scan_engine="false" lifecycle_stage="Not Specified" platform="Not Specified" policy_compliance_status="Not Assessed" policy_name="Veracode Recommended Very High" policy_version="1" results_ready="false" rules_status="Not Assessed" scan_overdue="false" submitter="Mark Jordan" version="VeracodeConfiguration.15">

<analysis_unit analysis_type="Static" status="Incomplete"/>

</build>

</buildinfo>

 

##errorBuild Failed : Scan Failed

Error Occurred While Obtaining Build Information

Veracode Upload and Scan task End

 


  • ASharifzad136602 (Community Member)

    I solved this issue. I had to figure out where the artifact staging directory was. There was a location somewhere else in the pipeline where the required files were stored. I'm not sure how to find this on other systems. Then I added "/bin" to that path and it worked. It looked something like:

    $(build.sourcesdirectory)/<SpecificProject>/bin

    Selected as Best
  • LGordon178543 (Community Member)

    We're also receiving this error. What is the cause of this?

    • ASharifzad136602 (Community Member)

      I solved this issue. I had to figure out where the artifact staging directory was. There was a location somewhere else in the pipeline where the required files were stored. I'm not sure how to find this on other systems. Then I added "/bin" to that path and it worked. It looked something like:

      $(build.sourcesdirectory)/<SpecificProject>/bin

      Selected as Best

Topics (1)

No articles found
Loading

Ask the Community

Get answers, share a use case, discuss your favorite features, or get input from the community.