Reputation: 13
I'm trying to build a simple XUL addon for Firefox. I don't use any tools for building it. The build process is as follows: compress the project file into a .zip, then rename the .zip into an .xpi file, go to Firefox addon manager and use "Install Add-ons From File..." but then I get the error "Add-on could not be installed because it is not compatible with Firefox 33.1.1". This is my install.rdf file content:
<?xml version="1.0" encoding="UTF-8"?>
<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" mlns:em="http://www.mozilla.org/2004/em-rdf#">
<Description about="urn:mozilla:install-manifest">
<em:id>[email protected]</em:id>
<em:type>2</em:type>
<em:name>addon</em:name>
<em:version>1.0</em:version>
<em:creator>SC</em:creator>
<em:description>addon description</em:description>
<em:homepageURL>http://www.example.com/</em:homepageURL>
<em:iconURL>chrome://addon/skin/icon.png</em:iconURL>
<em:optionsURL>chrome://addon/content/options.xul</em:optionsURL>
<em:targetApplication>
<Description>
<em:id>{ec8030f7-c20a-464f-9b0e-13a3bbe97384}</em:id> <!-- Firefox -->
<em:minVersion>29.*</em:minVersion>
<em:maxVersion>36.*</em:maxVersion>
</Description>
</em:targetApplication>
</Description>
</RDF>
I tried with various min and max versions but I am getting the same error. I have the feeling that the problem lies elsewhere and not in the minVersion and maxVersion from this file. Where else could be the problem?
Upvotes: 1
Views: 341
Reputation: 33296
The GUID, <em:id>
, you are using is incorrect for Firefox. For desktop Firefox you should use:
<em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
The difference is in the last section.
Incorrect: 13a3bbe97384
Correct:13a3a9e97384
You can find a list of valid GUIDs and versions on the Mozilla Valid Application Versions page.
While it is not causing your error, you probably don't want to be using:
<em:minVersion>29.*</em:minVersion>
Wildcards should not be used in the <em:minVersion>
field. The wildcard will default to the highest possible version. For what you are probably wanting – all versions that are 29 or higher – you should use:
<em:minVersion>29.0</em:minVersion>
Specifically, see Choosing minVersion and maxVersion:
Do not mistakenly think that * in a version represents any version. The * actually represents an infinitely high number and so is really only sensibly used in the maxVersion. Using it in a minVersion usually doesn't produce the effect you want.
Upvotes: 3