Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Revision 894835 of Troubleshooting

  • Revision slug: Mozilla/Add-ons/SDK/Tutorials/Troubleshooting
  • Revision title: Troubleshooting
  • Revision id: 894835
  • Created:
  • Creator: wbamberg
  • Is current revision? No
  • Comment

Revision Content

If you're having trouble getting the Add-on SDK up and running, don't panic! This page lists some starting points that might help you track down your problem.

Check Your Firefox or XULRunner

jpm searches well known locations on your system for Firefox or XULRunner. jpm may not have found an installation, or if you have multiple installations, jpm may have found the wrong one. In those cases you need to use jpm's --binary option. See the jpm guide for more information.

When you run jpm to test your add-on or run unit tests, it prints out the location of the Firefox or XULRunner binary that it found, so you can check its output to be sure.

Check Your Text Console

When errors are generated in the SDK's APIs and your code, they are logged to the text console. This should be the same console or shell from which you ran the jpm command.

Don't Leave Non-SDK Files Lying Around

Currently the SDK does not gracefully handle files and directories that it does not expect to encounter. If there are empty directories or directories or files that are not related to the SDK inside your addon-sdk directory or its sub-directories, try removing them.

Search for Known Issues

Someone else might have experienced your problem, too. Other users often post problems to the project mailing list. You can also browse the list of known issues or search for specific keywords.

Contact the Project Team and User Group

SDK users and project team members discuss problems and proposals on the project mailing list. Someone else may have had the same problem you do, so try searching the list. You're welcome to post a question, too.

You can also chat with other SDK users in #jetpack on Mozilla's IRC network.

And if you'd like to report a bug in the SDK, that's always welcome! You will need to create an account with Bugzilla, Mozilla's bug tracker.

Run the SDK's Unit Tests

The SDK comes with a suite of tests which ensures that its APIs work correctly. You can run it with the following command:

  jpm testall

Some of the tests will open Firefox windows to check APIs related to the user interface, so don't be alarmed. Please let the suite finish before resuming your work.

When the suite is finished, your text console should contain output that looks something like this:

  ----------------------------------------------------------------------
  Ran 61 tests in 4.388s

OK
  Testing reading-data...
  Using binary at '/Applications/Firefox.app/Contents/MacOS/firefox-bin'.
  Using profile at '/var/folders/FL/FLC+17D+ERKgQe4K+HC9pE+++TI/-Tmp-/tmpu26K_5.mozrunner'.
  .info: My ID is 6724fc1b-3ec4-40e2-8583-8061088b3185
  ..
  3 of 3 tests passed.
  OK
  Total time: 4.036381 seconds
  Program terminated successfully.
  Testing all available packages: nsjetpack, test-harness, api-utils, development-mode.
  Using binary at '/Applications/Firefox.app/Contents/MacOS/firefox-bin'.
  Using profile at '/var/folders/FL/FLC+17D+ERKgQe4K+HC9pE+++TI/-Tmp-/tmp-dzeaA.mozrunner'.
  .........................................................................
  .........................................................................
  .........................................................................
  .........................................................................
  .........................................................................
  .........................................................................
  .........................................................................
  .........................................................................
  .........................................................................
  .........................................................................
  .........................................................................
  .........................................................................
  .........................................................................
  .........................................................................
  .........................................................................
  .........................................................................
  .........................................................................
  .........................................................................
  .........................................................................
  .........................................................................
  .........................................................................
  .........................................................................
  .........................................................................
  .........................................................................
  .........................................................................
  .........................................................................
  .........................................................................
  .........................................................................
  .........................................................................
  .........................................................................
  .........................................................................
  .........................................................................
  .........................................................................
  .........................................................................
  .........................................................................
  .........................................................................
  .........................................................................
  .........................................................................
  .........................................................................
  .........................................................................
  .........................................................................
  .........................................................................
  .........................................................................
  .........................................................................
  .........................................................................
  .........................................................................
  ...............................................

3405 of 3405 tests passed.
  OK
  Total time: 43.105498 seconds
  Program terminated successfully.
  All tests were successful. Ship it!

If you get lots of errors instead, that may be a sign that the SDK does not work properly on your system. In that case, please file a bug or send a message to the project mailing list. See the previous section for information on doing so.

Revision Source

<p>If you're having trouble getting the Add-on SDK up and running, don't panic! This page lists some starting points that might help you track down your problem.</p>

<h2 id="Check_Your_Firefox_or_XULRunner">Check Your Firefox or XULRunner</h2>

<p><code>jpm</code> searches well known locations on your system for Firefox or XULRunner. <code>jpm</code> may not have found an installation, or if you have multiple installations, <code>jpm</code> may have found the wrong one. In those cases you need to use <code>jpm</code>'s <code>--binary</code> option. See the <code><a href="/en-US/Add-ons/SDK/Tools/jpm">jpm</a></code> guide for more information.</p>

