File: troubleshooting.md

package info (click to toggle)
xulrunner 24.8.1esr-2~deb7u1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 796,452 kB
  • sloc: cpp: 3,181,607; ansic: 1,641,175; python: 167,590; java: 128,022; asm: 118,009; xml: 75,870; sh: 70,457; makefile: 50,358; perl: 21,413; objc: 4,014; yacc: 2,066; pascal: 995; lex: 982; exp: 449; php: 244; lisp: 228; awk: 211; sed: 61; csh: 31; ada: 16; ruby: 3
file content (208 lines) | stat: -rw-r--r-- 9,114 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
<!-- This Source Code Form is subject to the terms of the Mozilla Public
   - License, v. 2.0. If a copy of the MPL was not distributed with this
   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->

# Troubleshooting #

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.

Quarantine Problem on Mac OS X
------------------------------
On Mac OS X, you might see the following error when you try to run `cfx`:

<pre>
/path/to/sdk/bin/cfx: /usr/bin/env: bad interpreter: Operation not permitted
</pre>

This might be because the `cfx` executable file has been placed in quarantine
during download from the Internet.

To get it out of quarantine, use the `xattr -d` command, specifying
`com.apple.quarantine` as the name of the attribute to delete, and `cfx` as
the file from which to delete that attribute:

<pre>
xattr -d com.apple.quarantine /path/to/sdk/bin/cfx
</pre>

Check Your Python
-----------------

The SDK's `cfx` tool runs on Python.  If you're having trouble getting `cfx` to
run at all, make sure you have Python correctly installed.

Try running the following from a command line:

<pre>
  python --version
</pre>

`cfx` currently expects Python 2.5 or 2.6.  Older and newer versions may or may
not work.


Check Your Firefox or XULRunner
-------------------------------

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

When you run `cfx` 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.

[cfx Tool]: dev-guide/cfx-tool.html


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 `cfx` 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][jetpack-list].  You can also browse the
list of [known issues][bugzilla-known] or [search][bugzilla-search] for
specific keywords.

[bugzilla-known]: https://bugzilla.mozilla.org/buglist.cgi?order=Bug%20Number&resolution=---&resolution=DUPLICATE&query_format=advanced&product=Add-on%20SDK

[bugzilla-search]: https://bugzilla.mozilla.org/query.cgi?format=advanced&product=Add-on%20SDK


Contact the Project Team and User Group
---------------------------------------

SDK users and project team members discuss problems and proposals on the
[project mailing list][jetpack-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][#jetpack] on
[Mozilla's IRC network][IRC].

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

[jetpack-list]: http://groups.google.com/group/mozilla-labs-jetpack/topics

[#jetpack]:http://mibbit.com/?channel=%23jetpack&server=irc.mozilla.org

[IRC]: http://irc.mozilla.org/

[bugzilla-report]: https://bugzilla.mozilla.org/enter_bug.cgi?product=Add-on%20SDK&component=General


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:

<pre>
  cfx testall
</pre>

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:

<pre>
  Testing cfx...
  .............................................................
  ----------------------------------------------------------------------
  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>

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.