01-09-2012 07:05 AM
When trying to build a .bar with an Air native extension (ANE) file, I was getting the following error:
[Fatal Error] :1:1: Content is not allowed in prolog.
Error: Problem reading <ANE file path>: Content is not allowed in prolog.
where <ANE file path> is the relative path to my .ane file.
Turns out, the bar compiler (on OS X anyway) doesn't support an extensions.xml file that contains a Unicode byte order mark. In my case my xml file contained 3 bytes at the beginning marking it as a UTF-8 encoded file.
To remove the BOM, I opened the file in vim and:
which re-saves the file without the BOM. Hope this helps someone.
01-11-2012 09:24 AM
Thank you for reporting this. I have logged this in Issue Tracker and sent it to our development team.
You can track the status of this issue in Issue Tracker here: https://www.blackberry.com/jira/browse/TABLET-416
If you encounter any future issues like this, I recommend logging them in Issue Tracker.
01-11-2012 07:07 PM
Thanks Mark, will do.
I posted mainly so that there would be a search result for the next developer to stumble across this obscure issue .. I guess I didn't think of it as a bug in your tool so much as a bug in my process that allowed a BOM to get into the XML file (as many tools don't support them).