1

ここの指示に従い、インストール後、コンソール モードを開いてデバッグしましたが、ログは何も応答せずにそこにスタックしました。コンソールには次のようなものが表示され、それ以上の出力はありません。

*** LOG addons.updates: Requesting https://www.extension.host.com/update.rdf

install.rdfは:

<?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>webmailchecker@mozilla.doslash.org</em:id>
    <em:name>WebMail Checker for Firefox</em:name>
    <em:version>1.0</em:version>
    <em:description>WebMail Checker</em:description>
    <em:updateURL>https://www.extension.host.com/update.rdf</em:updateURL>

    <!-- Firefox -->
    <em:targetApplication>
      <Description>
        <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
        <em:minVersion>3.6</em:minVersion>
        <em:maxVersion>23.*</em:maxVersion>
      </Description>
    </em:targetApplication>
  </Description>
</RDF>

そしてupdate.rdf、次のとおりです。

<?xml version="1.0" encoding="UTF-8"?>

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

  <RDF:Description about="urn:mozilla:extension:webmailchecker@mozilla.doslash.org">
    <em:updates>
      <RDF:Seq>

        <!-- Each li is a different version of the same add-on -->
        <RDF:li>
          <RDF:Description>
            <em:version>1.0</em:version> 
            <em:targetApplication>
              <RDF:Description>
                <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
                <em:minVersion>1.5</em:minVersion>
                <em:maxVersion>23.*</em:maxVersion>
                <em:updateLink>https://www.extension.host.com/firefox.xpi</em:updateLink>

              </RDF:Description>
            </em:targetApplication>
          </RDF:Description>
        </RDF:li>

        <RDF:li>
          <RDF:Description>
            <em:version>2.0</em:version>
            <em:targetApplication>
              <RDF:Description>
                <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
                <em:minVersion>1.5</em:minVersion>
                <em:maxVersion>23.*</em:maxVersion>
                <em:updateLink>https://www.extension.host.com/firefox_2.0.xpi</em:updateLink>
              </RDF:Description>
            </em:targetApplication>
          </RDF:Description>
        </RDF:li>

      </RDF:Seq>
    </em:updates>
  </RDF:Description>
</RDF:RDF>

サーバー側では、update.rdf と xpi ファイルの両方が返され、次javax.ws.rs.core.Responseのように mimemapping を構成しました。web.xml

<mime-mapping>
    <extension>xpi</extension>
    <mime-type>application/x-xpinstall</mime-type>
</mime-mapping>
<mime-mapping>
    <extension>rdf</extension>
    <mime-type>text/xml</mime-type>
</mime-mapping>

見逃したものはありますか?自動更新は機能していません。

4

1 に答える 1

6

今日、私はこの問題をもう一度振り返り、最終的にこれを解決しました。そして、他の誰かがこれを必要とする場合に備えて、回答を更新します。ソースコード AddonUpdateChecker.jsm を調べました。これは以前に行う必要があります。更新をデバッグするために JavaScript デバッガーを使用しました。これより前は、buildInCertificate が必要であることを示すログはまったく見られませんでした。そして、証明書に関する設定値を調べていることがわかりました。extensions.install.requireBuiltInCertsとextensions.update.requireBuiltInCertsです

これら 2 つの prefs 値を false に設定すると、udpate が機能します。

別の ssl 証明書を持つ他の人は、おそらくこの問題を満たさない可能性があります。

于 2013-05-29T02:36:52.783 に答える