We have been deploying a project for a couple of years. It runs through a variable substitution for web.config and it has been fine all that time.
This month though, we’ve been hitting this error.
System.Xml.XmlException: Data at the root level is invalid. Line 1, position 1.
Looking at the logs, this is because it is trying to convert jshint.config in the assets of a generally available JS library (DataTables). Nothing appears to have changed in the packaging process and this file has been available for years.
It’s not entirely clear why this has suddenly started failing when it was OK before. A tentacle upgrade was performed before this release went live. A second tentacle upgrade has since been performed and it’s still failing.
I note that this was a problem with Octopus 5 years ago with Octopus on-site (at the time people were asking for the ability to exclude files from variable substitution). Could be a red herring:
Thank you for contacting Octopus Support. I’m sorry you are running into this issue.
With your permission, I would be happy to log into your instance and have a look. Otherwise, if you would rather send me a copy of the raw task log and a sample of your jshint.config file, you can do that via Octopus.com -> Sign-In -> Support tab? Let me know once you do that and I’ll have a look.
I am going to try to reproduce this issue in a test environment. This sounds like a bug, but we want to be sure before getting our engineering team involved.
For now, I’ve got around it by forcing JSHint off the build (we don’t need it at that stage in the pipeline as it belongs to a JS library). So you may need a copy of the JSHint file anyway. Drop me a message if you want to discuss anything further.