Closed
Bug 786330
Opened 13 years ago
Closed 13 years ago
Unable to resolve jetpack compilation errors after accidential upgrade to "addon kit" 1.9 (builder.addons.mozilla.org)
Categories
(addons.mozilla.org Graveyard :: Add-on Builder, defect)
addons.mozilla.org Graveyard
Add-on Builder
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 781698
People
(Reporter: hendrik.luecke-tieke, Unassigned)
Details
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20100101 Firefox/15.0
Build ID: 20120824154833
Steps to reproduce:
I accidentially switched the addon kit library binding. i had a working addon w/ addon kit v. 1.6.1. Then i switched to addon kit v. 1.9.
https://builder.addons.mozilla.org/package/62589/revision/868/
Actual results:
Error message was "XPI not built" -- nothing else.
Expected results:
a) downgrade to 1.6.1 should be possible
b) detailed information about api changes which prevent successful compilation would be helpful to easen bugfixing
Component: General → Add-on Builder
Product: Add-on SDK → addons.mozilla.org
So, I got your add-on to install by making a few changes.
The problem you were experiencing is that the SDK no longer allows direct usage of "Components" anywhere in your add-on.
When I replaced every instance of "Components" ("Components.interfaces", "Components.classes", "Components.utils") with "Ci", "Cc", and "Cu", the add-on was able to be downloaded and installed.
You first need to change your require("chrome") line to look like this:
var {Cc, Ci, Cu} = require("chrome");
Then make all of the changes in the file to replace "Components".
There's also an issue where Cu.import("somefile.jsm") doesn't import the module into the addon's scope (bug 683217), so there's some changes needed for the modules you import:
If you change it from:
Components.utils.import("resource://gre/modules/Services.jsm");
Components.utils("resource://gre/modules/FileUtils.jsm");
to:
var {Services} = Cu.import("resource://gre/modules/Services.jsm");
var {FileUtils} = Cu.import("resource://gre/modules/FileUtils.jsm");
It should then work just fine.
A copy of your addon with these changes made is available here, if you want to look at it: https://builder.addons.mozilla.org/package/150099/latest/
But yeah, Builder should surface more explicit errors (at least in this case where it chokes on "Components").
Status: UNCONFIRMED → NEW
Ever confirmed: true
(In reply to Wes Kocher (:KWierso) from comment #1)
> (at least in this case where it chokes on "Components")
Which is already filed as bug 781698.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → DUPLICATE
| Reporter | ||
Comment 3•13 years ago
|
||
(In reply to Wes Kocher (:KWierso) from comment #1)
> So, I got your add-on to install by making a few changes.
> The problem you were experiencing is that the SDK no longer allows direct
wow. thanks. although this might be useless waste of disk space, i have to say that this is far more support than i expected when filing this bug.
| Assignee | ||
Updated•11 years ago
|
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•