Firefox: unable to install or write new styles
Hi,
So I've been using this extension for years. Never had an issue. Maybe performance, but that's my fault. Today I was trying to install a new style, and found out that the "Install with Stylish" button in the userstyles.org website is doing nothing. To get around it, I tried to manually create the style but no window shows up at all.... I can't add new styles!!!
When I click Install, the only clue I'm given is a e.preventDefault()
deprecation warning on a application.js file... afaik warnings shouldn't halt execution. When I try to write a new style manually, I'm given a browsers[i].contentDocument
null TypeError and no editor window is shown.
I'm using Firefox Developer Edition. Any ideas?
Comments
about:config - change
extensions.stylish.editorWindowMode
to 1Hey, thanks! I've tried that and had no luck. I've re-installed the add-on, but doesn't work either.
I just noticed someone reported same issue in the Firefox add-on website, using same version as me. Could it be broken for FF 52?
About:config > extensions.stylish.editorWindowPersist > right click > restore default values.
If it doesn't work, restore the firefox profile (about:support), before reinstalling Stylish. But remember that by restoring, you lose everything except bookmarks, so back up what's important.
Happy new-years I guess? Hehe.
So I usually have several profiles at the same time, mostly for work accounts on PayPal and such; I only have uBlock and a Profile Switch add-on there. I decided to try installing Stylish, and it worked.
Next, I thought my profile was probably kill. But I didn't want to restore the thing. I tried on last time to disable all my plugins, and giving it a try... didn't work. Then I just fiddled with Session Manager to prepare for an imminent reset (saved a session, restarted Firefox without tabs), then for some reason decided to give Stylish a try and... IT WORKED AGAIN.
I have absolutely NO idea why. Leaving it here for future reference of someone else out there.
... nevermind! It stopped working again. Found the culprit, though: KeeFox. For some reason, it prevents any tweaking process inside Stylish (writing new styles, installing from URL, installing from Web).
Further testing is needed, of course.
EDIT: I'm unable to reproduce. I'll just use it as is... if it works, don't fix it.
I couldn't find the repository to submit a patch so I'll post it here.
The issue is in the
stylishCommon.focusWindow
function. It errors out whencontentDocument
of a tab is unaccessible.The patch makes it check first if it's accessible. With the patch it may not quite work as intended as the function can not focus the editor tab any more but at least it will let edit userstyles.
Unfortunately, while I do indeed have KeeFox installed myself, disabling the extension did nothing.
I had a look in the "Recent Updates" section of the add-ons screen, and the only things recently updated were not relevant ("Configuration Mania" & "Custom UserAgent String" - disabled both to check just in case, with no effect).
There did appear to be a Firefox update at some point today, as in one of my restarts, it updated to 53.0.2. However, the issue appeared before I restarted to complete the upgrade. That said, I'm not sure on Firefox's update procedure - are some components perhaps updated before the restart anyway?
The only clue I get is
window._content is deprecated. Please use window.content instead.
in the console from object.js. I've tried all the about:config edits mentioned above with no luck (the latter instruction to reset the string wasn't possible; it was already at its default value). As for the patch, I don't know where to begin.Firefox since version 48 trying to decide if all your extensions are compatible with multiprocessing mode, and enable it if all of them are compatible. Stylish is marked as compatible, and Firefox does not disable multiprocessing mode because of it. But it can disable this mode because of another extensions. There is why issue seems so random.
You can check if "Multiprocess Windows" enabled on about:support page.
To disable "Multiprocess Windows" go to about:config and set browser.tabs.remote.autostart to false. You may also need to set browser.tabs.remote.force-enable to false. The last one should be false by default though.
Note, after that manipulation Firefox will work in single process mode which may be undesirable. But adding or creating new styles are not so frequent operation, so you can disable multiprocessing to edit styles, and then enable it again, until the issue fixed.
More info about "Multiprocess Windows":
https://www.ghacks.net/2016/07/22/multi-process-firefox/