Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tokenization Task - Exception does not stop deploy #62

Open
JRRuzinok opened this issue Oct 28, 2016 · 3 comments
Open

Tokenization Task - Exception does not stop deploy #62

JRRuzinok opened this issue Oct 28, 2016 · 3 comments

Comments

@JRRuzinok
Copy link

When malformed JSON is in the configuration file and a parsing exception is thrown the deploy pipeline continues with the next step even if the Continue on error check box is unchecked.

Here is the stack trace for an exception when the last element of the ConfigChanges array has a trailing comma:
Error parsing configuration file. Exception message:
System.ArgumentException: Invalid array passed in, extra trailing ','. (1215):

{
"QC": {
"CustomVariables": {
},
"ConfigChanges": [
( most lines left out)
{
"KeyName": "/configuration/appSettings/add[@key='SpecialKeyName']",
"Attribute": "value",
"Value": "SpecialValueEntry"
},
]
}
}

at System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializeList(Int32 depth)
at System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializeInternal(Int32 depth)
at System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializeDictionary(Int32 depth)
at System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializeInternal(Int32 depth)
at System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializeDictionary(Int32 depth)
at System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializeInternal(Int32 depth)
at System.Web.Script.Serialization.JavaScriptObjectDeserializer.BasicDeserialize(String input, Int32 depthLimit, JavaScriptSerializer serializer)
at System.Web.Script.Serialization.JavaScriptSerializer.Deserialize(JavaScriptSerializer serializer, String input, Type type, Int32 depthLimit)
at Microsoft.PowerShell.Commands.JsonObject.ConvertFromJson(String input, ErrorRecord& error)
at Microsoft.PowerShell.Commands.ConvertFromJsonCommand.ProcessRecord()
at System.Management.Automation.CommandProcessor.ProcessRecord()

[debug]Performing the operation "Copy File" on target "Item: D:\Build_work\9da930050[Build path]\pds\outputs_PublishedWebsites[WebSiteName]\Web.config Destination: D:\Build_work\9da930050[Build path]\pds\outputs_PublishedWebsites[WebSiteName]\Web.config.tmp".

Finishing task: Tokenizer
Starting task: Copy files $(System.DefaultWorkingDirectory)/[Build path]\pds\outputs_PublishedWebsites[WebSiteName]
Executing the powershell script: d:\Build\tasks\WindowsMachineFileCopy\1.0.18\WindowsMachineFileCopy.ps1

I"ve got the developer fixing the json file but the deploy process should have been reported as failed vice succeeded.

Thanks

@harshil93
Copy link
Member

Thanks for reporting. I will see this one.

@mitchellm44
Copy link

In our environment, We have a good number of 2008 R2 servers which have a default Powershell of Version 2.0 - This post
http://chrisoldwood.blogspot.com/2011/05/powershell-throwing-exceptions-exit.html
has a recent comment (2016) that pointed out a known powershell issue in detecting errors if you are on version 2 of powershell.
the Support link
https://support.microsoft.com/en-us/kb/2552055

I have reached out to the TFS admin to find out what version of powershell is on the server - after hitting this same issue.

@mitchellm44
Copy link

We did have 2 2008 R2 servers that were in the mix behind our TFS VIP. We got them removed - but the Tokenizer still fails and it still runs past the tokenizer with an error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants