Hi,
We recently updated our hosted Octopus Deploy server from version 2020.3.2 to version 2020.4.6 and noticed a new problem started to occur with our deploys:
Deploying package: C:\Octopus\Files\bzp@S7.146.11-tags-release-bzp-v7.146.11@D68CEDBBD24EFD45ABDE349190ECE8F4.zip
October 19th 2020 09:47:07Info
No matching appSetting, applicationSetting, nor connectionString names were found in: C:\Octopus\Applications\stagingtudor2\Dev\bzp\7.146.11-tags-release-bzp-v7.146.11_2\AppCues.config
October 19th 2020 09:47:07Error
Exception while replacing configuration-variables in: C:\Octopus\Applications\stagingtudor2\Dev\bzp\7.146.11-tags-release-bzp-v7.146.11_2\environment.config
October 19th 2020 09:47:07Error
System.Xml.XmlException: Data at the root level is invalid. Line 1, position 1.
October 19th 2020 09:47:07Error
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
October 19th 2020 09:47:07Error
at System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace()
October 19th 2020 09:47:07Error
at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
October 19th 2020 09:47:07Error
at System.Xml.Linq.XDocument.Load(XmlReader reader, LoadOptions options)
October 19th 2020 09:47:07Error
at Calamari.Common.Features.ConfigurationVariables.ConfigurationVariablesReplacer.ReadXmlDocument(String configurationFilePath)
October 19th 2020 09:47:07Error
at Calamari.Common.Features.ConfigurationVariables.ConfigurationVariablesReplacer.ModifyConfigurationFile(String configurationFilePath, IVariables variables)
October 19th 2020 09:47:07Error
at Calamari.Common.Features.Behaviours.ConfigurationVariablesBehaviour.Execute(RunningDeployment context)
October 19th 2020 09:47:07Error
at Calamari.Deployment.Conventions.ConfigurationVariablesConvention.Install(RunningDeployment deployment)
October 19th 2020 09:47:07Error
at Calamari.Deployment.ConventionProcessor.RunInstallConventions()
October 19th 2020 09:47:07Error
at Calamari.Deployment.ConventionProcessor.RunConventions()
October 19th 2020 09:47:07Error
Running rollback conventions…
This error appears for all of our IIS deploys after update to the new version.
In order to work around this issue we’ve temporarily added the following project variable:
Octopus.Action.Package.IgnoreVariableReplacementErrors true
Investigating the issue further seems to point to a file called environment.config in our project. This file is a JSON formatted file and is the only JSON formatted config file in our project. The error suggests that Octopus Deploy is expecting an XML formatted file and when it can’t find it it errors out.
This did not happen before updating to 2020.4.6 and the JSON formatted file has been in our project for a very long time.
Please help us find a solution to this issue.
Regards,
Karl Brodén