Search code examples
firefoxfirefox-addonfirefox-addon-sdk

has no authority to load: sdk/window/utils (Firefox addon SDK)


In my Main.js

const { getMostRecentBrowserWindow } = require('sdk/window/utils');
var chromewin = getMostRecentBrowserWindow();
chromewin.PrintUtils.printPreview(chromewin.PrintPreviewListener);

Browser console warning: "Module: .../main has no authority to load: sdk/window/utils"


Solution

  • Your addon contains a corrupted or otherwise incomplete harness-options.json. Either rebuild your addon with a fresh copy of Addon SDK, or (more tricky) manually edit harness-options.json so that under the requirements section all required modules are listed.