Don't zip that folder when creating an XPI on OS X
It's a wonderfully sunny day and you, intrepid developer, have embarked upon creating a FireFox extension. It's been a long an grueling journey but you persevered and now you're ready to install it in your browser to test it. You know that you simply need to zip it up, rename the resulting archive to give it an .xpi extension, and finally drag it into FireFox to install and test it before unleashing its awesomeness on an unsuspecting world.
Alas, when you try to install your extension, instead of a testament to your amazing awesomeness you're met with a hostile error dialog. It roars, menacingly:
Firefox could not install the file atfile:///Users/aral/projects/mytotallyamazingfirefoxextension/foo.xpi
because: Install script not found -204
You're wounded, maybe mortally. Your deflated ego somehow manages to garner enough get-up-and-go to Google the error message. Fortuitously, your efforts are fruitful and you find a helpful forum post chronicling the experiences of fellow developers who encountered the same error in times gone by. They too were of the order of the Mac. They too zipped up their folders. And then, there it is, the post with the solution laid as bare as the backside of a wee bairn:
It turns out in my case that the zip archive was being created incorrectly. If you use the Mac's "Create archive" command found in the contextual (right-click or control-click) menu of the folder containing your extension, it will place a superfluous folder inside the archive.
You thank jamieguy for sharing his knowledge with you and plough on, pausing briefly to blog your experience so that others may benefit...