[Signed fixed extension attached] CB broken on Firefox 48+

Post information about bugs here

Re: [Signed fixed extension attached] CB broken on Firefox 4

Postby trapper john » Sat Sep 30, 2017 12:17 am

@ morat, rather than install CB through the addon page I just go to the extension folder in the profile, delete the old version and copy in the new one (with the right name: "custombuttons@xsms.org"), then restart firefox. I too was having a problem with the signed version, even using the method of copying it into the extension folder as firefox wouldn't recognize it but the unsigned one works fine.
trapper john
 
Posts: 108
Joined: Wed Mar 14, 2012 6:58 pm

Re: [Signed fixed extension attached] CB broken on Firefox 4

Postby morat » Sat Sep 30, 2017 4:08 am

@trapper john

I'm using a fresh install so I can't delete the old version.

Are you using Fx Nightly 57 or Fx Beta 57?

I think the extensions.legacy.enabled preference is only for Fx Nightly 57, not Fx Beta 57.

http://forums.mozillazine.org/viewtopic ... #p14768507
morat
 
Posts: 945
Joined: Wed Dec 28, 2011 2:38 pm

Re: [Signed fixed extension attached] CB broken on Firefox 4

Postby trapper john » Sat Sep 30, 2017 1:15 pm

The profile I'm using now with nightly v58 was carried over from v56 so a previous version of CB was already there.

Try downloading a 56 firefox, create a fresh profile, install an older CB then update firefox to 57 with that. But that probably won't work either for the beta without a hack since legacy addons are disabled and can't be used. I'm hoping someone comes up with a hack by v59 so we can use it with the esr version if the xul code is still there.
trapper john
 
Posts: 108
Joined: Wed Mar 14, 2012 6:58 pm

Re: [Signed fixed extension attached] CB broken on Firefox 4

Postby morat » Thu Oct 05, 2017 9:22 am

@Infocatcher

I got Custom Buttons, Attributes Inspector and DOM Inspector working with Fx Beta 57.

I had to hack the omni.ja file.

Thanks again.

Reference
http://dxr.mozilla.org/mozilla-beta/sou ... ttings.jsm
morat
 
Posts: 945
Joined: Wed Dec 28, 2011 2:38 pm

Re: [Signed fixed extension attached] CB broken on Firefox 4

Postby trapper john » Thu Oct 05, 2017 5:35 pm

@morat, I found that code in AddonSettings.jsm. What change to it did you make to enable addons in beta? I compared the code in 57 beta and 58 nightly and they're exactly the same.
trapper john
 
Posts: 108
Joined: Wed Mar 14, 2012 6:58 pm

Re: [Signed fixed extension attached] CB broken on Firefox 4

Postby morat » Thu Oct 05, 2017 10:12 pm

@trapper john

The AppConstants object is different in Fx Nightly 57 and Fx Beta 57.

Don't allow legacy extensions in beta/release builds post-57
http://bugzilla.mozilla.org/show_bug.cgi?id=1363897

Code: Select all
// Scratchpad Browser Environment in Fx Beta 57

// set devtools.chrome.enabled pref to true
// open about:addons in current tab

alert(content.AppConstants.MOZ_ADDON_SIGNING);           // true
alert(content.AppConstants.MOZ_REQUIRE_SIGNING);         // true
alert(content.AppConstants.MOZ_ALLOW_LEGACY_EXTENSIONS); // false

alert(content.AddonSettings.ADDON_SIGNING);           // true
alert(content.AddonSettings.REQUIRE_SIGNING);         // true  // false after hack
alert(content.AddonSettings.ALLOW_LEGACY_EXTENSIONS); // false // true  after hack

Reference
http://dxr.mozilla.org/mozilla-beta/source/toolkit/modules/AppConstants.jsm
http://dxr.mozilla.org/mozilla-beta/source/toolkit/mozapps/extensions/internal/AddonSettings.jsm

view-source:resource://gre/modules/AppConstants.jsm
view-source:resource://gre/modules/addons/AddonSettings.jsm

Fx Beta 57 isn't using brotli compression. (able to extract omni.ja with Info-Zip unzip.exe)

