Question about installing addons

Board for discussions around the Basilisk web browser.

Moderator: Basilisk-Dev

thosrtanner
Lunatic
Lunatic
Posts: 395
Joined: 2014-05-10, 18:19
Location: UK

Question about installing addons

Unread post by thosrtanner » 2019-01-03, 22:06

I have an addon for palemoon (inforss) and I thought I'd try adding it to basilisk to see what happened.

I dropped the xpi into basilisk and nothing appeared to happen. So I went to about:addons. The addon icon is there, it has a title of null, and there is a small blue bar at the left and the text downloaded. And the xpi file is still open, as I cant delete it till i quit basilisk.

I'm at a bit of a loss as to how to proceed from here.

Michaell
Lunatic
Lunatic
Posts: 282
Joined: 2018-05-26, 18:13

Re: Question about installing addons

Unread post by Michaell » 2019-01-04, 00:26

Install fails with no visible feedback. In Error Console:
1546561313898 addons.xpi WARN Add-on inforss-reloaded@addons.palemoon.org is not compatible with application version.
1546561313902 addons.repository DEBUG cacheAddons: enabled false IDs ["inforss-reloaded@addons.palemoon.org"]
EDIT: I did find 2 "Null" entries for it down among the disabled extensions (one for each attempt). They disappeared when I canceled the download (and that was from local install).
Win10home(1709), PM33.0.0-portable as of Feb 1, '24

thosrtanner
Lunatic
Lunatic
Posts: 395
Joined: 2014-05-10, 18:19
Location: UK

Re: Question about installing addons

Unread post by thosrtanner » 2019-01-04, 23:19

Yes, i've tweaked my copy to put the firefox identifier back into install.rdf. I get this in the error console (thanks for reminding me to look there!):

Code: Select all

Timestamp: 04/01/2019 23:16:05
Error: A promise chain failed to handle a rejection. Did you forget to '.catch', or did you forget to 'return'?
See https://developer.mozilla.org/Mozilla/JavaScript_code_modules/Promise.jsm/Promise

Date: Fri Jan 04 2019 23:15:17 GMT+0000 (GMT Standard Time)
Full Message: TypeError: (new TypeError("this.addon._repositoryAddon is null", "resource://gre/modules/addons/XPIProvider.jsm", 5683)) is not iterable
Full Stack: init/<@resource://gre/modules/addons/XPIProvider.jsm:6033:1
TaskImpl_run@resource://gre/modules/Task.jsm:320:42
process@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:935:21
walkerLoop@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:813:7
scheduleWalkerLoop/<@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:747:11

Source File: resource://gre/modules/addons/XPIProvider.jsm
Line: 6033
Source Code:
6033

Michaell
Lunatic
Lunatic
Posts: 282
Joined: 2018-05-26, 18:13

Re: Question about installing addons

Unread post by Michaell » 2019-01-05, 02:47

Changing max Fx version to 56.* (and TB to 59.*) seemed to help, sort of (eliminated one error). But still doesn't install.
Win10home(1709), PM33.0.0-portable as of Feb 1, '24

thosrtanner
Lunatic
Lunatic
Posts: 395
Joined: 2014-05-10, 18:19
Location: UK

Re: Question about installing addons

Unread post by thosrtanner » 2019-01-05, 07:30

So what is different between palemoon and basilisk?

yami_

Re: Question about installing addons

Unread post by yami_ » 2019-01-05, 11:41

User interface, add-on manager, search service, target user base and probably a few other things.

JustOff

Re: Question about installing addons

Unread post by JustOff » 2019-01-05, 11:49

thosrtanner wrote:Yes, i've tweaked my copy to put the firefox identifier back into install.rdf. I get this in the error console

[..]

So what is different between palemoon and basilisk?
In Firefox (and Basilisk) you must provide `em:name` for every locale listed in install.rdf. This superfluous requirement was removed from Pale Moon in Issue #945 (Pale-Moon).

thosrtanner
Lunatic
Lunatic
Posts: 395
Joined: 2014-05-10, 18:19
Location: UK

Re: Question about installing addons

Unread post by thosrtanner » 2019-01-05, 12:30

JustOff wrote:
thosrtanner wrote:Yes, i've tweaked my copy to put the firefox identifier back into install.rdf. I get this in the error console

[..]

So what is different between palemoon and basilisk?
In Firefox (and Basilisk) you must provide `em:name` for every locale listed in install.rdf. This superfluous requirement was removed from Pale Moon in Issue #945 (Pale-Moon).
Could the same change be done for basilisk?

thosrtanner
Lunatic
Lunatic
Posts: 395
Joined: 2014-05-10, 18:19
Location: UK

Re: Question about installing addons

Unread post by thosrtanner » 2019-01-05, 16:17

