TechWeb

Firefox Essentials: Fixing The Fox

Mar 30, 2006 (11:03 AM EST)

Read the Original Article at http://www.informationweek.com/news/showArticle.jhtml?articleID=184417189


Editor's note: This is the third installment of InternetWeek's "Firefox Essentials" series. Be sure not to miss the earlier segments on must-have extensions and understanding and managing your profiles.

One of the secrets to making any software work well is knowing what to do when it won't work at all. Firefox is no different: If you know how to isolate, identify, and cure the most common problems, you can get back to surfing without missing a beat.


Troubleshooting Firefox


•  Introduction

•  Using Firefox Safe Mode

•  Using The Standard Diagnostic

•  Performing A Clean Install

•  Extensions From Hell

•  Getting Help, Avoiding Trouble

•  Image Gallery


But we'll get to that in a minute. The first step to avoiding trouble with Firefox is to keep it updated with the latest security patches and bug fixes. Thanks to a new auto-update feature in Firefox 1.5, keeping Firefox up to date is much quicker and easier than in earlier versions. You no longer have to reinstall the whole browser every time Mozilla releases a security patch or a minor bug-fix update.

Using the options you'll find under the Update tab in the Advanced section of the Firefox Options menu, you can configure Firefox to download and install approved Mozilla updates automatically, or (the default option) instruct the browser simply to tell you when updates are available. The auto-update feature will even check for updates to your Firefox extensions, themes, and search engine plugins.


Playing The Numbers Game


Should you always install the most recent Firefox release? That may seem like a strange question, but if you've followed the ins and outs of earlier Firefox releases, it's a legitimate one.

During the first month or so after Firefox 1.5 made its debut in November 2005, quite a few experienced users concluded that it was far less stable and reliable than the previous release, Firefox 1.0.7. But that changed with the release of Firefox 1.5.0.1. Among many other improvements, it fixes two memory leaks in Firefox 1.5, including one that could make a serious nuisance of itself. More important, Firefox 1.5.0.1 patches eight security holes, some of which could pose serious threats to your PC and your personal data.

Right now, there simply isn't a good reason to use an older version of Firefox.

Troubleshooting Firefox: Where To Begin?
If you've kept Firefox completely updated and you're still experiencing problems, it's time to begin your search for troubleshooting answers.

The first place you should look is the MozillaZine list of Firefox issues. If your problem matches one in this "greatest hits" collection, you can find out how to fix it (or why you should abandon all hope and start anew) without further ado.

If you don't find your answer there, it's time for phase two: Safe Mode.




Safety First: Using Firefox Safe Mode
Like most modern software, Firefox is a complex product. In theory, just one small error in a single line of code is enough to stop your browser in its tracks. In practice, however, you can trace almost every Firefox problem to the usual suspects: extensions, themes, and the configuration files in your Firefox profile folder. Firefox includes a sure-fire way to tell whether your problem is coming from one of these sources, simply by restarting the browser in its Safe Mode configuration.


Troubleshooting Firefox


•  Introduction

•  Using Firefox Safe Mode

•  Using The Standard Diagnostic

•  Performing A Clean Install

•  Extensions From Hell

•  Getting Help, Avoiding Trouble

•  Image Gallery


You may already be familiar with the Safe Mode concept: If Windows Safe Mode is invoked during startup (usually by pressing the F8 key), Windows loads with only its basic, default components installed, allowing you to troubleshoot certain types of problems.

Firefox Safe Mode works the same way: Your browser will run without any extensions, plugins, themes (except for the default theme), or any changes you might have made to the configuration files in your profile folder. Even your most basic personal Firefox settings, such as your bookmarks file and cookies, don't appear when the browser is running in Safe Mode.

No matter what type of problem you encounter in Firefox, one of your first moves should always be the same: Restart the browser in Safe Mode, and see what happens.

With Firefox 1.5, Mozilla has actually improved Safe Mode for the first time. The latest version of Safe Mode now includes a set of three startup options, allowing you to permanently reset your toolbars and controls to their original, default locations and settings; to reset your bookmarks.html file; or, if things get really weird, to reset all of your user-adjustable properties to their factory-fresh defaults. But don't reset these options right away -- first, click the Continue in Safe Mode button and see how Firefox behaves.



