HodorNV / ALOps

ALOps
59 stars 24 forks source link

ALOpsAppSign Unknown error (0x80072efd). #388

Closed Arthurvdv closed 3 years ago

Arthurvdv commented 3 years ago

Describe the bug Today sometimes the ALOpsAppSign-step throwns an error

the used yaml Sniplet from template:

parameters:
  pfx_path: ''
  pfx_password: ''
  timestamp_uri: 'http://timestamp.digicert.com'

- task: ALOpsAppSign@1
  displayName: 'Sign Extension'
  condition: and(succeeded(), eq('${{ parameters.publishartifact }}', 'true'))
  inputs:
    pfx_path: '${{ parameters.pfx_path }}'
    timestamp_uri: '${{ parameters.timestamp_uri }}'
    pfx_password: '${{ parameters.pfx_password }}'

the output

2021-06-09T08:55:54.5876198Z ##[section]Starting: Sign Extension
2021-06-09T08:55:54.6249059Z ==============================================================================
2021-06-09T08:55:54.6249399Z Task         : ALOps App Sign
2021-06-09T08:55:54.6249684Z Description  : CodeSign an AL Extension for Business Central
2021-06-09T08:55:54.6249952Z Version      : 1.443.2509
2021-06-09T08:55:54.6250174Z Author       : Hodor
2021-06-09T08:55:54.6250455Z Help         : Codesign Business Central extension with .pfx.
2021-06-09T08:55:54.6250797Z ==============================================================================
2021-06-09T08:55:56.0339270Z *** Validate configuration
2021-06-09T08:55:56.3230151Z *** Task Inputs:
2021-06-09T08:55:56.3271842Z 
2021-06-09T08:55:56.3337295Z name                                                                                                              value
2021-06-09T08:55:56.3338567Z ----                                                                                                              -----
2021-06-09T08:55:56.3339357Z usedocker                                                                                                         False
2021-06-09T08:55:56.3339981Z fixed_tag                                                                                                              
2021-06-09T08:55:56.3340889Z artifact_path                                                                                                          
2021-06-09T08:55:56.3341711Z nav_artifact_app_filter                                                                                           *.app
2021-06-09T08:55:56.3367471Z pfx_path                ...2029-12-31T23:00:00Z&sv=2020-02-10&sr=b&sig=BJ4BQdqNFQLLBEa0uWRxnR8cTX%2Faqk1eAF56zPgS6P4%3D
2021-06-09T08:55:56.3368281Z timestamp_uri                                                                             http://timestamp.digicert.com
2021-06-09T08:55:56.3368964Z publish_artifact                                                                                                   True
2021-06-09T08:55:56.3370290Z pfx_password                                                                           ***
2021-06-09T08:55:56.3370601Z 
2021-06-09T08:55:56.3385766Z 
2021-06-09T08:55:56.3392115Z 
2021-06-09T08:55:56.3525541Z *** For documentation, please visit   : https://www.alops.be/documentation
2021-06-09T08:55:56.3528591Z 
2021-06-09T08:55:56.6866522Z *** ALOps License:
2021-06-09T08:55:56.6869010Z   * Licensed To: Van Roey (Collection License)
2021-06-09T08:55:56.7017729Z 
2021-06-09T08:55:56.7274092Z *** Importing required PS-Functions
2021-06-09T08:55:57.0129634Z *** Dynamic resolve App file.
2021-06-09T08:55:57.0137230Z *** Scanning [System.DefaultWorkingDirectory].
2021-06-09T08:55:57.0198246Z *** Scanning [System.ArtifactsDirectory].
2021-06-09T08:55:57.0220604Z *** Scanning [Pipeline.Workspace].
2021-06-09T08:55:57.0287832Z *** Multiple App files found with filter [*.app].
2021-06-09T08:55:57.0341040Z   * D:\azure-vsts-agent-build\_work\1\a\VanRoey.be_Example App_1.0.202123.10974_sandbox_18.1_w1.app
2021-06-09T08:55:57.0363031Z *** Resolved App File: [D:\azure-vsts-agent-build\_work\1\a\VanRoey.be_Example App_1.0.202123.10974_sandbox_18.1_w1.app].
2021-06-09T08:55:57.0732578Z *** NavSip registration OK
2021-06-09T08:55:57.2302547Z *** App File: D:\azure-vsts-agent-build\_work\1\a\VanRoey.be_Example App_1.0.202123.10974_sandbox_18.1_w1.app
2021-06-09T08:55:57.2308734Z *** Setup Pfx File
2021-06-09T08:55:57.2358367Z *** Create TempFile
2021-06-09T08:55:57.2565459Z *** Download file
2021-06-09T08:55:57.5374395Z *** PFX File: C:\Windows\TEMP\tmp177D.tmp
2021-06-09T08:55:57.5379669Z *** Timestamp Service: http://timestamp.digicert.com
2021-06-09T08:55:57.5393667Z *** Check for Powershell Authenticode CmdLets
2021-06-09T08:55:57.5398542Z *** Authenticode CmdLets exist, using Powershell
2021-06-09T08:55:57.5425453Z *** Sign App file with Pfx
2021-06-09T08:55:57.8197579Z *** Signing App with Powershell: D:\azure-vsts-agent-build\_work\1\a\VanRoey.be_Example App_1.0.202123.10974_sandbox_18.1_w1.app
2021-06-09T08:56:18.8998111Z 
2021-06-09T08:56:18.9000666Z 
2021-06-09T08:56:18.9003186Z SignerCertificate      : 
2021-06-09T08:56:18.9003946Z TimeStamperCertificate : 
2021-06-09T08:56:18.9004808Z Status                 : UnknownError
2021-06-09T08:56:18.9005325Z StatusMessage          : Unknown error (0x80072efd)
2021-06-09T08:56:18.9006101Z Path                   : D:\azure-vsts-agent-build\_work\1\a\VanRoey.be_Example App_1.0.202123.10974_sandbox_18.1_w1.ap
2021-06-09T08:56:18.9006528Z                          p
2021-06-09T08:56:18.9006823Z SignatureType          : None
2021-06-09T08:56:18.9007149Z IsOSBinary             : False
2021-06-09T08:56:18.9007297Z 
2021-06-09T08:56:18.9007397Z 
2021-06-09T08:56:18.9007490Z 
2021-06-09T08:56:18.9030713Z ##[error]Signature status: UnknownError. Unknown error (0x80072efd).
2021-06-09T08:56:18.9038636Z *** Uploading Signed APP as Build-Artifact
2021-06-09T08:56:18.9411637Z *** Sign App Completed.
2021-06-09T08:56:18.9412025Z *** Cleanup VSTS Environment: True
2021-06-09T08:56:20.9980807Z ##[section]Async Command Start: Upload Artifact
2021-06-09T08:56:20.9981074Z Uploading 1 files
2021-06-09T08:56:20.9981258Z File upload succeed.
2021-06-09T08:56:20.9981689Z Upload 'D:\azure-vsts-agent-build\_work\1\a\VanRoey.be_Example App_1.0.202123.10974_sandbox_18.1_w1.app' to file container: '#/21684028/Pipeline Test'
2021-06-09T08:56:22.1167460Z Associated artifact 3379 with build 10974
2021-06-09T08:56:22.1167777Z ##[section]Async Command End: Upload Artifact
2021-06-09T08:56:22.1169515Z ##[section]Finishing: Sign Extension

Expected behavior To get a more detailed error message why the signing has failed. It's difficult without more information to understand why the signing has failed.

waldo1001 commented 3 years ago

I see you're providing "timestamp_uri: 'http://timestamp.digicert.com'". You don't have to provide a uri, we always set up a default that acts most stable for us.

So, can you remove that value, and see if that improves the situation?

Arthurvdv commented 3 years ago

Thanks, I did not know that. (I thought that this setting was mandatory and never thought of it to leave it empty and see if it works :-D.

I've changed this in our pipelines and for now will close this issue. If the problem reoccurs, I'll reopen the issue.

waldo1001 commented 3 years ago

Well, you know, we try to make is as easy as at all possible for people ;-)