<p>When you run <code>jpm</code> to test your add-on or run unit tests, it prints out the location of the Firefox or XULRunner binary that it found, so you can check its output to be sure.</p>

<h2 id="Check_Your_Text_Console">Check Your Text Console</h2>

<p>When errors are generated in the SDK's APIs and your code, they are logged to the text console. This should be the same console or shell from which you ran the <code>jpm</code> command.</p>

<h2 id="Don't_Leave_Non-SDK_Files_Lying_Around">Don't Leave Non-SDK Files Lying Around</h2>

<p>Currently the SDK does not gracefully handle files and directories that it does not expect to encounter. If there are empty directories or directories or files that are not related to the SDK inside your <code>addon-sdk</code> directory or its sub-directories, try removing them.</p>

<h2 id="Search_for_Known_Issues">Search for Known Issues</h2>

<p>Someone else might have experienced your problem, too. Other users often post problems to the <a href="https://groups.google.com/group/mozilla-labs-jetpack/topics">project mailing list</a>. You can also browse the list of <a href="https://bugzilla.mozilla.org/buglist.cgi?order=Bug%20Number&amp;resolution=---&amp;resolution=DUPLICATE&amp;query_format=advanced&amp;product=Add-on%20SDK">known issues</a> or <a href="https://bugzilla.mozilla.org/query.cgi?format=advanced&amp;product=Add-on%20SDK">search</a> for specific keywords.</p>

<h2 id="Contact_the_Project_Team_and_User_Group">Contact the Project Team and User Group</h2>

<p>SDK users and project team members discuss problems and proposals on the <a href="https://groups.google.com/group/mozilla-labs-jetpack/topics">project mailing list</a>. Someone else may have had the same problem you do, so try searching the list. You're welcome to post a question, too.</p>

<p>You can also chat with other SDK users in <a href="https://mibbit.com/?channel=%23jetpack&amp;server=irc.mozilla.org">#jetpack</a> on <a href="https://irc.mozilla.org/">Mozilla's IRC network</a>.</p>

<p>And if you'd like to <a href="https://bugzilla.mozilla.org/enter_bug.cgi?product=Add-on%20SDK&amp;component=General">report a bug in the SDK</a>, that's always welcome! You will need to create an account with Bugzilla, Mozilla's bug tracker.</p>

<h2 id="Run_the_SDK's_Unit_Tests">Run the SDK's Unit Tests</h2>

<p>The SDK comes with a suite of tests which ensures that its APIs work correctly. You can run it with the following command:</p>

<pre>
  jpm testall
</pre>

<p>Some of the tests will open Firefox windows to check APIs related to the user interface, so don't be alarmed. Please let the suite finish before resuming your work.</p>

<p>When the suite is finished, your text console should contain output that looks something like this:</p>

<pre>

  ----------------------------------------------------------------------
  Ran 61 tests in 4.388s

OK
  Testing reading-data...
  Using binary at '/Applications/Firefox.app/Contents/MacOS/firefox-bin'.
  Using profile at '/var/folders/FL/FLC+17D+ERKgQe4K+HC9pE+++TI/-Tmp-/tmpu26K_5.mozrunner'.
  .info: My ID is 6724fc1b-3ec4-40e2-8583-8061088b3185
  ..
  3 of 3 tests passed.
  OK
  Total time: 4.036381 seconds
  Program terminated successfully.
  Testing all available packages: nsjetpack, test-harness, api-utils, development-mode.
  Using binary at '/Applications/Firefox.app/Contents/MacOS/firefox-bin'.
  Using profile at '/var/folders/FL/FLC+17D+ERKgQe4K+HC9pE+++TI/-Tmp-/tmp-dzeaA.mozrunner'.
  .........................................................................
  .........................................................................
  .........................................................................
  .........................................................................
  .........................................................................
  .........................................................................
  .........................................................................
  .........................................................................
  .........................................................................
  .........................................................................
  .........................................................................
  .........................................................................
  .........................................................................
  .........................................................................
  .........................................................................
  .........................................................................
  .........................................................................
  .........................................................................
  .........................................................................
  .........................................................................
  .........................................................................
  .........................................................................
  .........................................................................
  .........................................................................
  .........................................................................
  .........................................................................
  .........................................................................
  .........................................................................
  .........................................................................
  .........................................................................
  .........................................................................
  .........................................................................
  .........................................................................
  .........................................................................
  .........................................................................
  .........................................................................
  .........................................................................
  .........................................................................
  .........................................................................
  .........................................................................
  .........................................................................
  .........................................................................
  .........................................................................
  .........................................................................
  .........................................................................
  .........................................................................
  ...............................................

3405 of 3405 tests passed.
  OK
  Total time: 43.105498 seconds
  Program terminated successfully.
  All tests were successful. Ship it!
</pre>

<p>If you get lots of errors instead, that may be a sign that the SDK does not work properly on your system. In that case, please file a bug or send a message to the project mailing list. See the previous section for information on doing so.</p>
Revert to this revision