JOliver168889 (Community Member) asked a question.

Failure attempting to push zip file for static scan

I'm trying to integrate our Azure DevOps process with Veracode but I'm getting a TypeError stating "Cannot read property 'OldBuildId' of null. I do not see where this property is set or can be made available. I'm including the last handful of response information from my attempt. I've masked the vuser and vpassword to protect our account security.

 

[command]"C:\Program Files\Java\zulu-8-azure-jdk_8.40.0.25-8.0.222-win_x64\bin\java.exe" -jar D:\a\_tasks\Veracode_6292a058-d4f5-407b-b6c6-815df9ee59d6\2.9.0\VeracodeJavaAPI.jar -action getapplist -vuser XXXXXX -vpassword XXXXX -useragent "VeracodeVSTSExtension/2.9.0 (Node/v6.10.3)"

[19.12.24 18:42:37] 

[19.12.24 18:42:37] Server returned HTTP response code: 401 for URL: https://analysiscenter.veracode.com/api/5.0/getapplist.do

[19.12.24 18:42:37] Please make sure that all of the following are true:

##debugResponse Code : 2

[19.12.24 18:42:37] 1. The login credentials are valid.

[19.12.24 18:42:37] 2. The account is an API account with sufficient privilege.

[19.12.24 18:42:37] 3. The account is not locked.

[19.12.24 18:42:37] 4. This machine's internet-facing IP address is not restricted.

##debugClass Name : VeracodeBridge , Method Name : passorfailtask

##debugtask result: Failed

##errorBuild Failed : Error occurred while accessing the Veracode Platform.

##debugProcessed: ##vso[task.issue type=error;]Build Failed : Error occurred while accessing the Veracode Platform.

##debugProcessed: ##vso[task.complete result=Failed;]Build Failed : Error occurred while accessing the Veracode Platform.

##debugError : Error: Exiting from Veracode Scan Task

Error Occurred While Obtaining Application Information

Verify that:

   1.The login credentials are correct

   2.The account is an API account with the necessary permissions.

   3.The account is not locked.

   4.The IP address of the Internet-facing machine is not restricted.

   5.The VSO agent has the necessary permissions.

   6.The port that the VSO agent uses is not restricted.

##debugClass Name : VeracodeBridge , Method Name : passorfailtask

##debugtask result: Failed

##errorBuild Failed : Error occurred while accessing the Veracode Platform.

##debugProcessed: ##vso[task.issue type=error;]Build Failed : Error occurred while accessing the Veracode Platform.

##debugProcessed: ##vso[task.complete result=Failed;]Build Failed : Error occurred while accessing the Veracode Platform.

##debugPromise Rejected While Obtaining Prerequisites

(node:3064) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Cannot read property 'OldBuildId' of null

##sectionFinishing: Vericode - Upload and scan: $(build.artifactstagingdirectory)

 


VCode likes this.
  • JOliver168889 (Community Member)

    I have gotten this to work by creating and integrating with the API credentials. It's likely based on the HTTP401 error that my personal account was not setup to allow for API access. I will speak with our company Admin to verify this, but in either case, I've successfully integrated our Azure DevOps build pipeline with the Veracode service. Thanks.

    Selected as Best
  • JOliver168889 (Community Member)

    I have gotten this to work by creating and integrating with the API credentials. It's likely based on the HTTP401 error that my personal account was not setup to allow for API access. I will speak with our company Admin to verify this, but in either case, I've successfully integrated our Azure DevOps build pipeline with the Veracode service. Thanks.

    Selected as Best
  • MSuvarnam952171 (Community Member)

    am getting same issue. can anyone give me advise on this to fix. thanks in advance.

    12:37:54 [20.12.30 01:07:54] Server returned HTTP response code: 401 for URL: https://analysiscenter.veracode.com/api/5.0/getapplist.do

    12:37:54 [20.12.30 01:07:54] Please make sure that all of the following are true:

    12:37:54 [20.12.30 01:07:54] 1. The login credentials are valid.

    12:37:54 [20.12.30 01:07:54] 2. The account is an API account with sufficient privilege.

    12:37:54 [20.12.30 01:07:54] 3. The account is not locked.

    12:37:54 [20.12.30 01:07:54] 4. This machine's internet-facing IP address is not restricted.

    12:37:54

     

     

    12:37:52 D:\Jenkins\workspace\ExplicitTool-Veracode>echo D:\Jenkins\workspace\ExplicitTool-Veracode

    12:37:52 D:\Jenkins\workspace\ExplicitTool-Veracode

    12:37:52

    12:37:52 D:\Jenkins\workspace\ExplicitTool-Veracode>exit 0

    12:37:53 ------------------------------------------------------------------------

    12:37:53 Upload and Scan with Veracode

    12:37:53 ------------------------------------------------------------------------

    12:37:54 [20.12.30 01:07:54]

    12:37:54 [20.12.30 01:07:54] Server returned HTTP response code: 401 for URL: https://analysiscenter.veracode.com/api/5.0/getapplist.do

    12:37:54 [20.12.30 01:07:54] Please make sure that all of the following are true:

    12:37:54 [20.12.30 01:07:54] 1. The login credentials are valid.

    12:37:54 [20.12.30 01:07:54] 2. The account is an API account with sufficient privilege.

    12:37:54 [20.12.30 01:07:54] 3. The account is not locked.

    12:37:54 [20.12.30 01:07:54] 4. This machine's internet-facing IP address is not restricted.

    12:37:54

    12:37:54

    12:37:54 Error- Returned code from wrapper:2

    12:37:54

    12:37:54 Build step 'Upload and Scan with Veracode' marked build as failure

     

    Expand Post
  • MSuvarnam952171 (Community Member)

    After updating API credentials in jenkins job, it is working.

Topics (2)

No articles found
Loading

Ask the Community

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