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

  • edited December 2016 Chrome
    Try:

    about:config - change extensions.stylish.editorWindowMode to 1

  • Hey, 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?

  • edited January 2017 Chrome
    Sorry to hear it. I've seen this bug, or something like it being discussed. The general consensus was that that config setting worked for a similar issue recently. I don't use FF much, and haven't come across any editor bug when I have. The thread I was getting that answer from is here. There may be something else useful to you there. I wish you luck.
  • edited January 2017 Firefox
    Try this:
    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.

  • edited January 2017 Firefox

    ... 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 when contentDocument 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.

  • 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 when contentDocument 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.

    I hope someone see's this. I can't even sync my stylish after a fresh install
  • edited May 2017 Firefox
    lesmo said:

    ... 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 also appear to be having a similar issue now. I was editing styles no problem earlier today. Now, when I press the Edit or Write New Style buttons... nothing happens. However, existing styles continue to work without issue. I just can't edit them.

    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.
  • lesmo said:

    ... 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 also appear to be having a similar issue now. I was editing styles no problem earlier today. Now, when I press the Edit or Write New Style buttons... nothing happens. However, existing styles continue to work without issue. I just can't edit them.

    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.
    If you use the editor in a separate window instead of a browser tab, check out my post above. It always worked for me.
  • Yeah, like I said, I tried the about:config thing - it was already at the default value (and besides, it opens as a tab rather than as a window). I'm not really prepared to wipe out my profile just for one extension though. I'd rather find out why it stopped working in the middle of a session without interference...
  • I have figured out the root of the problem. It's all because of "Multiprocess windows". Seems like Stylish is not fully compatible with it.
    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/
Sign In or Register to comment.