Re-packaging your SDK-based Add-ons for Firefox 11

Yesterday the Jetpack project released SDK 1.5. Alongside this Dave Mason pointed out that the upcoming release of Firefox 11 will break compatibility with add-ons packaged with SDK versions 1.3 and below. This is necessary because of a change in Firefox where nsIDOMNSElement was removed ( Jorge recently mentioned this in his compatibility post ). Add-on SDK 1.3 and below contains code that uses this api, and SDK 1.4.* and up do not.

If you are an add-on developer who has an SDK-based add-on on AMO, what this actually means is the following:

  • You do not have to change your own code at all.
  • If you are doing development on your own machine using the command-line SDK, you do need to download the latest version of the SDK and re-package your add-on with this new version.
  • If you are doing development with the online add-on builder, the process is even simpler – just switch the version of the SDK being used in your builder project and click on save, as I demonstrate in this incredibly short screencast.
  • Once you have an updated xpi file, please submit it to AMO. As the AMO approval queues are at historically low levels currently, I expect your review should be dealt with promptly!

We’d really appreciate it if developers would do this some time before Firefox 11 ships on March 11. We will also be using the powers of AMO to directly contact affected developers over the next couple of weeks as well. If you have any questions about this, please comment below or drop by #jetpack on irc.mozilla.org.

3 comments on “Re-packaging your SDK-based Add-ons for Firefox 11”

  1. Mingyi Liu wrote on

    I just tried repacking my “Fastest Search” addon using v1.5 and it failed to startup (installation was done) as it threw an error:

    Fri Mar 02 2012 22:04:58
    Error: An exception occurred.
    Traceback (most recent call last):
    File “resource://fastestsearch-at-mingyi-dot-org/api-utils/lib/url.js”, line 63, in toFilename
    throw new Error(“cannot map to filename: ” + url);
    Error: cannot map to filename: resource://fastestsearch-at-mingyi-dot-org/fastestsearch/data/engines.json

    But the file engines.json has always been under data dir, and it always worked up to SDK v1.4. I don’t see v1.5 documentation mentioning url.toFileName gets changed either. Is this a v1.5 bug?

  2. Mingyi Liu wrote on

    BTW the offending code is really simple:

    var fpath = url.toFilename(data.url(‘engines.json’));

    1. Mingyi Liu wrote on

      Forgot to write down more info: I’m testing on Windows7, with FF 10.0.2 + SDK 1.5. As I saidd, 1.5 throws the above error while 1.4.2-packed addon works.