Error parsing appveyor.yml, comments not ignored

James Skimming's Avatar

James Skimming

09 Dec, 2014 09:22 AM

We use the the appveyor.yml reference as our template and as such all our appveyor.yml files begin with:

# Notes:
#   - Minimal appveyor.yml file is an empty file. All sections are optional.
#   - Indent each level of configuration with 2 spaces. Do not use tabs!
#   - All section names are case-sensitive.
#   - Section names should be unique on each level.

Since Monday 9th December GMT/UTC (that's when our builds started executing again after the weekend) all our builds are immediately failing with the following error:

Error parsing appveyor.yml: Invalid setting or section: # Notes (Line: 1, Column: 1)

It looks like comments are no longer ignored.

  1. Support Staff 1 Posted by Feodor Fitsner on 09 Dec, 2014 02:54 PM

    Feodor Fitsner's Avatar

    Hi James,

    There is a new page where you can validate appveyor.yml:

    Could it be something else? I've put these comments above and it shows valid.

  2. 2 Posted by James Skimming on 09 Dec, 2014 03:01 PM

    James Skimming's Avatar

    Hi Feodor

    It passes that validation tool. All our projects are failing, and none of the yaml files have changed.

    Maybe it's an encoding issue, the files are UTF-8, and I most likely copied the original file from our first project to use AppVeyor to all out other projects, which would explain why all out projects are now failing (assuming it encoding).

    I'll commit the file as ANSII (there are no unicode characters) and see if it helps.

  3. Support Staff 3 Posted by Feodor Fitsner on 09 Dec, 2014 03:03 PM

    Feodor Fitsner's Avatar

    Yeah, give it a try. Also could you drop me some sample file to test (with sensitive data removed)?


  4. 4 Posted by James Skimming on 09 Dec, 2014 03:16 PM

    James Skimming's Avatar

    Here's the angular seed project I used on a separate issue, that shows the problem:

    I guess I copied the yaml file to that project too, I'm nothing if not consistent :-)

    I've just changed the the file to ANSI and the build is now queued (which previously it wasn't) so I guess that's fixed it.

  5. Support Staff 5 Posted by Feodor Fitsner on 09 Dec, 2014 03:20 PM

    Feodor Fitsner's Avatar

    Yeah, then it's UTF-8 issue. That's strange - I'll check it out.

  6. 6 Posted by James Skimming on 09 Dec, 2014 03:21 PM

    James Skimming's Avatar

    So we have a workaround, but something has changed in AppVeyor where it no longer likes the UTF-8 encoding, which I guess is BOM characters EF BB BF at the beginning of the file.

  7. Support Staff 7 Posted by Feodor Fitsner on 09 Dec, 2014 03:24 PM

    Feodor Fitsner's Avatar

    It's the same - it was just validation added to detect wrong/missing sections.

    Could you please send me a sample yaml file?

  8. 8 Posted by James Skimming on 09 Dec, 2014 03:43 PM

    James Skimming's Avatar

    See attached, i's the one from the angular seed project before I converted it to ANSI.

  9. Support Staff 9 Posted by Feodor Fitsner on 09 Dec, 2014 06:03 PM

    Feodor Fitsner's Avatar

    Indeed, it was preamble problem. Replacing the code converting from base64 to a string with StreamReader fixed the issue.

    Will deploy an update today.

  10. 10 Posted by James Skimming on 10 Dec, 2014 11:54 AM

    James Skimming's Avatar

    All working now, thanks for the fix.

  11. James Skimming closed this discussion on 10 Dec, 2014 11:54 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac