Errors packaging as Chrome app

I have an app which runs fine in the Chrome browser, but not packaged as a Chrome app. The background script creates a window and loads index.html into it, but the window is blank, because of errors:

window.localStorage is not available in packaged apps. Use instead.(anonymous function) @ extensions::platformApp:17
enyo.js:210 'webkitRequestAnimationFrame' is vendor-specific. Please use the standard 'requestAnimationFrame' instead.
enyo.js:210 'webkitCancelRequestAnimationFrame' is vendor-specific. Please use the standard 'cancelAnimationFrame' instead.
app.js:10 Uncaught No formats available for calendar gregorian in locale en-US
launch.js:4 Uncaught TypeError: App is not a function
My app does not use localStorage; I presume that's something in Enyo. The two warnings appear in every browser and are not important.

The calendar error suggests that enyo-ilib has trouble in a Chrome app container.

"App is not a function" suggests that the calendar error prevented the rest of app.js from loading.

Any suggestion for getting enyo-ilib to work in a Chrome app container?


  • The solution was to switch to the version of ilib with all resources statically compiled in: ilib-standard.js (or ilib-core.js or ilib-full.js). App-specific string resources must be converted from JSON to JavaScript: = {
        "Earlier this month": "In diesem Monat",
    and these JS files must be included in package.js after ilib-standard.js, but before glue.js.

    I also deleted all the enyoLoader code from glue.js.

    Note that the top 20 most used locales on the internet are compiled in, and other locales are unavailable. (This increased the size of my app by perhaps 7%.) There are tools to build a custom set of locales.
  • Chrome web apps have a lot of extra security "features" to them. It is just something that needs to be planed for/lived with.

    And then there is the added "feature" of having to debug them as packaged vs. loaded from file.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!