Saturday, February 4, 2012

Slaying a Zombie Browser Extension

I just finished a marathon session (on Linux Mint Katya) trying to uninstall Stylish, a zombie extension for the Firefox web browser. I have nothing against Stylish, and I don't think it was the culprit in this story, but I'm recording my methods here both to preserve them for myself and in case anyone else is locked in this battle.

Somewhere along the line, I must have installed a version of Stylish, although I don't recall when or why.  As Firefox went to its current whirlwind upgrade cycle, the installed version of Stylish (1.0.7) became incompatible.  With each upgrade, I would instruct Firefox to look for a compatible version, and it would either report failure or find one, attempt to install it, and report that the upgrade attempt had failed (with no explanation why).  Either way, the browser would open with Stylish 1.0.7 installed and disabled.

This dance got boring after a while, and I could not think of a reason for keeping Stylish, so when Firefox upgraded itself to version 10.0 today I decided to uninstall Stylish ... which is when I discovered it was now a zombie.  If you know anything about zombies, you know that they are difficult to kill.  The instructions for uninstalling an extension are simple: open the extensions tab, find the one you no longer want, and click the uninstall link ... if there is an uninstall link ... and with Stylish, there was not.  Further searching revealed the helpful suggestion that one boot Firefox in safe mode and then click the previously disabled uninstall link ... except there was no uninstall link, disabled or otherwise (nor did one magically appear when I switched to safe mode).

One can invoke Help > Troubleshooting Information in Firefox and find the file or directory name of the extension, then track the file or directory down in the Firefox extensions folder and nuke it manually.  I was able to find the folder name this way (a hex string inside braces), but no folder or file of that name existed in my profile's extensions folder.  This may mean it is installed globally, and sure enough, I found a folder of the correct name in /opt/firefox/extensions.  I nuked it (as root) and restarted Firefox.  The zombie still lived (still listed as disabled).

Upon further searching, I found an SQLite database belonging to Stylish:  /opt/firefox/defaults/profile/stylish.sqlite.  I nuked it (as root) and restarted Firefox.  The zombie persisted.

Well, perhaps I was overthinking this.  With Firefox in safe mode, I installed the latest version of Stylish (1.2.5), then restarted Firefox.  Although Firefox had failed to do the upgrade on its own, this worked.  The new version was installed and not disabled ... which meant it had a functioning uninstall link ... and there was no mention of version 1.0.7.  So I clicked the uninstall link.  After restarting Firefox, I found that Stylish 1.2.5 had successfully uninstalled ... and the 1.0.7 zombie had reappeared.

So I closed Firefox and opened the extensions.sqlite database (in my Firefox profile folder) using the SQLite database browser.  Here I was able to find an entry for Stylish 1.0.7.  It pointed to a directory (with the same hex string name as the one I'd nuked from /opt/firefox/extensions), this time located in /usr/lib/firefox-10.0/extensions.  Nothing I'd turned up in any of my Google searches pointed to /usr/lib (other than perhaps references to "globally installed" extensions, with no indication of where that would be -- hence my earlier search of /opt/firefox).  I deleted the newly found subdirectory (as root), restarted Firefox, and woo-hoo!  No sign of the zombie.

4 comments:

  1. You know, I faced the same problem some days back with FF9 on Windows, with the AVG Safe Search plugin (which got installed through a mistake of mine). The plugin did not even have the 'Uninstall' button. Fortunately, somehow when I rebooted the computer, it showed up in Installed Programs list, and uninstalling from there took care of it. Really annoying though .. and deceptive practice on the vendor's part.

    ReplyDelete
  2. I've seen that plugin but never looked closely at it. Poking around the web, I'm having a hard time telling if it is an extension or a plugin. I've seen it listed both ways, including within the same web page (!).

    Most if not all extensions have uninstall links (assuming nothing has broken), but plugins typically do not. They just have a disable button. I suspect (but am not sure) that is a design feature, probably because at least some plugins are shared by multiple browsers, or at least multiple programs. If I'm right, then uninstalling a plugin from one browser might unintentionally break something else. If it is an extension, though, then I see no excuse for the lack of an uninstall link.

    I'm with you on the last part. Security software or not, there is no excuse for something installing itself, or otherwise modifying the behavior of another program, without seeking a blessing from the user first. In my Google search, I saw comments to the effect that AVG Safe Search automatically inserts itself into Firefox unasked.

    ReplyDelete
  3. Paul, I had the same problem with Stylish 1.0.7

    I'm using Linux Mint 13 and I had 2 directories with the same name, one of them in /usr/lib/firefox/extensions and the other in /usr/lib/firefox-addons/extensions

    I deleted both of them and the zombie is successfully dead now.
    Thank you!

    ReplyDelete
    Replies
    1. You're welcome. Glad someone got some mileage out of this.

      Delete

Due to intermittent spamming, comments are being moderated. If this is your first time commenting on the blog, please read the Ground Rules for Comments. In particular, if you want to ask an operations research-related question not relevant to this post, consider asking it on Operations Research Stack Exchange.