The new Firefox Safe Mode options: handle with care!
Click image to see image gallery.

Before you restart Firefox in Safe Mode -- especially following a crash -- shut down Firefox and make sure it's shut down completely. Open Windows Task Manager (or the equivalent management utility on your Mac OS X or Linux system), and look for firefox.exe (or firefox.bin) under the Processes tab -- if you see it, select it and then click the End Process button, okaying any last-chance dialog boxes.



Kill any running Firefox processes. Click image to enlarge and to see image gallery.

Now you can restart Firefox in Safe Mode. How you do this will depend on your operating system:

Windows: Plan A is easy: Select Start > Programs > Mozilla Firefox > Mozilla Firefox (Safe Mode).


If, for some reason, that link is missing, then go to Plan B: Click Start > Run, and on the command line enter:

"C:\Program Files\Mozilla Firefox\firefox.exe" -safe-mode

Linux and OS X: Linux and Mac OS X both require you to run Firefox in Safe Mode only from a Terminal window: From the command line, start the Firefox application (wherever it is located on your system), with the -safe-mode command attached. Here's an example, using Mac OS X with Firefox installed in its usual location:

/Applications/Firefox.app/Contents/MacOS/firefox -safe-mode

Now it's time for a little guidance. That's where the Standard Diagnostic comes in.




Troubleshooting By The Numbers: Using The Standard Diagnostic
In Safe Mode, you have either a lame, totally non-customized browser that works okay or a lame, totally non-customized browser that's still broken. What now?


Troubleshooting Firefox


•  Introduction

•  Using Firefox Safe Mode

•  Using The Standard Diagnostic

•  Performing A Clean Install

•  Extensions From Hell

•  Getting Help, Avoiding Trouble

•  Image Gallery


