Search code examples
pythonmacosfirefoxfirefox-addonfirefox-addon-sdk

When I try to run 'cfx run' or 'cfx test' using the Mozilla Add-On SDK, my application binaries are not found


I installed the the latest Add-On SDK by Mozilla (version 1.15). Installation was successful and when I execute cfx I get a list of all possible commands. I made a new separate empty folder, cd'd into it and ran cfx init. This was also successful and all necessary folders and files got created.

Now when I try to run the extension or test it, I get the following error:

I can't find the application binary in any of its default locations on your system. Please specify one using the -b/--binary option.

I have tried looking up the docs to see what kind of file I should be looking for but was unsuccessful in solving the issue. I tried to create an empty bin folder within the add-on folder and i have tried initiating the template in different parents and sub-folders. I still get the same message.

I'm running on a Mac, OSX Mavericks 10.9.1

What's going on here exactly?


Solution

  • It's looking for the Firefox binary file, not your application's binaries. You have to install Firefox because cfx run will open a browser with your add-on installed so you can use it and test it live.

    If firefox is already installed, then it is in a non-standar path, so you must tell cfx command where to find it, this way:

    cfx run -b /usr/bin/firefox

    or

    cfx run -b /usr/bin/firefox-trunk

    These examples are ony valid in some Linux distros like Ubuntu, you will have to find the firefox binary file in Mac OSX.