question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Service Fabric Application Deployment Task fails because of missing default value

See original GitHub issue

Environment

  • Server - VSTS
  • Agent - VS2017 Hosted

Issue Description

Service Fabric Application Deployment v.1.4.1 fails with this error (the full error is below):

##[error]Exception calling "Parse" with "1" argument(s): "String was not recognized as a valid Boolean."

Further analysis in debug mode points to line 36 in deploy.ps1: $configureDockerSettings = [System.Boolean]::Parse((Get-VstsInput -Name configureDockerSettings))

It seems that the default value isn’t set in my build definition, which I created yesterday with version 1.3.11. A workaround is to make a change to the Build Definition and save it, which adds these params to the build definition:

"configureDockerSettings": "false", "registryCredentials": "AzureResourceManagerEndpoint", "dockerRegistryEndpoint": "", "azureSubscriptionEndpoint": "", "registryUserName": "", "registryPassword": "", "passwordEncrypted": "true"

Error logs

2017-10-12T19:49:28.9401893Z ##[debug]Leaving D:\a_tasks\ServiceFabricDeploy_c6650aa0-185b-11e6-a47d-df93e7a34c64\1.4.1\deploy.ps1. 2017-10-12T19:49:28.9842309Z ##[debug]Caught exception from task script. 2017-10-12T19:49:28.9872083Z ##[debug]Error record: 2017-10-12T19:49:29.0392219Z ##[debug]D:\a_tasks\ServiceFabricDeploy_c6650aa0-185b-11e6-a47d-df93e7a34c64\1.4.1\deploy.ps1 : Exception calling “Parse” with “1” argument(s): “String was not recognized as a valid Boolean.” 2017-10-12T19:49:29.0402233Z ##[debug]At line:1 char:1 2017-10-12T19:49:29.0412228Z ##[debug]+ . 'd:\a_tasks\ServiceFabricDeploy_c6650aa0-185b-11e6-a47d-df93e7a34c … 2017-10-12T19:49:29.0422233Z ##[debug]+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2017-10-12T19:49:29.0432231Z ##[debug] + CategoryInfo : NotSpecified: (😃 [deploy.ps1], MethodInvocationException 2017-10-12T19:49:29.0442235Z ##[debug] + FullyQualifiedErrorId : FormatException,deploy.ps1 2017-10-12T19:49:29.0462233Z ##[debug] 2017-10-12T19:49:29.0902339Z ##[debug]Script stack trace: 2017-10-12T19:49:29.0942351Z ##[debug]at <ScriptBlock>, D:\a_tasks\ServiceFabricDeploy_c6650aa0-185b-11e6-a47d-df93e7a34c64\1.4.1\deploy.ps1: line 36 2017-10-12T19:49:29.0942351Z ##[debug]at <ScriptBlock>, <No file>: line 1 2017-10-12T19:49:29.0962367Z ##[debug]at <ScriptBlock>, <No file>: line 22 2017-10-12T19:49:29.0972368Z ##[debug]at <ScriptBlock>, <No file>: line 18 2017-10-12T19:49:29.0982378Z ##[debug]at <ScriptBlock>, <No file>: line 1 2017-10-12T19:49:29.0992386Z ##[debug]Exception: 2017-10-12T19:49:29.1032431Z ##[debug]System.Management.Automation.MethodInvocationException: Exception calling “Parse” with “1” argument(s): “String was not recognized as a valid Boolean.” —> System.FormatException: String was not recognized as a valid Boolean. 2017-10-12T19:49:29.1042402Z ##[debug] at System.Boolean.Parse(String value) 2017-10-12T19:49:29.1052400Z ##[debug] at CallSite.Target(Closure , CallSite , Type , Object ) 2017-10-12T19:49:29.1062404Z ##[debug] — End of inner exception stack trace — 2017-10-12T19:49:29.1072413Z ##[debug] at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception exception) 2017-10-12T19:49:29.1082409Z ##[debug] at System.Management.Automation.Interpreter.ActionCallInstruction2.Run(InterpretedFrame frame) 2017-10-12T19:49:29.1092412Z ##[debug] at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame) 2017-10-12T19:49:29.1102416Z ##[debug] at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame) 2017-10-12T19:49:29.1112425Z ##[debug] at System.Management.Automation.Interpreter.Interpreter.Run(InterpretedFrame frame) 2017-10-12T19:49:29.1122421Z ##[debug] at System.Management.Automation.Interpreter.LightLambda.RunVoid1[T0](T0 arg0) 2017-10-12T19:49:29.1132428Z ##[debug] at System.Management.Automation.PSScriptCmdlet.RunClause(Action1 clause, Object dollarUnderbar, Object inputToProcess) 2017-10-12T19:49:29.1142426Z ##[debug] at System.Management.Automation.PSScriptCmdlet.DoEndProcessing() 2017-10-12T19:49:29.1152438Z ##[debug] at System.Management.Automation.CommandProcessorBase.Complete() 2017-10-12T19:49:29.1372485Z ##[error]Exception calling “Parse” with “1” argument(s): “String was not recognized as a valid Boolean.”

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
bishal-pdMSFTcommented, Oct 13, 2017

No it has not been fixed yet. While we are in the progress, you can unblock yourself by using the workaround in the original post - Check and uncheck “Configure docker settings” check box under “Docker settings” group in release/build definition

3reactions
bishal-pdMSFTcommented, Oct 13, 2017

Thanks for reporting it. We are trying to hot-fix it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Service Fabric Application Deployment Task fails because of ...
Service Fabric Application Deployment v.1.4.1 fails with this error ... It seems that the default value isn't set in my build definition, ...
Read more >
VSTS Deploy Service Fabric Application Task - Stack Overflow
According to the warning message, you are running the build with Hosted Agent which has Service Fabric SDK 2.4.164 installed.
Read more >
Service Fabric application deployment v1 task - Microsoft Learn
This task deploys an Azure Service Fabric application to a cluster according to the settings defined in the publish profile.
Read more >
Service Fabric Worker Application does not get updated even ...
This error happens after successful deployment to the production Azure cluster because it does not get updated with the latest dlls.
Read more >
Deploy your ASP.NET Core app to Azure Service Fabric
Hosted as a guest executable. This is primarily used to run existing ASP.NET Core applications on Service Fabric with no code changes. ·...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found