I suggest doing the same thing a professional support expert would do to help you (minus the two-hour wait on hold, listening to Air Supply's greatest hits). Work your way through Mozilla's Standard Diagnostic for Firefox, which provides a series of trial-and-error tests designed to track down troublemakers, as well as to ensure that you don't overlook an easy fix before moving on to more radical solutions.

The Standard Diagnostic includes directions on how -- and, just as important, when -- to delete your extensions folder and other key files, such as the configuration files that govern how Firefox renders Web pages and displays its own user interface. Although most of these files are human-readable, in practice it doesn't make sense to spend hours (or days!) poring through them, looking for an error that may only reveal itself after hundreds of minor, trial-and-error changes. Sometimes the best solution is to throw a profile into the trash and get a fresh start.

Even if the best solution involves starting over with a new profile, however, don't despair: Many of your most important profile data files, including your bookmarks.html file, browsing history, cookies, saved usernames and password sets, almost certainly are not the culprits. It's an easy matter to copy these files into your new default profile -- and within minutes, have virtually everything except your extensions back at your fingertips. (See Firefox Essentials: Get To Know Your Profile for details.)


The Extension-Head's Best Friend


What about those extensions? At least initially, it's a relatively simple matter to reinstall them from scratch with a quick visit to addons.mozilla.org. Later, however, you may find that it's hard even remembering all of your extensions, much less downloading and reconfiguring them all. Is there a better way?

In fact, there is. The MR Tech Local Install extension, the creation of developer Mel Reynes (a.k.a. "mrtech"), lets you archive XPIs (the Firefox extension installer-file format) in a separate file at the same time you install them. As a result, if you ever have to trash a corrupt extensions folder, you have a complete set of replacements on your PC and ready to reinstall.



Have MR Tech Local Install archive your extension installer files.
Click image to enlarge and to see image gallery.


There are a few good reasons to follow Mozilla's support script, as opposed to following a hunch or simply reinstalling Firefox from scratch. First, the Standard Diagnostic is based on Mozilla's own considerable experience finding and fixing Firefox problems -- as opposed to your much more recent experience causing Firefox problems. This includes knowing which problems are more likely to occur than others and what order steps should be taken in.

Also, the Standard Diagnostic will keep you from stumbling around in circles. This is especially important if you're in a hurry, foaming at the mouth in a blind fit of computer rage, or otherwise distracted.

Actually, I do suggest deviating from Mozilla's official diagnostic procedure in one way: Rather than rebooting your computer first, clear your cache (Step Two) and restart in Safe Mode (Step Three) before you reboot. This is purely a practical matter: These steps combined will still take much less time than rebooting -- an action that could disrupt anything else you have open on your desktop at the moment. If either of these steps fixes the problem, then you can skip rebooting entirely, at least for now.

Finally, note that some of the steps in the Standard Diagnostic refer to something you need to start doing now, if you don't already do it: back up your Firefox profile. Making a backup of your profile is drop-dead easy, takes a matter of seconds, and will protect you from losing all of your profile data, with no hope of retrieving it.




A Fresher Fox: Performing A Clean Install
Sooner or later, the combined effect of small, often invisible errors in your Firefox configuration files may begin to cause trouble, and taking the time to do a "clean" install -- removing all traces of your existing copy of Firefox before installing a new copy -- can be the best way to fix the problem.


Troubleshooting Firefox


•  Introduction

•  Using Firefox Safe Mode

•  Using The Standard Diagnostic

•  Performing A Clean Install

•  Extensions From Hell

•  Getting Help, Avoiding Trouble

•  Image Gallery


When will a clean install come in handy? Here are the most likely examples:

  • When the Firefox auto-update freezes, crashes the browser, shows an error message, or exhibits any other strange behavior that prevents the update from completing.
  • When you need to reinstall the same version of Firefox, due to a serious problem with an unknown cause, as in the screenshot below.


  • This strange-looking Firefox Options dialog box is a sign of corrupt settings in a key configuration file -- a good reason to undertake a clean install. Click image to enlarge and to see image gallery.

  • When performing a major update, such as Firefox 1.0.7 to 1.5, or Firefox 1.5 to 2.0, as a type of preventive maintenance.
  • Here's how to do a clean install:

    Fetch Your Fox. When you download a copy of Firefox, be sure to click the Save button in IE or the Save To Disk option in Firefox, and store the file on your desktop. Do not choose Run (in IE), Open With (in Firefox), or any similar option that will run the Firefox installer as soon as it finishes downloading.


    Shut It Down. When you're finished downloading, shut down Firefox -- and make sure it isn't playing possum (see the instructions earlier in this article).

    Go Hunting. The key to performing a clean Firefox installation is to uninstall and/or delete every piece of your current Firefox setup. Don't assume that the Firefox uninstaller will take care of this for you. While an uninstaller will do most of the job, it will also leave behind bits and pieces of your old Firefox setup -- some of them trivial, others capable of messing up your clean installation if you don't root them out and delete them.

    Before you delete anything, make sure that your Firefox profile is backed up and safely stored in a non-Firefox folder. Remember: If you have not backed up your profile, you will lose it during this process.

    If you use Windows, you're ready to run the Firefox uninstaller, which you'll find under the Add or Remove Programs option in the Control Panel. (Linux and OS X users: You don't need an uninstaller, since your Firefox installations are much less spread out and easier to delete manually.)



    The Firefox uninstaller will remove most Firefox files for Windows users, but you still need to track down a few stragglers. Click image to enlarge and to see image gallery.

    After you run the uninstaller, check the following locations on your system for files or folders that you will need to delete before proceeding:

    Windows:
    1. Delete your Firefox folder, typically located at C:\Program Files\Mozilla Firefox\
    2. Go to C:\Documents and Settings\<Windows user name>\Application Data\Mozilla\ and delete the Mozilla folder and all its contents.

    Mac OS X:
    1. Drag Firefox to the Trash from your Applications folder.
    2. Go to <username>/home/library/application support/ and drag the Firefox folder to the Trash.

    Linux:
    1. Go to /usr/lib/firefox-<version> and delete the entire folder.
    2. Go to ~/.mozilla/ and delete the .mozilla folder and all its contents.

    One file in particular that you may find hanging around, even after running the uninstaller, is called profiles.ini, a configuration file that tells Firefox how to handle the contents of your Profiles folder. Your new version of Firefox will create this file automatically when you run it for the first time, with the proper settings -- but only if you delete the old version first.

    Install, Restore, Run! Now that you have "sterilized" your PC, it's time to start fresh: Find your new Firefox installer and run it.



    Here's a question you may have asked yourself: Standard or Custom installation? My advice is to choose the custom install option, but make only one change from the default options: Click the box to install the Mozilla Quality Feedback Agent. This software will start only if your Firefox browser crashes; after asking you for (optional) details about the crash, it will send Mozilla a snapshot of your system at the time.

    By default, the feedback agent does not report any personal data to Mozilla -- period! -- but rather sends technical data about running processes, memory addresses in use at the time, and so on. It asks you each time it runs whether it may send the data; if you're in a hurry or don't want to send anything, simply tell it to bug off until the next crash. The data you send just might help developers fix a bug or two, which means you're also helping yourself when you help Mozilla in this way.

    Before you run your new copy of Firefox, you will need to restore your profile folder, following the instructions from our Firefox Essentials article on profiles. (You did back up your profile, right?)




    Extensions From Hell -- And How To Avoid Them
    When you read through the Standard Diagnostic, you'll come across a link to another document that you will find useful all by itself: Mozilla's updated list of troublesome extensions. You shouldn't necessarily uninstall or avoid the extensions on this list; many work fine with the right configuration tweaks or other minor changes.


    Troubleshooting Firefox


    •  Introduction

    •  Using Firefox Safe Mode

    •  Using The Standard Diagnostic

    •  Performing A Clean Install

    •  Extensions From Hell

    •  Getting Help, Avoiding Trouble

    •  Image Gallery


    This is more a list of extensions that don't play well together. Most of the issues listed on this page involve extension conflicts that may cause a wide variety of problems in Firefox. For example, the wildly popular NoScript extension disables JavaScript, and as a result, prevents Flashblock from doing its thing.

    Bookmark this page, and pay it a visit occasionally: It's important not just as a troubleshooting document, but also as a trouble prevention document -- simply check it for the latest conflict, bug-fix, and configuration updates before you install any new Firefox extensions. The few extra minutes you spend here will more than pay for themselves on the back-end, when you don't have to spend an hour or two breaking up a browser-extension brawl.

    Extensions And Upgrades = Oil And Water?
    When you upgrade to a new version of Firefox, you may find that your favorite extensions don't work. When this happens, it often takes users by surprise -- and not in a good way.

    According to Mozilla, those mysterious, now-they-work-and-now-they-don't extensions are part of a system that actually protects Firefox users from bad extension software. In order to keep extensions current and avoid possible browser meltdowns, Mozilla requires developers to check in and update their extensions with the correct version-control info. When you install a new extension -- or when you run an updated version of Firefox on your system for the first time -- Mozilla checks the extension's version-control code against the version of Firefox installed on your system. If they don't match, Firefox will "flunk" the extension and disable it until an updated version is available.

    This isn't so much a troubleshooting issue as a "sit tight and suck it up" issue. You'll have a working extension again just as soon as the developer gets off his or her keister and plays Mozilla's update maze -- in most cases, this won't take more than a week or two after an update hits the street.

    Incidentally, for the impatient, adventurous, or easily amused, there's another option: a clever workaround that will trick Firefox into thinking that your extensions are all up to date and ready to run. (Or simply use our old friend MR Tech Local Install to do the same thing, as shown below.) In most cases, they are -- and the "update" process is a formality you can safely ignore.



    Another trick up MR Tech Local Install's sleeve: an option allowing you to disable (or re-enable) the version-compatibility check Firefox performs after a browser update. Click image to enlarge and to see image gallery.

    Before you try this, however, check around online to see if it's safe to force a particular extension to appear compatible with Firefox 1.5. And if you screw up the process without a backup of your profile, don't come crying to us: Backups are the geek version of an IQ test, and telling the world you just flunked miserably is a bad idea.




    Help Is On The Way
    The troubleshooting steps outlined in this article will get 99 people out of 100 precisely where they need to go: back on the Infobahn, riding Firefox to wherever they want it to take them.


    Troubleshooting Firefox


    •  Introduction

    •  Using Firefox Safe Mode

    •  Using The Standard Diagnostic

    •  Performing A Clean Install

    •  Extensions From Hell

    •  Getting Help, Avoiding Trouble

    •  Image Gallery


    And then there's that hundredth person. If that happens to be you, before you go slinking back to that Other Web Browser or do something you'll regret with a baseball bat (which you really should put down, 'kay?), remember that we've only covered the tip of the tech-support iceberg. Now it's time to dive in and go a little deeper: to one of the many, many forums where Firefox help is available.

    Fortunately, you may not need to go very far at all: One of the very best Firefox support forums is at MozillaZine. The regulars here are a friendly bunch -- just as long as you do your homework and learn a little bit about how things work within the support forums.

    One of the most important things you can do before asking a support question is to search for and review topics that may already contain an answer to your question. Better yet, there are a few key MozillaZine forum topics that you may want to review before you have trouble, simply because they're such good sources of information on popular (and often problematic) third-party software you're likely to run with Firefox:

  • Firefox is crashing, how can I fix it?
  • Troubleshooting problems with Flash.
  • The complete guide to embedded and streaming media player plugins, including Quicktime, Windows Media, Real Player, and Adobe Acrobat reader.
  • Also, it's easy to overlook the MozillaZine forum on Firefox extensions, simply because it's much father down the main forums page than the primary Firefox support forum. Yet it's worth your time to browse both forums, especially as you get into more advanced Firefox tweaks and customizations.

    Avoiding Trouble Of A Different Kind
    I couldn't resist ending this piece with a tip for avoiding a whole different kind of online trouble: personal data theft.

    Firefox enjoys a well-deserved reputation for raising far fewer security risks than Internet Explorer 6. But security is a two-way street: Your browser needs to keep external threats at bay, but it must also allow you to control and monitor your personal data at all times -- and, if you wish, remove it entirely.

    Get familiar with the Privacy section of your Tools > Options menu, which includes settings to control and/or erase info that you've entered into online forms or your Search Bar (Saved Forms), where you spend your time online (History), or what you do when you get there (Cookies, Passwords, and Download History).



    Clear your personal data when you shut down. Click image to enlarge and to see image gallery.
    Click the Settings button at the bottom of any of the Privacy area's six tabs to call up the Clear Private Data tool. Here you can configure Firefox to delete some (or all) of your personal data, either with or without confirmation, every time the browser shuts down.

    There's also a panic-button method of accessing the Clear Private Data tool: a link near the bottom of the Firefox Tools menu. This does pretty much the same thing as the first method, with one key difference: You can activate it instantly, using a hotkey (Ctrl+Shift+Del) sequence, rather than having to shut down Firefox to make it work.


    Take A Pass


    Firefox 1.5 sports an impressive-looking interface for storing and managing your online user IDs and passwords, along with a Master Password option that, once activated, will prevent anyone from accessing the saved passwords and user IDs on your computer without permission.

    Unfortunately, I can't recommend the Firefox Password Manager, if only because it has an annoying habit of "forgetting" saved passwords, usually just after the point when I no longer remember them either. There's a better way: the PasswordMaker extension, which creates unique, secure passwords that you can use anywhere, on any browser. Find out how it all works at the PasswordMaker site.

    And don't forget to check out Firefox Essentials: 10 Must-Have Extensions for more extensions that should be in every Firefox user's kit bag.

    More Firefox Essentials:
    Firefox Essentials: 10 Must-Have Extensions
    Firefox Essentials: Get To Know Your Profile
    Firefox Essentials: Fixing The Fox

    Matt McKenzie is the editor of Linux Pipeline. Over the years, he has broken more PC hardware than most people will ever use -- and he's not done yet. Contact him at mattcmp@sonic.net with questions, comments, complaints, or cash.