Reputation: 83
I followed instructions here and after installed I opened the console mode to debug but the log stuck there without any response: The console just shows something like following and nothing more output:
*** LOG addons.updates: Requesting https://www.extension.host.com/update.rdf
My install.rdf
is:
<?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>[email protected]</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>
And update.rdf
is:
<?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:[email protected]">
<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>
In the server side, both of the update.rdf and the xpi file are returned as javax.ws.rs.core.Response
and I have configured the mimemapping in the web.xml
as the following:
<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>
Anything I missed? The automatic update is just not working.
Upvotes: 1
Views: 2183
Reputation: 83
Today I look back to this issue again and finally solved this. And I update the answer in case anyone else need this. I looked into the source code AddonUpdateChecker.jsm which I should do this earlier. I used javascript debugger to debug the update. Before this, I really didn't see any logs indicating that the I should have builtInCertificate. And found that it's looking into the pref values about certificates. Which are extensions.install.requireBuiltInCerts and extensions.update.requireBuiltInCerts.
Set these two prefs values to false and the udpate works.
Others with different ssl certificate may not meet this problem maybe.
Upvotes: 6