Windows 8 development–Certification failed due to bytecode generation

I was working on a WinJS application and added a 3rd party JavaScript library. However every time I tried to run the WACK certification tool I kept coming across this issue.

Performance test – FAILED Bytecode generation

  • Error Found: The bytecode generation test detected the following errors:

    • File … has JavaScript syntax or other problems.
  • Impact if not fixed: As a performance optimization to accelerate JavaScript execution time, JavaScript files ending in the ".js" extension generate bytecode when the app is deployed. This optimization significantly improves start-up and ongoing execution times for JavaScript.

  • How to fix: You may need consider one or more of these steps to fix the issue:
    – Ensure that event logging is enabled
    – All JavaScript files are syntactically valid; otherwise exclude the respective files from the package
    – Please note that you should uninstall all previous versions of the app before deploying
    Otherwise exclude the respective files from the package.

 

How to solve it

The issue I had was due to the encoding on the JavaScript file. This can be easily fixed by changing the encoding to Unicode UTF-8.

Do this by opening the JavaScript file, then select File –> Advanced Save Options. In the dialog, select Unicode (UTF-8 with signature) – Codepage 65001

image

By David Burela

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s