I am trying to set up automatic updates for an add-on that, previously, I was pushing out manually (“Hey people, the new XPI file is at xyz.com/foobar.xpi”).
I have read the doc page for package.json as well as jpm, and I have been Googling left and right to no avail. Here is how I have it configured and how I have tested it:
Configuration:
- In package.json I have specified both updateLink and updateURL
- Both are pointing to the same HTTPS server
- Entering either URL directly in the browser correctly retrieves the associated file. In the case of the rdf, I get back MIME type application/rdf+xml, which I believe is correct. If I attempt direct access to the xpi file, Firefox blocks it as an unauthorized attempt to install software (which is the expected behavior)
- Package.json has an “engines” entry for “firefox” of “>=38.0.a1 <=45.0” which correctly transfers to the <minVersion> and <maxVersion> entries in the rdf file (figuring out the correct package.json syntax for this was a struggle in itself)
Testing:
- I use jpm sign to get the starting version, say 1.0.0 and I load it manually into FF (44.0.2)
- I update package.json and set the version to 1.0.1
- I run jpm xpi to get the update.rdf file
- I run jpm sign to get a signed version of the xpi
- I upload the rdf and xpi files to the locations identified in updateURL and updateLink, respectively
- In FF, I select “Check for updates” and get the result “No updates available”
I have no idea at this point what I might be doing wrong. Any help is appreciated.