Command Prompt:

rem Usage: optimizejars.py --deoptimize "JAR_LOG_DIR" "IN_JAR_DIR" "OUT_JAR_DIR"
optimizejars.py --deoptimize "%TEMP%" "C:\FirefoxPortableTest\App\Firefox" "C:\."

cd /d C:\
unzip omni.ja modules/addons/AddonSettings.jsm
gvim modules/addons/AddonSettings.jsm

Code: Select all
- if (AppConstants.MOZ_REQUIRE_SIGNING && !Cu.isInAutomation) {
+ if (false && AppConstants.MOZ_REQUIRE_SIGNING && !Cu.isInAutomation) {

Code: Select all
- if (AppConstants.MOZ_ALLOW_LEGACY_EXTENSIONS || Cu.isInAutomation) {
+ if (true || AppConstants.MOZ_ALLOW_LEGACY_EXTENSIONS || Cu.isInAutomation) {

zip omni.ja modules/addons/AddonSettings.jsm

cd /d C:\FirefoxPortableTest\App\Firefox
ren omni.ja omni.ja.backup
copy C:\omni.ja

cd /d C:\FirefoxPortableTest
FirefoxPortable.exe -purgecaches

And remember to set the following preferences in the about:config page.

extensions.allow-non-mpc-extensions = true
extensions.legacy.enabled = true
xpinstall.signatures.required = false
morat
 
Posts: 945
Joined: Wed Dec 28, 2011 2:38 pm

Re: [Signed fixed extension attached] CB broken on Firefox 4

Postby trapper john » Thu Oct 05, 2017 10:55 pm

Thanks morat, there was nothing to it. Made the change and 57 beta booted up with custom buttons working like a charm. If it stays like this through v59 we should be able to do the same with 59esr.

For deoptimizing and optimizing I'm using python 2.7. There's an updated optimizejars.py that can be gotten here:

https://www.raymond.cc/blog/edit-files- ... -password/
trapper john
 
Posts: 108
Joined: Wed Mar 14, 2012 6:58 pm

Re: [Signed fixed extension attached] CB broken on Firefox 4

Postby morat » Fri Oct 06, 2017 12:39 am

@trapper john

We are screwed if the developers start using brotli compression again.

http://forums.mozillazine.org/viewtopic ... #p14764954
http://forums.mozillazine.org/viewtopic ... #p14765149

trapper john wrote:Thanks morat, there was nothing to it.

You're welcome.
morat
 
Posts: 945
Joined: Wed Dec 28, 2011 2:38 pm

Re: [Signed fixed extension attached] CB broken on Firefox 4

Postby avada » Fri Oct 06, 2017 10:26 am

Infocatcher wrote:Something for Firefox 57:
Signed: custom_buttons-0.0.5.8.9-fixed5-signed.xpi
Not signed: custom_buttons-0.0.5.8.9-fixed5.xpi

+ in about:config:
extensions.allow-non-mpc-extensions = true
extensions.legacy.enabled = true

Many thanks to Dumby.


Thanks a lot!

It works fine on FF56 also.
avada
 
Posts: 10
Joined: Tue Sep 13, 2016 9:24 pm

Re: [Signed fixed extension attached] CB broken on Firefox 4

Postby Infocatcher » Tue Oct 17, 2017 8:54 am

[x] Fixed external editor.
[x] Workaround for double initialization in SeaMonkey (extensions.custombuttons.preventDoubleInitialization preference).

Signed: custom_buttons-0.0.5.8.9-fixed6-signed.xpi
Not signed: custom_buttons-0.0.5.8.9-fixed6.xpi
Attachments
custom_buttons-0.0.5.8.9-fixed6.xpi.zip
Not signed version
(117.39 KiB) Downloaded 79 times
custom_buttons-0.0.5.8.9-fixed6-signed.xpi.zip
Signed version
(126.81 KiB) Downloaded 169 times
Infocatcher
 
Posts: 123
Joined: Sat Jul 21, 2012 5:04 pm

PreviousNext

Return to Bug report

cron