Open onemen opened 1 year ago
Possibly, at least if you want to keep using scripts that XiaoXiaoFlood has made. Alternatively, there's other loaders out there, like Alice's and MrOtherGuy's loaders, that do have recent commits. Though XiaoXiaoFlood's scripts will need to be modified to function properly with those. Userchrome.org is pretty useful for a small place for general Firefox modification information, if that's of interest.
Thus, I don't think this modification is necessary. Don't know though. Have you tried using it without this change, but keeping the other ones for
Services
that you've made?
If you try loading resource://gre/modules/Timer.jsm
or the other files in Firefox 117, the file is no longer available, so I assumed the change was necessary. I don't know for sure though, someone more knowledgeable would have to confirm.
@onemen @sdavidg Thanks so much for the fixes! ❤️
Can you share your brief debugging process? Specifically, how did you figure out that the problem was in importing the services? Did you look at FF release notes / changelogs to figure this out? Or, did you look at some logs and those logs had the import errors? If so, can you share where these logs are?
Apologies as these might be super-obvious questions, but I just couldn't figure it out 🥺
@onemen found the main bug in userChrome.jsm
To fix the scripts, I use the console CTRL+SHIFT+ALT+I This console shows the errors of the scripts that are being executed, and you can also directly run the code you need to test
For example, if you load passwordManager.xhtml, the console shows the following
@onemen @sdavidg The fix is broken again in today's nightly build (Aug 11). DTA is enabled but doesn't show up in context menus.
So, to be clear, things only started to break yet again in ff117? Everything was fine in 116? Rather annoying that both the loader and the extensions broke.
Has anyone filed a bug report or complained to Mozilla to stop breaking Firefox?
Has anyone filed a bug report or complained to Mozilla to stop breaking Firefox?
Why would they care, they're just doing the things they need to. They do not owe us modders anything.
You must be new to any modding scene ever.
new? lol no, not too new... been using this extension loader to use TabMixPlus again.. one of my favorite adons.. because Mozilla scrapped there XUL extension system in favor of the inferior Web-Extension API... They alienated most of there advanced user base when they did that.
I have been using Firefox since the early days since v2 or v4 I think,, and extensions since the whenever they first started... :D
Yeah you might not be new to using Firefox, but you clearly know nothing about modding and the intentional lack of support companies are willing to give to modders and mod users because its not something they can support other than whatever first party support exists if any.
You'll just have your (false) "bug" report instantly closed or your emails ignored if you even try. It's up to us to fix it, and fix it I did. I just don't know for sure why my method doesn't work for anyone else.
There's plenty of suggestions in this thread to try.
Seeing all the breakage, I upgraded to only ff116, from FF109. Only DTA seems to broken, and some CSS.
Anything can be done for DTA to function?
Found an updated version in another issue.
@Cynosphere commented on Aug 2, 2023, 1:13 AM GMT+2:
Readding
cmanifest.append("chrome.manifest");
and splittingCu.import("chrome://userchromejs/content/BootstrapLoader.jsm");
into its own try catch block fixed it somehow.Legacy extensions need to be manually re-enabled via extensions list userscript; but most will need fixing, along with userscripts that import Services or what not.
Originally posted by @Cynosphere in https://github.com/xiaoxiaoflood/firefox-scripts/issues/265#issuecomment-1661225927
Where can I find the extensions list userscript? I only have an extensions options menu script.
Where can I find the extensions list userscript? I only have an extensions options menu script.
That's the one. Just right click the legacy extension thats disabled to re-enable it.
@Cynosphere If only I knew when I had bunch of them permanently disabled.
Has anyone filed a bug report or complained to Mozilla to stop breaking Firefox?
Why would they care, they're just doing the things they need to. They do not owe us modders anything.
You must be new to any modding scene ever.
it's their fault we have to resort to hacks though, and they repeatedly promised everything will be fine so... there are still some people at Mozilla that actually care but they need help proving some features are important
Yes, people used to complain all the time, and Mozilla realised they had a problem with breaking addons with updates. Too many addons, hooking into any and every part of Firefox internals, meant that eventually they could not update anything without a good chance of it breaking some addon. Their solution to this was WebExtensions. This freed them to make breaking changes to internals without worrying about breaking addons, as the WebExtension API would remain unchanged.
Luckily for us they didn't make it completely impossible to still use full addons, just difficult. The unwritten agreement is, you can still use these, but Mozilla will make no effort not to break them and it's up to you to fix up compatibility whenever necessary. If you want to make addons which Mozilla supports with compatibility in future releases, make WebExtensions.
Of course the other side of the coin was that they were supposed to enhance the WebExtensions API with the functionality that people requested for their addons, but that has sadly mostly not happened.
they were supposed to make all the most important extensions at the very least possible with WE before flipping the kill switch (or in the next few releases at worst) and yet Tab Mix Plus, Fire Gestures, Dorando, DTA and few others providing core features that should've been supported natively in the first place still can't be made with WE
there was a clear paradigm shift and misleading communication
the opening post of this issue ticket worked!. I modified my jsm files in the chrome\util folder and it worked! used the installer method after upgrading my util folder.
Not working for me(( Tried new files. Tried clear startup cache folder, with button and with -purgecaches. Addon not even appearing in addons page. Came here from tabmix plus, can't imagine using Firefox without it.
UPD Turns out 117 turned 'extensions.experiments.enabled' option in config off! Now everything is working.
Hello, my statusbar doesn't working even with the new changes from the first post. May be I make it wrong somewhere. Could domeone send the edited files?
@mozo78,
which extensions, scripts are you using for the statusbar
?
I don't know. I copied the files as it's shown on the wiki and it worked. I have statusbar for one or two years (I'm not sure but it has been a long time since I'm using it). Now it disappeared. How can I check which scripts I'm using? Should a screenshot do the trick?
Thank you very much for your answer!
@mozo78, scripts are located in your profile chrome folder. list your extensions and scripts
As far as I can see, there aren't any scripts:
May be I have to mention that I'm on Linux if this matters.
Here's the content of my files: BootstrapLoader.jsm: https://pastebin.com/vRHjxzB7 RDFDataSource.jsm: https://pastebin.com/GDzLr0fq userChrome.jsm: https://pastebin.com/qipx7kqa xPref.jsm: https://pastebin.com/BeCKLq4j
Do you see any errors? Are they edited correctly?
@mozo78
all the files that ends with .uc.js are scripts.
probably the file status-bar.uc.js is the script for shewing the statusbar
Ok, here it's contents: https://pastebin.com/RGGgefRu I never edited it. it's the original file from here :)
Unfortunately it doesn't work. I cleared the startup cache but it doesn't help :(
As far as I can see, there aren't any scripts:
May be I have to mention that I'm on Linux if this matters.
Your folder structure is wrong. The root chrome directory should not contain .jsm
files. You have files unrelated to this bootloader there, and I can only assume that you've used another in the past. When you're dealing with these kinds of things, make sure you've properly removed the offending files from previous bootloaders if you've switched to a new one.
At this point, I think it's better that you simply go through and remove all bootloader files, which includes the utils
folder's bootloader files, and install xiaoxiaoflood's bootloader again afterwards. Do remember that unless you download a pre-modified zip from this thread, you must change them manually for them to function similarly to before.
Oh, yes, it's working again, thank you so much!!!
extensions.experiments.enabled
That fixed this for me.
How did you figure that out? It's not documented anywhere.
How did you figure that out? It's not documented anywhere.
I was googling how to "install unsigned addons" or something like that and saw this option somewhere together with "xpinstall.signature.required". The xpinstall option is locked now so I tried the other one and it worked)
Has anyone been able to fix Download Manager (S3)?
Has anyone been able to fix Download Manager (S3)?
If that is also a fix for Download Manager (S3), I don't know what I'm supposed to edit? Looking at Download Manager (S3)'s utils.js it does not seem to use the same module as in DTA. Additionally none of the files that it has seem to use PluralForm. So I do not know what the fix would look like.
@Crunchbits,
sorry
@onemen can you edit your 1st post with the full current steps? I did the next upgrade in 117 main release and it broke again. I updated utils based on the package in this comment and then config.js and restarted and scripts broken still.
I updated utils based on the package in this comment and then config.js and restarted and scripts broken still.
The editing of config.js could be the problem. Try putting that back the way it was previously and only update the files in the utils folder.
@marty60 Yes I tried the config.js that gets over-written as:
// skip 1st line
lockPref('xpinstall.signatures.required', false);
lockPref('extensions.install_origins.enabled', false);
try {
const cmanifest = Cc['@mozilla.org/file/directory_service;1'].getService(Ci.nsIProperties).get('UChrm', Ci.nsIFile);
cmanifest.append('utils');
cmanifest.append('chrome.manifest');
Components.manager.QueryInterface(Ci.nsIComponentRegistrar).autoRegister(cmanifest);
// signing bypass by Dumby from forum.mozilla-russia.org
const g = Cu.getGlobalForObject(Cu);
const sandbox = new Cu.Sandbox(g, { freshCompartment: true });
Cc['@mozilla.org/jsdebugger;1'].createInstance(Ci.IJSDebugger).addClass(sandbox);
const dbg = new sandbox.Debugger();
dbg.addDebuggee(g);
const gref = dbg.makeGlobalObjectReference(g);
dbg.onEnterFrame = frame => {
const { script } = frame;
if (!script.url.startsWith('resource://gre/modules/AppConstants.'))
return;
dbg.onEnterFrame = undefined;
if (script.isModule) { // ESM, Fx 108+
const env = frame.environment;
frame.onPop = () => env.setVariable('AppConstants', gref.makeDebuggeeValue(Object.freeze(
Object.assign(new Object(), env.getVariable('AppConstants').unsafeDereference(), {
'MOZ_REQUIRE_SIGNING': false
})
)));
} else { // JSM
const nsvo = frame.this.unsafeDereference();
nsvo.Object = {
freeze (ac) {
ac.MOZ_REQUIRE_SIGNING = false;
delete nsvo.Object;
return Object.freeze(ac);
}
};
}
}
ChromeUtils.import('resource://gre/modules/addons/XPIInstall.jsm');
dbg.removeAllDebuggees();
Cu.import('chrome://userchromejs/content/BootstrapLoader.jsm');
} catch (ex) {};
try {
Cu.import('chrome://userchromejs/content/userChrome.jsm');
} catch (ex) {};
And also the one in this main repository. Also tried rebuilding repository after each attempt. The other program files looked the same as repository.
@megamorphg,
That's the same one I'm using by Dumby and it works fine for me, the only difference is I have this extra line on top:
lockPref("extensions.experiments.enabled", true);
If it's still broke with this config.js file and the utils folder with the updated files inside the Chrome folder then it's possible your scripts need updating. I had to edit a few of those myself even with these changes. It was just a simple matter of removing a services line. You can post one of the scripts or zip it so someone can take a look at it.
I am using this config.js
// skip 1st line
lockPref('xpinstall.signatures.required', false);
lockPref('extensions.install_origins.enabled', false);
lockPref("extensions.experiments.enabled", true);
try {
const cmanifest = Cc['@mozilla.org/file/directory_service;1'].getService(Ci.nsIProperties).get('UChrm', Ci.nsIFile);
cmanifest.append('utils');
cmanifest.append('chrome.manifest');
Components.manager.QueryInterface(Ci.nsIComponentRegistrar).autoRegister(cmanifest);
const objRef = ChromeUtils.import('resource://gre/modules/addons/XPIDatabase.jsm');
objRef.XPIDatabase.SIGNED_TYPES.delete("extension");
Cu.import('chrome://userchromejs/content/BootstrapLoader.jsm');
} catch (ex) {};
try {
Cu.import('chrome://userchromejs/content/userChrome.jsm');
} catch (ex) {};
@onemen @marty60 I've tried both your scripts on the latest 117 on Release channel and it still doesn't work.
None of the scripts load. I'm only using the following scripts and extensions (all from the main repository except Animancer's which worked too):
@megamorphg,
Just want to check all the bases, you also have the config-prefs.js file in the prefs folder?
If you go to Menu Bar/Tools is the userChromeJS Manager there and if so all of the scripts checked to run? Or alternately if you have the button on the Navigation bar.
@marty60 so I needed to refresh the startup via about:support (and not by deleting addonstartup)... and then all my scripts started working! Addons are still disabled... any idea on how to re-enable that for Release? I tried "update addons" and it didn't work like last time. Otherwise I'll have to find the right add-on ID for all disabled extensions in my 3 browsers and run JS as instructed in #264...
splitting
Cu.import("chrome://userchromejs/content/BootstrapLoader.jsm");
into its own try catch block fixed it somehow.
This is what worked for me too — I never had a BootstrapLoader.jsm
in the first place.
@marty60 so I needed to refresh the startup via about:support (and not by deleting addonstartup)... and then all my scripts started working! Addons are still disabled... any idea on how to re-enable that for Release? I tried "update addons" and it didn't work like last time. Otherwise I'll have to find the right add-on ID for all disabled extensions in my 3 browsers and run JS as instructed in #264...
If you know how to use f12 you can use that on about:addons to reveal the hidden enable switch. Flip it back and forth one or more times should kick start the addon if you have all scripts in function.
@megamorphg, I see you've mentioned that you're using "release" and the "Release channel" a few times. Do note that advanced modification using userscripts in the chrome
directory requires that you use Firefox Developer Edition. Or the aurora release channel, if you want to reference what it says in the about section of the browser. Bootloaders like this one will not work on the release channel, the regular Firefox.
@megamorphg, I see you've mentioned that you're using "release" and the "Release channel" a few times. Do note that advanced modification using userscripts in the
chrome
directory requires that you use Firefox Developer Edition. Or the aurora release channel, if you want to reference what it says in the about section of the browser. Bootloaders like this one will not work on the release channel, the regular Firefox.
NO, it not.
@xiaoxiaoflood
Firefox 117 changes
firefox-scripts
will stop working on Firefox 117 without these changesUpdate utils
BootstrapLoader.jsm
RDFDataSource.jsm
userChrome.jsm
xPref.jsm