Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Adobe AIR Development

Reply
Highlighted
New Developer
Posts: 5
Registered: ‎01-09-2011
My Device: PlayBook
My Carrier: -

[Solved] Content is not allowed in prolog

Hi,

 

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:

 

:set nobomb
:wq

 

which re-saves the file without the BOM. Hope this helps someone.

 

Cheers,

Dave 

BlackBerry Development Advisor
Posts: 15,753
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: [Solved] Content is not allowed in prolog

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.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
New Developer
Posts: 5
Registered: ‎01-09-2011
My Device: PlayBook
My Carrier: -

Re: [Solved] Content is not allowed in prolog

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).

 

Cheers,

Dave