【问题标题】:Add-on not compatible with Firefox upon .xpi install attempt尝试 .xpi 安装时加载项与 Firefox 不兼容
【发布时间】:2016-11-26 15:57:51
【问题描述】:

我正在尝试发布我的第一个 Firefox 扩展,但在安装时遇到了问题。

我用jpm xpi 签署包裹。但是,当我尝试安装 .xpi 文件时,出现错误:

[extension name] could not be installed because it is not compatible with Firefox Developer Edition 52.0a2

我也在消费者 Firefox 版本 50.0 中尝试过。

当前em标签:

<em:minVersion>0.9</em:minVersion> <em:maxVersion>1.0+</em:maxVersion>

我也试过了

 '<em:maxVersion>50.0.*</em:maxVersion>' 

 '<em:maxVersion>52.0+</em:maxVersion>'

我当前的 XPI 文件托管在 here


`<?xml version="1.0"?>

<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
     xmlns:em="http://www.mozilla.org/2004/em-rdf#">

  <Description about="urn:mozilla:install-manifest">
  <em:id>lets@stopnormalizing.com</em:id>
    <em:version>1.1</em:version>

<!-- Target Application this extension can install into,
         with minimum and maximum supported versions. -->

<em:targetApplication>
    <Description>
      <!-- Firefox's UUID -->
      <em:id>[myemail]</em:id>
      <em:minVersion>0.9</em:minVersion>
      <em:maxVersion>1.0+</em:maxVersion>
    </Description>
  </em:targetApplication>

  <!-- Front End MetaData -->
  <!-- My_Theme -->
  <em:name>Stop Normalizing</em:name>
  <em:description>my extension description</em:description>
  <em:creator>my name</em:creator>
  <em:homepageURL>my url</em:homepageURL>
<!-- 
  <em:aboutURL>my website URL</em:aboutURL>

  <!-- Front End Integration Hooks (used by Theme Manager)-->
    <em:internalName>Extension_name</em:internalName>
  </Description>

</RDF>`

任何帮助将不胜感激。我不知道如何继续。

【问题讨论】:

    标签: firefox firefox-addon firefox-addon-sdk xpi


    【解决方案1】:

    您正在制作 Firefox Add-on SDK 扩展。当您从package.json 文件执行jpm xpi 时,应该会自动为您生成install.rdf。上面显示的 install.rdf 文件似乎是从the example on this page 复制的,然后手动编辑。换句话说,它似乎不是使用jpm xpi 自动生成的。因此,它有错误。

    允许jpm xpi自动创建一个新的install.rdf

    您可能在运行jpm xpi 的目录中有手动编辑过的install.rdf 文件(可能还有一个bootstrap.js 文件)。我建议您从运行jpm xpi 的目录中删除 install.rdf (以及 bootstrap.js 如果存在)并允许它/它们自动生成jpm xpi 来自您的 package.json。要在新的 install.rdf 中获得基本相同的信息,您需要在 package.json 中添加或更改以下内容:

    "title": "Stop Normalizing Alt Right",
    "fullName": "Stop Normalizing",
    "version": "1.1.0",
    "id": "lets@stopnormalizing.com",
    "homepage": "http://www.stopnormalizing.com",
    "author": "George Zola",
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-12-13
      • 1970-01-01
      相关资源
      最近更新 更多