I'm writing an add-on for Firefox 11, but when I load it I get the message that the add-on isn't compatible with Firefox 11.
Here is my 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>gnup#gear-network.com</em:id>
<em:unpack>true</em:unpack>
<em:name>GNUp</em:name>
<em:version>1.0</em:version>
<em:description>bleh bleh bleh</em:description>
<em:creator>Gear Network</em:creator>
<em:homepageURL>http://gear-network.com/</em:homepageURL>
<em:targetApplication>
<Description>
<em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
<em:minVersion>3.0</em:minVersion>
<em:maxVersion>11.0</em:maxVersion>
</Description>
</em:targetApplication>
</Description>
</RDF>
Did anyone already have this problem before?
Here is a list of all versions usable as minVersion or maxVersion:
https://addons.mozilla.org/en-US/firefox/pages/appversions/
The value you provided (11.0) is probably too specific. Try using broader version identifier, e.g. 11.*. This will also include all minor updates in the future.
Related
I'm new here. I attempted to follow the basic guide to setting up my plugin to autoupdate, but no matter what I tried, the Addons Manager simply returns "No updates found" to me.
This is my first version, with the McCoy updateKey and the updateURL.
<?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>rikaicake#kirei.cake</em:id>
<em:name>RikaiCake Custom JP-EN Dictionary</em:name>
<em:version>1.0.20141010</em:version>
<em:description>The next generation Rikaichan dictionary, catered for translators and dedicated Japanese enthusiasts alike, by one single wholehearted translator. (Disclaimer: No credit is claimed for the creation of the original dictionary by James Breen or any others involved. This is solely a fan contribution.)</em:description>
<em:creator>Nitori</em:creator>
<em:homepageURL>http://kireicake.com/rikaicakehome/</em:homepageURL>
<em:iconURL>chrome://rikaicake/content/icon.png</em:iconURL>
<em:icon64URL>chrome://rikaicake/content/icon64.png</em:icon64URL>
<em:unpack>true</em:unpack>
<em:type>2</em:type>
<!-- Update variables -->
<em:updateURL>http://kireicake.com/rikaicake/update.rdf</em:updateURL>
<em:updateKey>MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDLELaF2leBsPJJXGwEW8Eju5crK/vXDHmNFbNb7I/na64jX00tNud8sjjRQiXmkm7rRqdmIkwqsvCJAeF92HmLRAN9DxxLHUcNO5TJ9MpsjgnJnS9Cpwp+9iQHzG5JE8IhyeuqL9UH1l8840q+o1F5+aU0gQfCXVq7ml35Cp5AcwIDAQAB</em:updateKey>
<!-- Firefox -->
<em:targetApplication>
...
</em:targetApplication>
</Description>
</RDF>
Next is the update.rdf, which contains both the McCoy signature as well as the correct sha1 hash of the new version's XPI file.
<?xml version="1.0"?>
<RDF:RDF xmlns:em="http://www.mozilla.org/2004/em-rdf#"
xmlns:NC="http://home.netscape.com/NC-rdf#"
xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<RDF:Seq RDF:about="rdf:#$juwpx">
<RDF:li RDF:resource="rdf:#$kuwpx"/>
</RDF:Seq>
<RDF:Description RDF:about="rdf:#$nuwpx"
em:id="rikaicake#kirei.cake"
em:minVersion="2.0"
em:maxVersion="99.*"
em:updateLink="http://kireicake.com/rikaicake/rikaicake-1.1.20141011.xpi"
em:updateHash="sha1:a88f474ce465ec8b027bf9d59f26aa4d758c1b0d" />
<RDF:Description RDF:about="urn:mozilla:extension:rikaicake#kirei.cake"
em:signature="MIGTMA0GCSqGSIb3DQEBDQUAA4GBAICj86yogJPhb4PKRfcXnqd2rGRVoo89TULFi6urSODlVW97RjwVkUt9t4cgvGvk8g5Ix8xVNKlybBLkXOfzMIIbWWMrK9MUHHly1Pi2BdW2ecOoUOEPpB73hVLwJggrVLCFogFoATtVLBMHC6wjxvRGfLt2M5alUu1jpm3RxOCF">
<em:updates RDF:resource="rdf:#$juwpx"/>
</RDF:Description>
<RDF:Description RDF:about="rdf:#$kuwpx"
em:version="1.1.20141011">
<em:targetApplication RDF:resource="rdf:#$nuwpx"/>
</RDF:Description>
</RDF:RDF>
And, just for reference, the updated install.rdf in the new version is basically the exact same albeit with a different em:version number (newer one).
<?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>rikaicake#kirei.cake</em:id>
<em:name>RikaiCake Custom JP-EN Dictionary</em:name>
<em:version>1.1.20141011</em:version>
<em:description>The next generation Rikaichan dictionary, catered for translators and dedicated Japanese enthusiasts alike, by one single wholehearted translator. (Disclaimer: No credit is claimed for the creation of the original dictionary by James Breen or any others involved. This is solely a fan contribution.)</em:description>
<em:creator>Nitori</em:creator>
<em:homepageURL>http://kireicake.com/rikaicakehome/</em:homepageURL>
<em:iconURL>chrome://rikaicake/content/icon.png</em:iconURL>
<em:icon64URL>chrome://rikaicake/content/icon64.png</em:icon64URL>
<em:unpack>true</em:unpack>
<em:type>2</em:type>
<!-- Update variables -->
<em:updateURL>http://kireicake.com/rikaicake/update.rdf</em:updateURL>
<em:updateKey>MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDLELaF2leBsPJJXGwEW8Eju5crK/vXDHmNFbNb7I/na64jX00tNud8sjjRQiXmkm7rRqdmIkwqsvCJAeF92HmLRAN9DxxLHUcNO5TJ9MpsjgnJnS9Cpwp+9iQHzG5JE8IhyeuqL9UH1l8840q+o1F5+aU0gQfCXVq7ml35Cp5AcwIDAQAB</em:updateKey>
<!-- Firefox -->
<em:targetApplication>
...
</em:targetApplication>
</Description>
</RDF>
I've also set up my .htaccess so that it would properly handle the files.
AddType text/rdf .rdf
AddType text/xml .rdf
AddType application/rdf+xml .rdf
AddType application/x-xpinstall .xpi
Does anybody have any idea what I could be doing wrong? I don't own my server, so I cannot set it to do HTTPS, so that is not an option. I tried several Firefox browsers, and they all do the same. The files can be accessed on the website, no problem at all.
For one thing, is my code wrong by any chance? If not, then I might just need to tell people to manually update. Thanks a bunch!
Oh, I found out the issue. It's working now. The issue was in my update.rdf:
<?xml version="1.0"?>
<RDF:RDF xmlns:em="http://www.mozilla.org/2004/em-rdf#"
xmlns:NC="http://home.netscape.com/NC-rdf#"
xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<RDF:Description RDF:about="rdf:#$nuwpx"
em:id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}"
em:minVersion="2.0"
em:maxVersion="99.*"
em:updateLink="http://kireicake.com/rikaicake/rikaicake-1.1.20141011.xpi"
em:updateHash="sha1:a88f474ce465ec8b027bf9d59f26aa4d758c1b0d" />
<RDF:Seq RDF:about="rdf:#$juwpx">
<RDF:li RDF:resource="rdf:#$kuwpx"/>
</RDF:Seq>
<RDF:Description RDF:about="urn:mozilla:extension:rikaicake#kirei.cake"
em:signature="MIGTMA0GCSqGSIb3DQEBDQUAA4GBABuMUOfHzXvWVu2LlIxZalk94+HFLShDfugBBH7uUEU1knq7imKBIQ8Ilw38lJ/hfxVpXQx8jxywGBx6QPeqFMmBhu9ocKTiWIUQ+52O2i2p1pCw0VrcEd90KP1Tj0IXXthIpILp/VQMif4cloOaI//4ql27xHe0+L/NXkB/JZbN">
<em:updates RDF:resource="rdf:#$juwpx"/>
</RDF:Description>
<RDF:Description RDF:about="rdf:#$kuwpx"
em:version="1.1.20141011">
<em:targetApplication RDF:resource="rdf:#$nuwpx"/>
</RDF:Description>
</RDF:RDF>
em:id should be {Firefox GUID}, NOT the addon's ID. I went through a ton of trouble just to realize that I misinterpreted a field.
I try to follow the instruction at
https://developer.mozilla.org/en/docs/Building_an_Extension
to build a firefox add-on.
I changed install.rdf to
<?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>helloworld#mozilla.doslash.org</em:id>
<em:name>Hello World extension for Firefox</em:name>
<em:version>1.0</em:version>
<em:description>Demo extension.</em:description>
<em:creator>Nickolay Ponomarev</em:creator>
<!-- optional items -->
<em:contributor>A person who helped you</em:contributor>
<em:contributor>Another one</em:contributor>
<em:homepageURL>http://kb.mozillazine.org/Getting_started_with_extension_development</em:homepageURL>
<!--em:optionsURL>chrome://sampleext/content/settings.xul</em:optionsURL>
<em:aboutURL>chrome://sampleext/content/about.xul</em:aboutURL>
<em:iconURL>chrome://sampleext/skin/mainicon.png</em:iconURL>
<!-- Firefox -->
<em:targetApplication>
<Description>
<em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
<em:minVersion>12.0</em:minVersion>
<em:maxVersion>32.*</em:maxVersion>
</Description>
</em:targetApplication>
</Description>
</RDF>
when install it reports
your comment welcome
The core files of an extension (install.rdf, chrome.manifest and bootstrap.js where applicable) must be saved with ANSI encoding. Check if your editor defaults to some unicode flavor.
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>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>
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: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>
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.
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.
I wrote an update.rdf for an automatic update service.
In the add on overview an can do a right click "search for new update" and firefox finds the new version on my test webspace, download it and "install" it. But after the restart I have the same version like before, it didn't changed the xpi files. Here are some pictures and the code snippets. Mabye you have an idea.
http://s12.postimage.org/f68kptdy3/script_error1.png
http://s12.postimage.org/57nm3c4ij/script_error2.png
After the restart I have version 0.2.3 again with no changes.
install.rdf of version 0.2.3
Code: Select all
<Description about="urn:mozilla:install-manifest">
<em:id>megxbar#megx.net</em:id>
<em:type>2</em:type>
<em:name>MegxBar</em:name>
<em:version>0.2.3</em:version>
.
.
.
<em:updateURL>http://home.arcor.de/eniac2000/update.rdf</em:updateURL> <em:updateKey>MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDO65zOLKafZWtmX/cvs9ELMT1VkCQ8GlZNbRMku0su8VxDr+k4eGFYUupHWy2Ll+rfXJ43k+nYQvYHZRoU94DtiCCk4GEpfGytQPCCHOl30aV9elJH+cmeSKZiejPvMptZfp9GXTcLWgVycPVwS59J/LFJ2St2QQSv2hgWV1dKlwIDAQAB</em:updateKey>
<em:targetApplication>
<Description>
<em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id> <!-- Firefox -->
<em:minVersion>1.5</em:minVersion>
<em:maxVersion>15.0</em:maxVersion>
</Description>
</em:targetApplication>
</Description>
</RDF>
update.rdf with signature (on the server)
<?xml version="1.0"?>
<RDF:RDF xmlns:em="http://www.mozilla.org/2004/em-rdf#"
xmlns:NC="http://home.netscape.com/NC-rdf#"
xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<RDF:Description RDF:about="rdf:#$ZpuSg3"
em:id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}"
em:minVersion="1.5"
em:maxVersion="15.0"
em:updateLink="http://home.arcor.de/eniac2000/MegxBar_0.3.3.xpi"
em:updateHash="sha1:02226eedd92e895379881ec919ce07c7f73ff9a9" />
<RDF:Seq RDF:about="rdf:#$VpuSg3">
<RDF:li RDF:resource="rdf:#$WpuSg3"/>
</RDF:Seq>
<RDF:Description RDF:about="rdf:#$WpuSg3"
em:version="0.3.3">
<em:targetApplication RDF:resource="rdf:#$ZpuSg3"/>
</RDF:Description>
<RDF:Description RDF:about="urn:mozilla:extension:megxbar#megx.net"
em:signature="MIGTMA0GCSqGSIb3DQEBDQUAA4GBAFOK3mZUdai/KCVRtHNvTYPV7Hu3+3b9ymfkGM3u08m0O7Ltl1tc0guYtZ74i+qUYC8T+66pgK/LeXnwzAHFUBcEfXFZGfwH8ZG8SR/lyZaUzSsAM9CPoYv1YIM/PjLfHtIEJdzROW1HG31YlsP3nouT5wSyEhvJiNQvAUwP37Aj">
<em:updates RDF:resource="rdf:#$VpuSg3"/>
</RDF:Description>
</RDF:RDF>
install.rdf in the xpi of version 0.3.3 on the server
<?xml version="1.0" encoding="UTF-8"?>
<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>megxbar#megx.net</em:id>
<em:type>2</em:type>
<em:name>MegxBar</em:name>
<em:version>0.3.3</em:version>
.
.
.
<em:updateURL>http://home.arcor.de/eniac2000/update.rdf</em:updateURL>
<em:updateKey>MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDO65zOLKafZWtmX/cvs9ELMT1VkCQ8GlZNbRMku0su8VxDr+k4eGFYUupHWy2Ll+rfXJ43k+nYQvYHZRoU94DtiCCk4GEpfGytQPCCHOl30aV9elJH+cmeSKZiejPvMptZfp9GXTcLWgVycPVwS59J/LFJ2St2QQSv2hgWV1dKlwIDAQAB</em:updateKey>
<em:targetApplication>
<Description>
<em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id> <!-- Firefox -->
<em:minVersion>1.5</em:minVersion>
<em:maxVersion>15.0</em:maxVersion>
</Description>
</em:targetApplication>
</Description>
</RDF>
I created the signature with MCCOY and the hash value with the alternate hash generator for windows
If I download the MegxBar_0.3.3.xpi from your server and look at the install.rdf file inside I see:
<em:version>0.2.3</em:version>
So Firefox correctly updates your extension and installs the new version. Only problem is that the "new" version on your server is the old version, despite the file name.
I am using sparkle framework for the first time. I am trying to test it out and everything works perfectly, except it doesn't display the update version correctly. So for example this is my xml file on server:
<?xml version="1.0" encoding="utf-8"?> <rss version="2.0" xmlns:sparkle="http://www.andymatuschak.org/xml-namespaces/sparkle" xmlns:dc="http://purl.org/dc/elements/1.1/"> <channel>
<title>Your Great App's Changelog</title>
<link>http://localhost/test/SampleAppcast.xml</link>
<description>Most recent changes with links to updates.</description>
<language>en</language>
<item>
<title>Version 1.5 (2 bugs fixed; 3 new features)</title>
<sparkle:releaseNotesLink>
http://localhost/test/notes.html
</sparkle:releaseNotesLink>
<pubDate>Wed, 15 Mar 2011 19:20:11 +0000</pubDate>
<enclosure url="http://localhost/test/seglab.zip" sparkle:version="2.0" length="1623481" type="application/octet-stream" sparkle:dsaSignature="MCwCFD8H0l7NOhl7OXeqVM1+CeonHuKtAhRQXdB4alDeMPgSUaHhuX1Zx5GwTg==" />
</item>
</channel> </rss>
notice in the title tag, the name of the version is 1.5, but when I get a prompt for sparkle update, it says "App Name version 2.0 is now available - you have 1.0...."
It should say 1.5...
Why is this happening?
Thanks!
"It should say 1.5" as in, "App Name version 1.5 is now available - you have 1.0...."?
Then you probably need to change this tag:
<enclosure
url="http://localhost/test/seglab.zip"
sparkle:version="2.0"
length="1623481"
... />
to this:
<enclosure
url="http://localhost/test/seglab.zip"
sparkle:version="1.5"
length="1623481"
... />
Full disclosure: I have never used Sparkle before. This is just a guess based on eyeballing the XML.