I'm trying to install a packaged application in Firefox OS simulator.
The installation succeeds only partially, since a link for the app is created, but without the proper icon. When I try to execute it, asks to download the app, which fails with a simple "download failed", and the application doesn't start.
I found the cause trigger of the failure, but I don't understand it. By mangling with the manifest I found that the problem lies in the declaration of locales
in the manifest.
{
"version": "1.0",
"name": "xxx",
"description": "xxx",
"launch_path": "/app.html",
"icons": {
"16": "/icon_0016px.png",
"32": "/icon_0032px.png",
"48": "/icon_0048px.png",
"60": "/icon_0060px.png",
"64": "/icon_0064px.png",
"128": "/icon_0128px.png",
"256": "/icon_0256px.png",
"512": "/icon_0512px.png"
},
"developer": {
"name": "xxx",
"url": "http://xxx"
},
"fullscreen": "true",
"default_locale": "es",
"locales": {
"it": {
"name": "L'Open Web",
"description": "Eccitante azione di sviluppo web open!"
},
"de": {
"name": "Der Open Web",
"description": "Spannende offene Web-Entwicklung-Action!"
}
}
}
If I remove the locales
block (and the preceeding comma of course), the application installs correctly, and that block is copypasted from the Mozilla example. The default_locale
is not overriden either. So, I have no idea.
EDIT----------------
It works if I install it from the WebIde or the Application Manager. However, if I try a install from a webpage using navigator.mozApps.installPackage
it fails.
I have tried different versions of Firefox (Firefox 30-34, Firefox OS 1.3-2.2) in different platforms (Win, Linux) and with different locales, and a Firefox OS phone (FOS 1.0), with similar results.
The manifest validator always says it's ok.
I've tried the same locales block on an app of mine, and it works. I successfully installed the app on the Firefox OS 1.1 simulator and on my phone, running Firefox OS 1.4. Maybe you are experiencing a bug in your simulator.
You can also try the app validator at https://marketplace.firefox.com/developers/validator.