Comment 16 for bug 861664

Revision history for this message
In , Dtownsend (dtownsend) wrote :

I've figured out what the problem here is and it will likely affect any user that has a new add-on waiting to install or an update to an existing add-on waiting to be installed at the time they update from anything earlier than Firefox 7 to Firefox 7 or later.

The problem stems from how the add-on install process works. We download the XPI and store it in a staging directory. We also load the information from install.rdf into a JS object. Any updated compatibility information (as well as other things I'm sure I'm not remembering) is applied to this JS object and then it is written alongside the XPI as a JSON text file. After restarting Firefox loads the JSON data rather than needing to parse install.rdf and do compatibility checks a second time.

Normally that works out fine however if the version of Firefox changes in the meantime and new fields are now supported in install.rdf the loaded JSON data won't contain those new fields, best case the install/update will complete but the database won't contain the correct data from install.rdf, worst case the install fails. In this case the latter is happening. Bug 653637 introduced the new fields that is causing this.

I have a hack that sort of solves the problem but I have a strong feeling that it may break things. The better solution is probably to do a better job of passing the data between Firefox instances and I have a few ideas of how to do that that I need to investigate further.