【问题标题】:Firefox OS App Manifest throwing NS_ERROR_FAILURE errorFirefox OS App Manifest 抛出 NS_ERROR_FAILURE 错误
【发布时间】:2013-07-25 23:08:05
【问题描述】:

我正在构建一个 Firefox OS 应用,并在以下代码行:

var app = navigator.mozApps.install('mymanifest.webapp');

Firefox 控制台抛出错误:

Error: NS_ERROR_FAILURE: INVALID_URL: '/mymanifest.webapp', Source File: resource://gre/components/Webapps.js, Line: 87

我的 MVC 控制器是这样的:

public ContentResult FirefoxOsManifest()
{
    string json = GetManifestJson(); // a method that returns json string

    return Content(json, "application/x-web-app-manifest+json");
}

我已将.webapp mimetype 添加到我的 IIS,重新启动 IIS,重新启动 World Wide Web Publishing Service,重新启动浏览器,验证清单,但仍然出现错误。我错过了什么?

【问题讨论】:

    标签: web-applications mime-types firefox-os


    【解决方案1】:

    Mozilla 的某个人就此回复了我。

    We currently do not support installation of web apps through a relative URL. You need to use an absolute URL path to the webapp manifest.

    【讨论】:

    • 绝对是指以http开头的那个和以app://internal..开头的那个?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-03-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多