【问题标题】:Submit an App by Url to Firefox Marketplace通过 Url 向 Firefox Marketplace 提交应用程序
【发布时间】:2014-01-12 18:01:31
【问题描述】:

我可以使用 URL 安装它,但我无法上传到 Firefox 市场。

但我有 2 个错误:

JSON Parse Error

Error: The webapp extension could not be parsed due to a syntax error in the JSON.
No JSON object could be decoded: line 1 column 0 (char 0)

json 是这样的:

{
  "name": "Snake",
  "description": "Snake in html and js",
  "launch_path": "/index.html",
  "developer": {
    "name": "ZiTAL",
    "url": "https://github.com/ZiTAL/snakejs"
  },
 "icons": {
    "128": "/img/snake-128.png"
  },  
"installs_allowed_from": ["*"]
}

第二个错误:

Manifests must be served with the HTTP header "Content-Type: application/x-web-app-manifest+json". See https://developer.mozilla.org/docs/Web/Apps/Manifest#Serving_manifests for more information.

如果我用 wget 下载:

wget http://myurl/manifest.webapp

标题没问题

HTTP eskaera bidalia, erantzunaren zain... 200 OK
Luzera: 267 [application/x-web-app-manifest+json]
Saving to: ‘manifest.webapp’

【问题讨论】:

  • 这很有趣。通常,当清单文件未正确提供时会发生此错误,但看起来您有正确的.htaccess。使用验证器查看它是否提供有关问题的更多信息:marketplace.firefox.com/developers/validator
  • 啊啊!!!我需要输入 webapp URL 来验证应用程序

标签: marketplace firefox-os


【解决方案1】:

要验证应用程序,您需要输入 ma​​nifest.webapp url,而不是应用程序 url:

http://myurl/manifest.webapp

【讨论】:

    【解决方案2】:

    第二个错误:

    您可以尝试wget --save-headers 并查看输出文件,如果 Content-Type 标头确实正确...

    【讨论】:

    • 我回答了我的问题,感谢您的关注。
    猜你喜欢
    • 2014-11-09
    • 1970-01-01
    • 2012-10-28
    • 2019-12-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-09-11
    • 1970-01-01
    相关资源
    最近更新 更多