jpm run shows demo ActionButton, but jpm xpi does not

139 Views Asked by At

Broken MDN demo

I copied the very first demo, added my own custom icons, nothing else. Tested this using jpm run, works fine, buttons appear in the navigation bar, can be customized and move around, clicking button opens the tab to mozilla.org as expected, great.

jpm xpi, installation generates two error messages, the same as mentioned in a similar question, but unlike that question, the icon won't even show up anywhere in the interface.

However, if I exit then restart the browser with -jsconsole, I do not get this error message, yet still get no button appearing anywhere.

This error message is confusing, as everything it mentions is low level and has nothing to do with any of the very basic high level code I have entered.

[Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIURI.hostPort]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: resource://gre/modules/PopupNotifications.jsm :: PopupNotifications_refreshPanel/< :: line 667"  data: no]

PopupNotifications_refreshPanel/<()
PopupNotifications.jsm:667
forEach()
self-hosted
PopupNotifications_refreshPanel()
PopupNotifications.jsm:616
PopupNotifications_showPanel()
PopupNotifications.jsm:728
PopupNotifications_update()
PopupNotifications.jsm:844
PopupNotifications_show()
PopupNotifications.jsm:394
gXPInstallObserver.showInstallConfirmation()
browser-addons.js:206
gXPInstallObserver.observe/showNotification()
browser-addons.js:383
gXPInstallObserver.observe()
browser-addons.js:399
notifyObservers()
amWebInstallListener.js:51
Installer.prototype.checkAllDownloaded()
amWebInstallListener.js:171
Installer()
amWebInstallListener.js:81
extWebInstallListener.prototype.onWebInstallRequested()
amWebInstallListener.js:335
buildNextInstall()
extensions.js:1276
gViewController.commands.cmd_installFromFile.doCommand/buildNextInstall/<()
extensions.js:1286
safeCall()
AddonManager.jsm:179
AddonManagerInternal.getInstallForFile/<.nextObject/<()
AddonManager.jsm:1955
this.XPIProvider.getInstallForFile/<()
XPIProvider.jsm:3872
makeSafe/<()
XPIProvider.jsm:1982
AddonInstall.prototype.initLocalInstall/</<()
XPIProvider.jsm:5306
makeSafe/<()
XPIProviderUtils.js:168
completeAddon()
XPIProviderUtils.js:157
getAddon()
AddonRepository.jsm:583
this.AddonRepository.getCachedAddonByID<()
AddonRepository.jsm:595
next()
self-hosted
TaskImpl_run()
Task.jsm:319
TaskImpl()
Task.jsm:280
createAsyncFunction/asyncFunction()
Task.jsm:254
getRepositoryAddon()
XPIProviderUtils.js:159
this.XPIDatabase.getAddon/<()
XPIProviderUtils.js:1119
Handler.prototype.process()
Promise-backend.js:937
this.PromiseWalker.walkerLoop()
Promise-backend.js:816
bound ()
self-hosted
bound bound ()
self-hosted
(unknown)

[Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIURI.hostPort]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: resource://gre/modules/PopupNotifications.jsm :: PopupNotifications_refreshPanel/< :: line 667"  data: no]

PopupNotifications_refreshPanel/<()
PopupNotifications.jsm:667
forEach()
self-hosted
PopupNotifications_refreshPanel()
PopupNotifications.jsm:616
PopupNotifications_showPanel()
PopupNotifications.jsm:728
PopupNotifications_update()
PopupNotifications.jsm:844
PopupNotifications_show()
PopupNotifications.jsm:394
gXPInstallObserver.observe()
browser-addons.js:432
notifyObservers()
amWebInstallListener.js:51
Installer.prototype.checkAllInstalled()
amWebInstallListener.js:230
Installer.prototype.onInstallEnded()
amWebInstallListener.js:270
AddonManagerInternal.callInstallListeners()
AddonManager.jsm:1716
this.AddonManagerPrivate.callInstallListeners()
AddonManager.jsm:2976
AddonInstall.prototype.startInstall/<()
XPIProvider.jsm:6212
InterpretGeneratorResume()
self-hosted
next()
self-hosted
TaskImpl_run()
Task.jsm:319
bound TaskImpl_run()
self-hosted
Handler.prototype.process()
Promise-backend.js:937
this.PromiseWalker.walkerLoop()
Promise-backend.js:816
bound ()
self-hosted
bound bound ()
self-hosted
(unknown)

There is mention in about:config @ browser.uiCustomization.state (or in user.pref) about where the icon is SUPPOSED to be, but it is not actually THERE. Note \"action-button--GUID-mozilla-link\" below. This bug is happening in 49.0a1 nightly, but not in 50.0a1 nightly, so maybe it was fixed?

user_pref("browser.uiCustomization.state", "{\"placements\":{\"PanelUI-contents\":[\"edit-controls\",\"zoom-controls\",\"new-window-button\",\"e10s-button\",\"privatebrowsing-button\",\"save-page-button\",\"print-button\",\"history-panelmenu\",\"fullscreen-button\",\"find-button\",\"preferences-button\",\"add-ons-button\",\"developer-button\",\"sync-button\",\"bookmarks-menu-button\",\"home-button\",\"loop-button\",\"pocket-button\"],\"addon-bar\":[\"addonbar-closebutton\",\"status-bar\"],\"PersonalToolbar\":[\"personal-bookmarks\"],\"nav-bar\":[\"urlbar-container\",\"search-container\",\"downloads-button\",\"action-button--GUID-mozilla-link\"],\"TabsToolbar\":[\"tabbrowser-tabs\",\"new-tab-button\",\"alltabs-button\"],\"toolbar-menubar\":[\"menubar-items\"]},\"seen\":[\"loop-button\",\"pocket-button\",\"developer-button\",\"action-button--GUID-mozilla-link\"],\"dirtyAreaCache\":[\"nav-bar\",\"PanelUI-contents\",\"addon-bar\",\"PersonalToolbar\",\"TabsToolbar\",\"toolbar-menubar\"],\"currentVersion\":6,\"newElementCount\":173}");

After comparing 49.0a1 to 50.0a1, and ensuring all button icons are in the same order, the only difference is 49.0a1 has newElementCount = 173 and 50.0a1 has newElementCount = 0.

After customize -> reset in 49.0a1, the demo action button "appears", somewhat, in "Additional Tools and Features", but only as a text label. The icon is not visible. The button can't be moved around "properly", in that the click and drag / hover / index of the position it would land in, is incorrect, and when dropped, it lands "nowhere", disappears from the UI, yet the user pref appears to remain valid.

0

There are 0 best solutions below