Further note - after giving the extension a fake name in my *current locale* (so the problem is actually slightly worse than mentioned in your original pull request - if you don't provide a name in the currently selected locale, the install will hang. not just in the us locale)), I get a bit further. However, it appears to be not loading up parts of the overlay - it is clearly running the code in the <script> tag but doesn't appear to have loaded any of the other elements into the document so that document.getElementById is returning null values

JustOff

Re: Question about installing addons

Unread post by JustOff » 2019-01-05, 20:50

thosrtanner wrote:Could the same change be done for basilisk?
Theoretically yes, although I’m not sure that this edge case is really worth the attention, considering that all Firefox extensions that are compatible with Basilisk already satisfy the requirement to specify a name in each locale. I think it will be easier if you simply do the same.
thosrtanner wrote:However, it appears to be not loading up parts of the overlay - it is clearly running the code in the <script> tag but doesn't appear to have loaded any of the other elements into the document so that document.getElementById is returning null values
You should not forget that Basilisk does not have an addon bar, and even if you install Status-4-Evar, you can't expect it to be created before your add-on is initialized. However, if you add the Inforss panel to the main toolbar and restart the browser, then everything seems to work fine.

thosrtanner
Lunatic
Lunatic
Posts: 395
Joined: 2014-05-10, 18:19
Location: UK

Re: Question about installing addons

Unread post by thosrtanner » 2019-01-06, 08:00

JustOff wrote:
thosrtanner wrote:Could the same change be done for basilisk?
Theoretically yes, although I’m not sure that this edge case is really worth the attention, considering that all Firefox extensions that are compatible with Basilisk already satisfy the requirement to specify a name in each locale. I think it will be easier if you simply do the same.

Well I do have 25 localisations in there
JustOff wrote:
thosrtanner wrote:However, it appears to be not loading up parts of the overlay - it is clearly running the code in the <script> tag but doesn't appear to have loaded any of the other elements into the document so that document.getElementById is returning null values
You should not forget that Basilisk does not have an addon bar, and even if you install Status-4-Evar, you can't expect it to be created before your add-on is initialized. However, if you add the Inforss panel to the main toolbar and restart the browser, then everything seems to work fine.
I'll have a play with doing that automatically then

JustOff

Re: Question about installing addons

Unread post by JustOff » 2019-01-06, 11:59

thosrtanner wrote:Well I do have 25 localisations in there
Well, see Issue #925 (UXP).

thosrtanner
Lunatic
Lunatic
Posts: 395
Joined: 2014-05-10, 18:19
Location: UK

Re: Question about installing addons

Unread post by thosrtanner » 2019-01-06, 18:49

JustOff wrote:
thosrtanner wrote:Well I do have 25 localisations in there
Well, see Issue #925 (UXP).
You de man! Thank you!

thosrtanner
Lunatic
Lunatic
Posts: 395
Joined: 2014-05-10, 18:19
Location: UK

Re: Question about installing addons

Unread post by thosrtanner » 2019-02-10, 20:59

well, that was interesting

I added a <toolbox></toolbox> pair round the <toolbar> and changed the ID of the toolbar. I'm not quite sure what I did but for a while I had the new ticker bar either at the bottom or top of the page, as in palemoon. I 'cleaned it up a bit' and now I can't make it behave like that any more. And the behaviour of the status bar is very strange. On palemoon, even though I have a different id now, my news feeds still appear in the status bar. On basilisk, there is still an "addon-bar" toolbar but it doesn't like it much if you do things with it, though there is something that displays the link targets at the bottom of the window.

New Tobin Paradigm

Re: Question about installing addons

Unread post by New Tobin Paradigm » 2019-02-10, 21:35

What you see in Basilisk's browser.xul is a shim. Not the real addon-bar functioning bar... http://xref.palemoon.org/uxp-trunk/source/application/basilisk/base/content/browser.xul#936

See https://bugzilla.mozilla.org/show_bug.cgi?id=749804 tl;dr the shim does translation from the addon-bar to CustomizableUI.

The only way to use it as the real thing again is to use CTR.

thosrtanner
Lunatic
Lunatic
Posts: 395
Joined: 2014-05-10, 18:19
Location: UK

Re: Question about installing addons

Unread post by thosrtanner » 2019-02-10, 22:28

CTR? What's that please?

(Also right at the end of that bug - let it die a slow stagnant death. hahaha)

coffeebreak
Moon Magic practitioner
Moon Magic practitioner
Posts: 2986
Joined: 2015-09-26, 04:51
Location: U.S.

Re: Question about installing addons

Unread post by coffeebreak » 2019-02-10, 22:35

thosrtanner wrote:CTR? What's that please?

Classic Theme Restorer

thosrtanner
Lunatic
Lunatic
Posts: 395
Joined: 2014-05-10, 18:19
Location: UK

Re: Question about installing addons

Unread post by thosrtanner » 2019-02-13, 22:08

So, as noted above, I got this to work in basilisk by wrapping the toolbar in <toolbox> tags and renaming it to inforss-addon-bar. A little bit of code juggling gets me top and bottom bars (and rather strangely something that looks like a status bar). This still seems to work on palemoon, but the display when on the statusbar is altered somewhat. The news ticker and buttons end up on the right of the gripper and the 'spring' element on the left seems to have disappeared (there's no space left, and you can't do a document.getElementById on the id of it for instance).

The documentation on toolbars, toolboxes, and how the overlaying works is a little sparse so any assistance would be gratefully received.

Locked