Note that there are some explanatory texts on larger screens.

plurals
  1. POFirefox extension automatic update feature
    text
    copied!<p>I am following the tutorial at <a href="http://www.borngeek.com/firefox/automatic-firefox-extension-updates/" rel="nofollow">http://www.borngeek.com/firefox/automatic-firefox-extension-updates/</a> to make my FF extension can be updated automatically to users, but I stuck at the last part "Hosting an Update Manifest" as I am using Tomcat serve and I have no ideas how to set up the .htaccess (Is the .htaccess file similar with WEB-INF directory in terms of configure server?) <p>What I have done so far, <p> <p>Create a key pair: Public-Key and Private-Key<p> <p>Calculate sha256: b3290c69a1...</p> <p>Create update.rdf</p> <pre> &lt;?xml version="1.0"?&gt; &lt;r:RDF xmlns:r="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.mozilla.org/2004/em-rdf#"&gt; &lt;r:Description about="urn:mozilla:extension:myextension@mozilla.myextension.org"&gt; &lt;updates&gt; &lt;r:Seq&gt; &lt;r:li&gt; &lt;r:Description&gt; &lt;version&gt;1.0.1&lt;/version&gt; &lt;targetApplication&gt; &lt;r:Description&gt; &lt;id&gt;{ec8030f7-c20a-464f-9b0e-13a3a9e97384}&lt;/id&gt; &lt;minVersion&gt;3.5&lt;/minVersion&gt; &lt;maxVersion&gt;5.0.*&lt;/maxVersion&gt; &lt;updateLink&gt;http://localhost:8080/myextension/pluginupdate/myextension.xpi&lt;/updateLink&gt; &lt;updateHash&gt; sha256:b3290c69a1... &lt;/updateHash&gt; &lt;/r:Description&gt; &lt;/targetApplication&gt; &lt;/r:Description&gt; &lt;/r:li&gt; &lt;/r:Seq&gt; &lt;/updates&gt; &lt;/r:Description&gt; &lt;/r:RDF&gt; </pre> <p>Sign update.rdf using Key</p> <p>Place singed update.rdf and myextension.xpi under pluginupdate directory, where pluginupdate is on the same level with WEB-INF.</p> <p> My install.rdf </p> <pre> &lt;?xml version="1.0"?&gt; &lt;RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:em="http://www.mozilla.org/2004/em-rdf#"&gt; &lt;Description about="urn:mozilla:install-manifest"&gt; &lt;em:id&gt;myextension@mozilla.myextension.org&lt;/em:id&gt; &lt;em:name&gt;My Test extension&lt;/em:name&gt; &lt;em:version&gt;1.0&lt;/em:version&gt; &lt;em:description&gt;Test Mozilla Extension.&lt;/em:description&gt; &lt;em:creator&gt;TEST Group&lt;/em:creator&gt; &lt;!-- optional items --&gt; &lt;em:contributor&gt;Me&lt;/em:contributor&gt; &lt;em:homepageURL&gt;http://?????????/&lt;/em:homepageURL&gt; &lt;em:updateKey&gt; MIGfMA0G..... &lt;/em:updateKey&gt; &lt;em:updateURL&gt;http://localhost:8080/myextension/pluginupdate/update.rdf&lt;/em:updateURL&gt; &lt;!-- Firefox --&gt; &lt;em:targetApplication&gt; &lt;Description&gt; &lt;em:id&gt;{ec8030f7-c20a-464f-9b0e-13a3a9e97384}&lt;/em:id&gt; &lt;em:minVersion&gt;3.5&lt;/em:minVersion&gt; &lt;em:maxVersion&gt;5.0.*&lt;/em:maxVersion&gt; &lt;/Description&gt; &lt;/em:targetApplication&gt; &lt;/Description&gt; &lt;/RDF&gt; </pre> <p>When i restart FF Browser, nothing happens. When I start FF Browser using command line with option -console</p> <pre> *** LOG addons.xpi: startup *** LOG addons.xpi: checkForChanges *** LOG addons.xpi: No changes found *** LOG addons.xpi: Opening database </pre> <p>So, how can I host and configure Tomcat to host the update manifest? Thanks</p> <p><b>Update</b></p> <p>Hi Wladimir,</p> <p>After define in the MIME type in the web.xml, there are some more information given with the -console option.</p> <p>I removed the extension and re-installed it, the logs are</p> <pre> *** LOG addons.xpi: startup *** LOG addons.xpi: checkForChanges *** LOG addons.xpi: No changes found *** LOG addons.xpi: Opening database *** LOG addons.repository: Requesting https://services.addons.mozilla.org/en-GB/firefox/api/1.5/search/guid:myextension%40mozilla.myextension.org?src=firefox&appOS=Linux&appVersion=5.0&tMain=23&tFirstPaint=1641&tSessionRestored=1042 *** LOG addons.xpi: Starting install of file:///home/me/browserplugindev/firefox/test/myextension.xpi *** LOG addons.xpi: Addon myextension@mozilla.myextension.org will be installed as a packed xpi *** LOG addons.xpi: Install of file:///home/me/browserplugindev/firefox/test/myextension.xpi completed. NOTE: child process received `Goodbye', closing down *** LOG addons.xpi: shutdown *** LOG addons.xpi: startup *** LOG addons.xpi: checkForChanges *** LOG addons.xpi: Found updated manifest for myextension@mozilla.myextension.org in app-profile *** LOG addons.xpi: Processing install of myextension@mozilla.myextension.org in app-profile *** LOG addons.xpi: Opening database *** LOG addons.xpi: New add-on myextension@mozilla.myextension.org installed in app-profile *** LOG addons.xpi: Updating database with changes to installed add-ons *** LOG addons.xpi: Updating add-on states *** LOG addons.xpi: Writing add-ons list </pre> <p>Frome line</p> <pre> LOG addons.repository: Requesting https://services.addons.mozilla.org/en-GB/firefox/api/1.5/search/guid:myextension%40mozilla.myextension.org?src=firefox&appOS=Linux&appVersion=5.0&tMain=23&tFirstPaint=1641&tSessionRestored=1042 </pre> <p>we can see that Update Manager (?) is making request to repository at https://services.addons.mozilla.org/en-GB/firefox/api/1.5/search/guid:myextension%40mozilla.myextension.org?src=firefox&appOS=Linux&appVersion=5.0&tMain=23&tFirstPaint=1641&tSessionRestored=1042 </p> <p>Also, after the startup</p> <pre> *** LOG addons.xpi: Found updated manifest for myextension@mozilla.myextension.org in app-profile *** LOG addons.xpi: Processing install of myextension@mozilla.myextension.org in app-profile </pre> <p>So does it mean that the update is found. But I did not see the notification on the Browser that tell me something like "there is a new version of myextension, update?".</p> <p> Did i miss anything? </p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload