Closed Bug 598720 Opened 14 years ago Closed 14 years ago

TypeError: options.manifest is undefined exception installing addon from Add-on Builder via Helper

Categories

(Mozilla Labs Graveyard :: FlightDeck, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: myk, Assigned: avarma)

References

Details

Attachments

(3 files, 1 obsolete file)

After installing Add-on Builder Helper in Firefox 3.6, restarting the browser, going to the Add-on Builder staging site <https://lm-app-flightdeck-stage01.mozillalabs.com/>, and pressing the Test button for the Translator addon <https://lm-app-flightdeck-stage01.mozillalabs.com/addon/1000190/latest/>, the following error appears in the Error Console, and the addon does not work (going to a page, selecting text on it, and then context-clicking displays a context menu that does not include the addon's item):

error: An exception occurred.
Traceback (most recent call last):
  File "sendToChrome", line NaN, in sendToChrom
  File "resource://jid0-t3eerqgganlch9c50lpqctdunng-addons-builder-helper-lib/addons-builder-helper.js", line 37, in 
    return func.apply(this, arguments);
  File "resource://jid0-t3eerqgganlch9c50lpqctdunng-addons-builder-helper-lib/addons-builder-helper.js", line 62, in onMessage
    addonManager.install(data.contents);
  File "resource://jid0-t3eerqgganlch9c50lpqctdunng-addons-builder-helper-lib/addons-builder-helper.js", line 95, in install
    currExtension = installExtension(xpiData);
  File "resource://jid0-t3eerqgganlch9c50lpqctdunng-addons-builder-helper-lib/addons-builder-helper.js", line 30, in installExtension
    var ext = installAndRun(myDir, tempXPI);
  File "resource://jid0-t3eerqgganlch9c50lpqctdunng-addons-builder-helper-lib/addons-builder-helper.js", line 17, in installAndRun
    __proto__: require("bootstrap").run(manifest, installPath, print)
  File "resource://jid0-t3eerqgganlch9c50lpqctdunng-development-mode-lib/bootstrap.js", line 132, in run
    harnessService.load();
  File "file:///Users/myk/Library/Application%20Support/Firefox/Profiles/j50wskkw.Default%20User/extensions/jid0-t3eeRQgGANLCH9c50lPqcTDuNng@jetpack/components/harness.js", line 346, in Harness_load
    this.loader.console.exception(e);
  File "file:///Users/myk/Library/Application%20Support/Firefox/Profiles/j50wskkw.Default%20User/extensions/jid0-t3eeRQgGANLCH9c50lPqcTDuNng@jetpack/components/harness.js", line 318, in 
    loader = buildLoader();
  File "file:///Users/myk/Library/Application%20Support/Firefox/Profiles/j50wskkw.Default%20User/extensions/jid0-t3eeRQgGANLCH9c50lPqcTDuNng@jetpack/components/harness.js", line 183, in buildLoader
    var packaging = new Packaging();
  File "file:///Users/myk/Library/Application%20Support/Firefox/Profiles/j50wskkw.Default%20User/extensions/jid0-t3eeRQgGANLCH9c50lPqcTDuNng@jetpack/components/harness.js", line 203, in Packaging
    options.manifest.forEach(
TypeError: options.manifest is undefined

Atul: any idea what might be going on here?
ack. i suspect some of the changes made by bug 591515 may have to do with this. 

But also, I just realized that if the addons builder helper is bootstrapping an addon built with a *different* version of the sdk than was used to build it--i.e., if the addons builder helper was built with SDK 0.8pre but the addon it's bootstrapping was built with the 0.7 SDK--then this may cause problems. Ugh!

Will look into this more closely now.
Assignee: nobody → avarma
Status: NEW → ASSIGNED
Yep, that's the problem. I actually noted the flaw here when I originally wrote the code:

http://hg.mozilla.org/labs/jetpack-sdk/file/3517e0133425/packages/development-mode/lib/bootstrap.js#l109

Oops.
Attached patch WIP (obsolete) — Splinter Review
Attached patch WIPSplinter Review
Attachment #477652 - Attachment is obsolete: true
This WIP appears to work, though I'm concerned about its behavior on Gecko 1.9.*. It also appears to double-log console messages, at least when the code is invoked via 'cfx develop'.
I talked to Myk and we agreed that we'd wait to land this after the tree thaws post-0.8, since this patch only really affects the addon builder helper.
However, note that the changes have been landed in Add-on Builder Helper, resolving the release blocker.

Atul: can you file a new bug on landing the SDK changes and ask for review on those changes?
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Product: Mozilla Labs → Mozilla Labs Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: