You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This correctly throws an error of "null: The term 'null' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.".
The error is in a function Get-ServerCertThumbprints (line 70) which is called twice from the function Get-ServiceFabricEncryptedText (line 3). The first time (line 34) is in a try-catch block but the second is within the catch block itself (line 39).
Since this second invocation at line 39 does not catch the error, the task aborts.
The line should be:
$serverCertThumbprints = $null;
Error logs
2021-02-25T13:03:58.3821772Z ##[debug]Caught exception from task script.
2021-02-25T13:03:58.3849431Z ##[debug]Error record:
2021-02-25T13:03:58.4456437Z ##[debug]null : The term 'null' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
2021-02-25T13:03:58.4467187Z ##[debug]At D:\a\_tasks\ServiceFabricDeploy_19c02b15-d377-40e0-9efa-3168506e0933\1.9.3\ps_modules\ServiceFabricHelpers\Get-ServiceFabricEncryptedText.ps1:82 char:30
2021-02-25T13:03:58.4477854Z ##[debug]+ $serverCertThumbprints = null;
2021-02-25T13:03:58.4488319Z ##[debug]+ ~~~~
2021-02-25T13:03:58.4499305Z ##[debug] + CategoryInfo : ObjectNotFound: (null:String) [], CommandNotFoundException
2021-02-25T13:03:58.4509713Z ##[debug] + FullyQualifiedErrorId : CommandNotFoundException
2021-02-25T13:03:58.4520163Z ##[debug]
2021-02-25T13:03:58.4535625Z ##[debug]Script stack trace:
2021-02-25T13:03:58.4568628Z ##[debug]at Get-ServerCertThumbprints, D:\a\_tasks\ServiceFabricDeploy_19c02b15-d377-40e0-9efa-3168506e0933\1.9.3\ps_modules\ServiceFabricHelpers\Get-ServiceFabricEncryptedText.ps1: line 82
2021-02-25T13:03:58.4579079Z ##[debug]at Get-ServiceFabricEncryptedText, D:\a\_tasks\ServiceFabricDeploy_19c02b15-d377-40e0-9efa-3168506e0933\1.9.3\ps_modules\ServiceFabricHelpers\Get-ServiceFabricEncryptedText.ps1: line 39
The text was updated successfully, but these errors were encountered:
Required Information
Question, Bug, or Feature?
Type: Bug
Enter Task Name: ServiceFabricDeploy, ServiceFabricComposeDeploy
list here (V# not needed):
https://github.com/Microsoft/azure-pipelines-tasks/tree/master/Tasks/ServiceFabricDeployV1
https://github.com/microsoft/azure-pipelines-tasks/tree/master/Tasks/ServiceFabricComposeDeployV0
Environment
Server - Azure Pipelines or TFS on-premises?
Azure Pipelines
Agent - Hosted or Private:
Hosted
Issue Description
Unable to deploy to Service Fabric if the Service Connection uses Common Name for the Server Certificate Lookup due to a PowerShell error in
https://github.com/Microsoft/azure-pipelines-tasks/Tasks/Common/ServiceFabricHelpers/Get-ServiceFabricEncryptedText.ps1.
There is a typo in this module at line 82.
the line is:
This correctly throws an error of "null: The term 'null' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.".
The error is in a function Get-ServerCertThumbprints (line 70) which is called twice from the function Get-ServiceFabricEncryptedText (line 3). The first time (line 34) is in a try-catch block but the second is within the catch block itself (line 39).
Since this second invocation at line 39 does not catch the error, the task aborts.
The line should be:
Error logs
The text was updated successfully, but these errors were encountered: